3. Introduction:
• FSM’s can exist in several states and it goes from one
state to another state based on the present state and
the input conditions
• Any synchronous circuit is an FSM of some form
• This means that:
Combinational logic is an FSM without memory
Flip-Flops and counters are also FSM’s
3
5. General FSM
• The circuit diagram consists of:
Combinational block: with primary input w
and primary output z. it also consist of
secondary inputs (present state) and
secondary outputs (next state)
Memory block: consist mainly of Flip-Flops.
5
6. Outputs of state machines:
• No provision has been made to show the
output z which is different from the state
variables. The output can therefore be
modelled in two distinct ways
Moore machines
Mealy machines
6
7. Moore machines:
•Edward Moore’s model:
D = F(W,Q)
Z = G(Q)
F and G are Boolean functions
Output only depends on the current state (Q)
Input (W) and current state (Q) determine the next
state (D)
7
9. Moore state table
Present state Input Next state output
A B W Z
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 1 0 0
0 1 1 0 1 0
1 0 0 0 0 1
1 0 1 0 0 1
1 1 0 x x 0
1 1 1 x x 0
9
12. Mealy machines
• George Mealy’s model
D = F(W,Q)
Z = G(W,Q)
F and G are Boolean functions
Output depends on both current state (Q) and input
(W)
Next state (D) depends on input (W) and current
state (Q)12
17. Comparison: Moore vs Mealy
• Moore machines are safer to use
Output change at clock edge
In mealy machines, input change can cause
output to change as soon as logic is done.
• Mealy machines are faster because the output
is dependent on the inputs.
17
18. Choosing between Moore and Mealy
machines
• It actually comes down to the task at hand when
choosing between Mealy and More machines
• These are a few questions to ask when choosing
between either of the two:
Does one want to have a synchronous or asynchronous
machine?
Is speed paramount?
Are both the inputs and present state readily available?
• The answer to each of these questions determines the
type of machine that would work best.
18