Forum Discussion
Altera_Forum
Honored Contributor
15 years agoI'm not exacly understand how to use counter. Especially in process witch is responsible on changeing states. In last version I used something like this:
process (clk, rst) begin if (rst = '1') then state_reg <= s0; elsif rising_edge(clk) then if divideclk = '1' then state_reg <= state_next; divideclk <= '0'; else divideclk <= '1'; end if; end if; end process; and in main process sensitivity list I had state_reg and stream. I'm not sure how to change it to use counter instead of state_reg and state_next? Thanks in advance