Home / Learn Verilog / Moore vs Mealy: Choosing

Moore vs Mealy: Choosing

Compare them side by side.

Quick summaryCompare them side by side.

How to think about this

Moore vs MealyMooreoutput = f(state)more statesglitch-freeMealyoutput = f(state, input)fewer statesfaster reaction
Moore vs Mealy

The basic idea

Moore = clean, registered outputs, more states. Mealy = faster, fewer states, input-dependent outputs.

Why this comes up

A wrong choice gives glitches or extra latency.

The mechanics

Register Mealy outputs if they drive other clocked logic.

Where it is used

  • Everyday RTL design
  • FPGA and ASIC projects
  • Testbenches and debugging

Try it

Detect rising x both waysVerilog: edit and run

Mealy fires in the same cycle; Moore one clock later.

Quick check

1. Which reacts sooner?