1
0
SEm-Labos/02-SplineInterpolator/SplineInterpolator/hdl/interpolatorTrigger_studentVersion.vhd

30 lines
511 B
VHDL
Raw Permalink Normal View History

2024-02-23 13:01:05 +00:00
ARCHITECTURE studentVersion OF interpolatorTrigger IS
2024-03-08 15:16:59 +00:00
signal counter : unsigned(counterBitNb-1 downto 0);
2024-02-23 13:01:05 +00:00
BEGIN
2024-03-08 15:16:59 +00:00
process(clock, reset)
begin
if reset = '1' then
2024-03-10 20:50:07 +00:00
counter <= (others => '0');
2024-03-08 15:16:59 +00:00
elsif rising_edge(clock) then
2024-03-10 20:50:07 +00:00
2024-03-08 15:16:59 +00:00
if en = '1' then
counter <= counter - 1;
end if;
2024-03-10 20:50:07 +00:00
2024-03-08 15:16:59 +00:00
end if;
end process;
process(counter)
begin
if counter = 0 then
triggerOut <= '1';
else
triggerOut <= '0';
end if;
end process;
2024-03-10 20:50:07 +00:00
2024-02-23 13:01:05 +00:00
END ARCHITECTURE studentVersion;