Mealy and Moore Output Rules

A Moore model gives outputs from retained state. A Mealy model can also use the current input in the output function.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace a two-input situation
  2. Specify observation time
  3. Observe output before the state updates
  4. Compare interface timing from a complete trace

Trace a two-input situation

In a remembered-ready state, a Mealy output can acknowledge only when a request is present. A Moore model can use a separate acknowledging state after observing the request. Finite-state circuits give the structure common to both.

Specify observation time

If readers compare cycle-by-cycle traces, state when input is sampled and when outputs are read. Output timing and state assignment determine whether two models report the same external sequence. A hand trace helps separate them.[1]

Observe output before the state updates

Suppose a request bit can trigger a grant in idle. A Mealy output can depend on idle and the current request together. A Moore design can enter a grant state when the request is sampled and derive output solely from occupying that state. See reading a state circuit.

Before sample: state idle, request=1
Mealy example may already assert grant
Moore example changes to grant state at sample, then asserts
The output definitions are distinct even if both accept the request

Compare interface timing from a complete trace

Replacing one form with another can shift when an observer sees a signal. Specify whether the output is registered and how to handle a request changing near an edge. Test assertion, reset, and completion events in the same timing model.

References

  1. Noam Nisan and Shimon Schocken, From Nand to Tetris: Course Projects ↩