Archived
1
0

add sawtooth

This commit is contained in:
2024-02-23 16:14:04 +01:00
parent d212040c30
commit 9fab167e18
2 changed files with 127 additions and 1 deletions

View File

@ -1,5 +1,21 @@
ARCHITECTURE studentVersion OF sawtoothGen IS
signal counter : unsigned(bitNb-1 downto 0);
BEGIN
sawtooth <= (others => '0');
count: process(reset, clock, en, step)
begin
if reset = '1' then
counter <= (others => '0');
elsif rising_edge(clock) then
if en = '1' then
counter <= counter + step;
end if;
end if;
end process count;
sawtooth <= counter;
END ARCHITECTURE studentVersion;