aboutsummaryrefslogtreecommitdiff
path: root/basys3
diff options
context:
space:
mode:
authorUnavailableDev <ggwildplay@gmail.com>2023-02-19 14:02:12 +0100
committerUnavailableDev <ggwildplay@gmail.com>2023-02-19 14:02:12 +0100
commit3739edf5d5adc7a79aa9fd050d45493d697eaa92 (patch)
tree27936fe0ca4df02cce5ff697e01f8e370ea8f97b /basys3
parent7eee083a5939b0e375ece0edb1d2512258d51710 (diff)
apu_LUT_reader made with variable frequency
Diffstat (limited to 'basys3')
-rw-r--r--basys3/basys3.srcs/apu_LUT_reader.vhd11
1 files changed, 8 insertions, 3 deletions
diff --git a/basys3/basys3.srcs/apu_LUT_reader.vhd b/basys3/basys3.srcs/apu_LUT_reader.vhd
index 2dd3b06..a37cd30 100644
--- a/basys3/basys3.srcs/apu_LUT_reader.vhd
+++ b/basys3/basys3.srcs/apu_LUT_reader.vhd
@@ -44,10 +44,15 @@ begin
- if unsigned(idx) < 255 then --moves to next index value
- idx <= std_logic_vector( unsigned(idx) + '1');
+ if buf < unsigned(freq) then -- change frequency
+ buf <= buf + 1;
else
- idx <= x"00";
+ buf <= x"00";
+ if unsigned(idx) < 255 then --moves to next index value
+ idx <= std_logic_vector( unsigned(idx) + '1');
+ else
+ idx <= x"00";
+ end if;
end if;
end if;