Forum Discussion
Altera_Forum
Honored Contributor
18 years agoprocess(clk, reset)
begin if reset = active then current_state <= idle; elsif (clk = '1' and clk'event) then current_state <= next state; end if end process; process(clk, reset) begin if reset = active then next_state <= idle; elsif(clk = '1' and clk'event) then case(current_state) is when idle => if <condition1> then next_state <= S1; else next_state <= idle; when S1 => if <condition2> then next_state <= S2 else next_state <= S1; when others => null; end case; end if; end process; Something like this, first process is switching the states and second using to control the machine and decode logic; good lack