Archived
1
0
This repository has been archived on 2025-05-03. You can view files and clone it, but cannot push or open issues or pull requests.
Files
SEm-Labos/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothGen_studentVersion.vhd
2024-02-23 16:14:04 +01:00

22 lines
385 B
VHDL

ARCHITECTURE studentVersion OF sawtoothGen IS
signal counter : unsigned(bitNb-1 downto 0);
BEGIN
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;