You are on page 1of 14

Topic : types of FSM

Module : FSM
Two types of FSM
The instant of transition from the present to the next can be
completely controlled by a clock; additionally, changes in the
inputs may also dictate such transitions. FSMs can be broadly
classified into two categories –
 Moore machines and
 Mealy machines.
Moore machine
 Two aspects characterizes Moore machine :
 Next state of the output is decided fully by the present state.
 All changes in the output are brought about only at the active
edge of the clock. Hence the Moore machine is inherently
synchronous.

 Edge-triggered flip flops, synchronous counters , etc, are


typical example of Moore machines.

 Moore machine are also known as synchronous machine.


 Generate a state diagram from the problem statement.
 Minimize the number of states
 Select a binary encoding for the states.
 Generate an encoded state table.
 Select the memory device – T flip-flop or D flip-flop
 Generate a next-state K map for each memory device.
 Generate a K map for each output.
 Implement memory and combinational logic using PLAs or
other devices.
Example of sequence detector
 A sequence generator is to sequence through eight distinct
states. The states are represented by a set of four binary
variables – W, X, Y and Z. the states and the sequence are as
follows ( the 4 bits represent values of W, X, Y and Z,
respectively) :
1000  1100  0100  0110  0010  0011  0001
 1001  1000 …
Each transition is to take place at the positive edge of the clock.
Since the scheme has no external primary input to affect the
output, it is realized as a Moore machine.
Example 1 : solution
 A 3-bit state machine suffices to generate the eight
independent states specified.

Continued to next page….


Test Bench
Mealy Machine
 Mealy machine differs from the Moore machine at the output
stage.
 The inputs can affect the outputs directly in Mealy Machine.
 The changes in the input reflect as corresponding changes in
the outputs without the clock being directly involved : to that
extent the behavior is asynchronous.
 Counters with asynchronous preset and clear and shift
registers with preset are examples of Mealy machines.
 A Mealy machine has to respond to changes in input in
addition to the response to the active edges of the clock.

Example of Mealy machine
 A sequence generator is to have four binary outputs
designated W, X, Y, and Z. they are to follow either of two
sequences depending on the value of a Boolean variable A:
 If A = 0, the sequence to be followed is
1000  1100  0100  0110  0010  0011  0001 
1001  1000 …
where, W is the most significant bit and Z the least significant bit.
If A=1, the sequence to be followed is : 1001  0001  0011 
0010  0110  0100  1100  1000  1001 ….
Example 2 : Solution
Example 2 : Solution
Diagram for Moore & mealy machine

Moore machine Mealy machine

You might also like