Altera_Forum
Honored Contributor
13 years agoState Machines - advantages and disadvantages
Hi Guys,
I would like to ask the next question: As a rule, I buidling the state machine when my inputs and outputs are places in the same state machine. But in Mealy/Moore state machine there is a separation betwen them - state machine for inputs and state machine for outputs. For example: case state_machine is when Idle => if(input = '1') then output <= '1'; state_machine <= State_1; else output <= '0'; state_machine <= Idle; end if; when State_1 => if(input = '1') then output <= '1'; state_machine <= Idle; else output <= '0'; state_machine <= State_1; end if; end case; This code is meaningless but helps u to understand my question... The question: What way is more "healthy" and more effective for building the state machines - separating inputs and outputs as mealy\moore or it's possible to build it in my way? Can my state machine be stucked in because of it?