From 3739edf5d5adc7a79aa9fd050d45493d697eaa92 Mon Sep 17 00:00:00 2001 From: UnavailableDev Date: Sun, 19 Feb 2023 14:02:12 +0100 Subject: apu_LUT_reader made with variable frequency --- basys3/basys3.srcs/apu_LUT_reader.vhd | 11 ++++++++--- 1 file 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; -- cgit v1.2.3