1
0

add signus signal

This commit is contained in:
Rémi Heredero 2024-03-01 15:12:05 +01:00
parent 0233d8b730
commit 73dd7da0db

View File

@ -1,4 +1,17 @@
ARCHITECTURE studentVersion OF lowpass IS ARCHITECTURE studentVersion OF lowpass IS
signal accumulator: unsigned((signalBitNb-1)+shiftBitNb downto 0);
BEGIN BEGIN
lowpassOut <= (others => '0');
process(clock)
begin
if reset = '1' then
accumulator <= (others => '0');
elsif rising_edge(clock) then
accumulator <= accumulator + resize(lowpassIn,signalBitNb+shiftBitNb) - shift_right(accumulator, shiftBitNb);
end if;
end process;
lowpassOut <= resize(shift_right(accumulator, shiftBitNb), signalBitNb);
END ARCHITECTURE studentVersion; END ARCHITECTURE studentVersion;