Forum Discussion
Altera_Forum
Honored Contributor
17 years agoFSM design/reset
Hi! I'm currently implementing some control logic using an FSM on a Stratix II chip. I'm having issues writing a "clean" FSM design, as I don't have an external reset signal available. My questions a...
Altera_Forum
Honored Contributor
17 years agoHi,
You can generate internal reset for whatever purpose after power up or any time by using basic logic or a small counter. signal count : unsigned(3 downto 0); -- to prevent compiler optimising away count attribute keep_count:boolean; attribute keep_count of count :signal is true; process begin wait until clk = '1'; if count < 15 then count <= count + 1; end if; if count < 10 then reset <= '1'; else reset <= '0'; end if; end process; edit: To be on safe side you may also add keep attribute to reset, also make sure that the (power-up don't care) is off so that the count starts at 0 always.