Mealy And Moore Machine
There are two basic ways to design clocked sequential circuits. These are using:
1. Mealy Machine, which we have seen so far.
2. Moore Machine.
Mealy Machine
- In a Mealy machine, the outputs are a function of the present state and the value of the inputs as shown in Figure 1.
- Accordingly, the outputs may change asynchronously in response to any change in the inputs.
Moore Machine
1. In a Moore machine the outputs depend only on the present state as shown in Figure 2.
2. A combinational logic block maps the inputs and the current state into the necessary flip-flop inputs to store the appropriate next state just like Mealy machine.
3. However, the outputs are computed by a combinational logic block whose inputs are only the flip-flops state outputs.
4. The outputs change synchronously with the state transition triggered by the active clock edge.
Comparison of the Two Machine Types
1. Consider a finite state machine that checks for a pattern of ‘10’ and asserts logic high when it is detected.
2. The state diagram representations for the Mealy and Moore machines are shown in Figure 3.
3. The state diagram of the Mealy machine lists the inputs with their associated outputs on state transitions arcs.
4. The value stated on the arrows for Mealy machine is of the form Zi/Xi where Zi represents input value and Xi represents output value.
5. A Moore machine produces a unique output for every state irrespective of inputs.
6. Accordingly the state diagram of the Moore machine associates the output with the state in the form state-notation/output-value.
7. The state transition arrows of Moore machine are labeled with the input value that triggers such transition.
8. Since a Mealy machine associates outputs with transitions, an output sequence can be generated in fewer states using Mealy machine as compared to Moore machine. This was illustrated in the previous example.