aboutsummaryrefslogtreecommitdiff
path: root/basys3/basys3.srcs/apu_LUT_reader.vhd
diff options
context:
space:
mode:
Diffstat (limited to 'basys3/basys3.srcs/apu_LUT_reader.vhd')
-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;