Forum Discussion
Altera_Forum
Honored Contributor
14 years agoDE2: how to use clock divider?
Hello, I was coding clock divider in VHDL and was told that it's not a good idea to do so. How do I use the DE2's onboard clock divider? Thank You
Altera_Forum
Honored Contributor
14 years agoInstead of using a clock divider, use a clock enable instead. It will keep your system in the same clock-domain and make the timing behavior easier to determine by Timequest.
IF (rising_edge(CLOCK)) THEN
IF (clock_enable_s = '1') THEN
--Stuff Here
END IF;
END IF;
Just pulse the enable when you want an operation to be done and it should behave much like a clock division. Hope this helps.