Professional Documents
Culture Documents
Chapter 10
2
Logic Diagram
3
Fully Synchronous FSM
4
Present State
• The present state is stored as a binary
value in the state register.
• The number of memory elements in the
state register is finite. If the state register
has n memory elements, the maximum
number of unique states the FSM can have
is 2n. This number is also finite, hence the
name finite state machine.
5
Next State
• The combinational logic also computes the
next state value from the FSM’s inputs and
present state. This value is provided to the
inputs of the state register.
• At each triggering clock edge, the next
state value is clocked into the state register
and becomes the new present state value.
6
Outputs
7
8
Mealy FSMs
• Mealy FSM’s outputs are a function of both
its inputs and its present state. Because of
this, the outputs of a Mealy FSM can
change as soon as any of its inputs
change.
• However, its state still cannot change until
a triggering clock edge.
9
Moore FSMs
• A Moore FSM’s outputs are a function of only its
present state.
• since a Moore FSM’s outputs are a function of only
its present state, they can change only at a
triggering clock edge.
• In general, any sequential function can be
implemented by either a Mealy FSM or a Moore
FSM.
• However, while a Moore FSM is often conceptually
simpler, it usually requires more states than a
Mealy FSM to implement the same function.
• A FSM does not have to be exclusively Mealy or
Moore. It can be a combination of both, having
some outputs (Mealy outputs) and other outputs
(Moore outputs).
10
11
FSM STATE DIAGRAMS
• A state diagram provides an abstract graphical
representation of the operation of FSM.
• It allows the conceptualization of the FSM’s
operation to be separated from its
implementation.
• Each individual state of the FSM is
represented by a state circle, with the state’s
name or its encoding located inside.
• Directed arcs show the possible transitions
from one state to another and under what
input conditions each transition will occur.
12
FSM STATE DIAGRAMS
A state diagram must have a reset state
13
FSM STATE DIAGRAMS
14
State Table
20
Two- Process FSM Templates
22
Positive Edge Detector State Diagram
23
Positive Edge Detector State Diagram
24
Positive Edge Detector State Diagram
28
29
30
31
32
Mealy FSM Edge Detector
33
34
35
36
37
COUNTERS AS MOORE FSMS
• A simple counter is a
special case of a
Moore FSM where
there are no inputs
(other than the clock
and reset) and the
outputs are taken
directly from the state
register.
38
2-bit Binary Counter FSM
39
Counter with state encoding defined by
constants
40
41
42
Finally….
?
Any Questions
43