Pergunta

I understand the way Mealy state machines work - the output logic is now a function of not just the current state but of the input directly as well.

But what is the advantage to this over Moore machines? Do people commonly use Mealy FSMs?

Foi útil?

Solução

Moore machines are often simpler to comprehend, but a Moore machine will have at least as many states as the corresponding Mealy machine. (think about how to turn Mealy to Moore: for each transition, have additional states for the choices on input)

So, Mealy is often more efficient, because you can have fewer states and thus fewer memory components. On the other hand, because it's bound to input, it's not bound to the clock. Therefore, in cases where timing on the output is important, Moore gives you more control.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top