Forum Discussion
Altera_Forum
Honored Contributor
13 years agothere are no pre-existing functions, because thats for you to generate and determine. Clock enables are more reliable because there is no worry about timing or temperature changes:
process(clk)
begin
if rising_edge(clk) then
if cnt = 999 then
clk_en <= '1';
cnt <= 0;
else
clk_cnt <= '0';
cnt <= cnt + 1;
end if;
if clk_en = '1' then
--do something every 1000 clocks
end if;
end if;
end process;