cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
2,432 Views
Registered: ‎09-16-2013

Mealy anf moore FSM

Hi,

 

When we are designing a FSM, How to choose the FSM whether to use mealy or moore.

Thanks
Naveen G K
0 Kudos
1 Reply
Highlighted
Advisor
Advisor
2,425 Views
Registered: ‎04-26-2015

Whichever you're most comfortable with.

 

Moore machines tend to allow for higher clock speeds, and the logic may be easier to interpret. Both occur because there's a direct mapping from states to outputs.

 

Mealy machines, on the other hand, can allow for more complex logic. In a simple divider, in each iteration you compare the current dividend (which also changes in each iteration) to the divisor and make a decision on whether to subtract one from the other or not. A Mealy machine can do this at one iteration per cycle, because its output can depend on both the state and the result of the compare operation. A Moore machine cannot, because its output cannot rely on the comparison operation (there are ways to do it in a Moore machine, but they're less intuitive).

 

I'd suggest starting with a Moore machine for its simplicity and the ease of handling outputs. Especially for a beginner, it tends to help ensure that the state machine actually has a decent number of states, whereas a simple Mealy machine can sometimes end up with a single complex state - which is not the intention.

0 Kudos