Moore outputs depend on the state register alone. Mealy outputs depend on the state and the current inputs.
Model | Output depends on | Typical consequence |
|---|---|---|
Moore | The current state only | No direct input-to-output path; decode can glitch near an edge; sometimes one extra state |
Mealy | The current state and the current inputs | Reacts in the same cycle; fewer states; outputs can change when inputs do |
4 lessons, about 13 min
Mealy. Its outputs are combinational functions of the inputs, so they change as soon as an input does (before the next edge). A Moore output reacts one clock edge later, when the state has changed.
The whole topic on one page, taken from each lesson's Remember box. Read it before an interview, or print it.
Behavioral Difference
A Mealy output uses the state and the live input, so it responds in the same cycle.
A Moore output uses the state only, so it follows the clock edge that enters the state.
A Mealy output feeding another block is a combinational path from your input to their logic.
Side-by-Side: A Sequence Detector
Read the output just before the rising edge, where the input is settled and the state has not yet updated.
Mealy y = (state == S1) && x; drop the && x and it signals only that the previous sample was 1.
Moore needs a state for 'two ones seen', so it costs three states against two.
Rule of thumb: the Moore output is the Mealy output delayed by one cycle.
Registered Mealy Outputs
Registering moves the decision from before the capture edge to after it.
A registered Mealy output is a Moore machine whose state includes the output bit.
Choose by the receiver's timing and latency contract. Source registration alone does not handle CDC.
Choosing and Verifying
Boundaries want registered outputs, and local fast paths want Mealy.
Reach every state through legal inputs rather than forcing the state register.
Check reset state, defaults, reachability, progress under the environment and illegal-state behaviour.
Mini project: an SPI master, controller and datapath
Practice question: Types of FSMs and their difference
Practice question: How outputs are generated in Moore FSMs
Code lab: Sequence FSM
Practice question: FSM output encoding: registered vs combinational hazards
Interview: run a mock interview on this topic