SCLD-M9-Synthesis Minimization FSM
SCLD-M9-Synthesis Minimization FSM
Module 9
Synthesis and Minimization of Finite State Machines
Introduction
1
3/27/25
2
3/27/25
3
3/27/25
Pictorial Depiction
PI NS NS Output Mealy
F/F PS PO
Logic Logic Machine
PI NS NS PS Output Moore
F/F PO
Logic Logic Machine
4
3/27/25
10
5
3/27/25
11
12
6
3/27/25
Example 1
• There are three lamps, RED, GREEN and YELLOW, that should glow cyclically with
a fixed time interval (say, 1 second).
• Some observations:
• The FSM will have three states, corresponding to the glowing state of the lamps.
• The input set is null; state transition will occur whenever clock signal comes.
• This is a Moore Machine, since the lamp that will glow only depends on the state and not on
the inputs (here null).
13
PS NS, Z
RED GREEN, 010
φ/010 RED φ/100
GREEN YELLOW, 001
φ/001 YELLOW RED, 100
GREEN YELLOW
State Table
State Transition Diagram
14
7
3/27/25
Example 2
• Design of a serial parity detector.
• A continuous stream of bits is fed to a circuit in synchronism with a clock. The circuit will be
generating a bit stream as output, where a 0 will indicate “even number of 1’s seen so far”
and a 1 will indicate “odd number of 1’s seen so far”.
• This is also a Moore Machine.
0/0 0/1
1/1
X
Z EVEN ODD
clk
Initial 1/0
state
15
NS, Z
PS
0/0 0/1 X=0 X=1
1/1
EVEN EVEN, 0 ODD, 1
EVEN ODD ODD ODD, 1 EVEN, 0
1/0
State Transition Diagram State Table
16
8
3/27/25
Example 3
17
reset
1/0
1/0 0/0
0/0 1/0 1/0
S0 S1 S2 S3
0/0
reset 0/1
18
9
3/27/25
Example 4
• A 2-bit serial adder which takes two serial bit streams X1 and X2 as inputs, and
generates a serial bit stream Z as output.
00/0 01/0
01/1 10/0
10/1 11/0 11/1
X1
X2 Z A B
clk 00/1
19
01/0 NS, Z
00/0
10/0 PS
01/1 X = 00 X = 01 X = 10 X = 11
10/1 11/0 11/1
A A, 0 A, 1 A, 1 B, 0
A B
B A, 1 B, 0 B, 0 B, 1
00/1
State Transition Diagram State Table
20
10
3/27/25
Example 5
• A 3-bit binary counter that counts in the sequence 000, 001, 010, 011, 100, 101,
110, 111, and then back again to 000.
PS NS, Z
φ/000
S0 S7 S0 S1, 001
φ/001 φ/111 S1 S2, 010
S1 S6 S2 S3, 011
φ/010 φ/110 S3 S4, 100
S2 S5 S4 S5, 101
φ/011 φ/101 S5 S6, 110
S6 S7, 111
S3 S4
φ/100 S7 S0, 000
Switching Circuits and Logic Design (CS20202) 21
21
Example 6
• A 4-bit counter that counts in the sequence 0000, 0011, 0110, 1100, 1001, 1010,
and then back again to 0000. If the counter starts with any of the other states, it
will go to 0000 at the next clock.
S0 S3 S6 S12 S9 S10
φ/0011 φ/0110 φ/1100 φ/1001 φ/1010
22
11
3/27/25
FSM Synthesis
23
FSM Synthesis
• We have seen how the state transition diagram / state table can be
constructed from the problem description.
• To construct the circuit, the following further steps are required:
• Assign unique binary code to each state: state assignment.
• Construct the transition/output table.
• Select type of memory elements: SR or JK or D or T, and construct excitation table.
• Obtain the excitation and output functions, and minimize them.
• Realize the functions using gates or any other combinational circuit modules.
• We shall illustrate the process with examples.
24
12
3/27/25
00/0 01/0
10/0
NS, Z
01/1 PS
10/1 11/0 11/1 X = 00 X = 01 X = 10 X = 11
A B A A, 0 A, 1 A, 1 B, 0
00/1 B A, 1 B, 0 B, 0 B, 1
25
• State assignment:
• Two states, and so one bit is sufficient.
• Suppose we assign 0 for state A, and 1 for state B.
NS, Z PS NS Output Z
PS
X = 00 X = 01 X = 10 X = 11 X1X2 00 01 10 11 00 01 10 11
0 0, 0 0, 1 0, 1 1, 0 0 0 0 0 1 0 1 1 0
1 0, 1 1, 0 1, 0 1, 1 1 0 1 1 1 1 0 0 1
26
13
3/27/25
27
X1X2 X1X2 X1
Z
y 00 01 11 10 y 00 01 11 10 X2
0 1 0 1 1
1 11 1 1 1 1 1 1
y Y
Y = X1X2 + X1y + X2y Z = X1 Å X2 Å y
y NS (Y) Output Z
00 01 10 11 00 01 10 11
0 0 0 0 1 0 1 1 0
1 0 1 1 1 1 0 0 1
28
14
3/27/25
29
X1 1 0 1 1 1 1 0 0 1
Z
X2 Transition/output Table
y SR Output Z
S
00 01 10 11 00 01 10 11
y R
0 0X 0X 0X 10 0 1 1 0
1 01 X0 X0 X0 1 0 0 1
Excitation and Output Function
30
15
3/27/25
X1X2 X1X2 X1
Z
y 00 01 11 10 y 00 01 11 10 X2
0 1 0 1 1
S
1 X X X 1 1 1 1
y R
S = X1X2’ Z = X1 Å X2 Å y
X1X2
y 00 01 11 10 y SR Output Z
0 X X X 00 01 10 11 00 01 10 11
1 1 1 0 0X 0X 0X 10 0 1 1 0
1 01 X0 X0 X0 1 0 0 1
R = X1’X2’
Excitation and Output Function
Switching Circuits and Logic Design (CS20202) 31
31
32
16
3/27/25
1/0
1/0 0/0
0/0 1/0 1/0
S0 S1 S2 S3
0/0
0/1
33
PS NS Output Z y1y2 T1 T2 Z
X=0 X=1 X=0 X=1 X=0 X=1 X=0 X=1
00 01 00 0 0 00 01 00 0 0
01 01 10 0 0 01 00 11 0 0
10 01 11 0 0 10 11 01 0 0
11 01 00 1 0 11 10 11 1 0
34
17
3/27/25
y1y2 T1 T2 Z
X=0 X=1 X=0 X=1
00 01 00 0 0
01 00 11 0 0
10 11 01 0 0
11 10 11 1 0
T1 = X’ y1 + X y2 T2 = X’ y2’ + y1 y2’ + X y2 Z = X’ y1 y2
35
PS NS Output Z y1y2 J1 K1 J2 K2 Z
X=0 X=1 X=0 X=1 X=0 X=1 X=0 X=1
00 01 00 0 0 00 0X 1X 0X 0X 0 0
01 01 10 0 0 01 0X X0 1X X1 0 0
10 01 11 0 0 10 X1 1X X0 1X 0 0
11 01 00 1 0 11 X1 X0 X1 X1 1 0
36
18
3/27/25
y1y2 J1 K1 J2 K2 Z
X=0 X=1 X=0 X=1
00 0X 1X 0X 0X 0 0
01 0X X0 1X X1 0 0
10 X1 1X X0 1X 0 0
11 X1 X0 X1 X1 1 0
37
19