Shankar Balachandran* Associate Professor, CSE Department Indian Institute of Technology Madras
*Currently a Visiting Professor at IIT Bombay
Digital Circuits and Systems
Spring 2015 Week 6 Module 31
State Machines 3: State Minimization
Systems State Machines 3: State Minimization Shankar Balachandran* - - PowerPoint PPT Presentation
Spring 2015 Week 6 Module 31 Digital Circuits and Systems State Machines 3: State Minimization Shankar Balachandran* Associate Professor, CSE Department Indian Institute of Technology Madras *Currently a Visiting Professor at IIT Bombay
Shankar Balachandran* Associate Professor, CSE Department Indian Institute of Technology Madras
*Currently a Visiting Professor at IIT Bombay
State Machines 3: State Minimization
Analysis and Design of Sequential Logic Circuits 2
Design a state machine to control tail lights of a car. On each
Inputs:
Outputs: (LC, LB, LA) and (RA, RB, RC) Operation:
1234
DFF
LC LB LA RA RB RC LEFT RIGHT HAZ
Analysis and Design of Sequential Logic Circuits 3
Condition of each tail lamp defines a unique state Use Moore machine since outputs are solely determined by the state.
Input bit order:
L R H
Output bit order: LC LB LA RA RB RC
000
IDLE 000 000
XXX 100 001 000 L1 XX0 011 000 L2 XX0 111 000 L3 XX0 XX0 XXX 010 000 100 R1 000 110 R2 000 111 R3 111 111
H1
XX1 XXX XX1 XX1 XX1 XX1
000 001 011 010 100 101 111 110
State Encoding
Analysis and Design of Sequential Logic Circuits 4
Inputs Present State FF Inputs Next State Outputs (Moore outputs) L R H Q2 Q1 Q0 D2 D1 D0 Q2* Q1* Q0* LC LB LA RA RB RC (IDLE) (IDLE) 1 (IDLE) 1 1 (L1) 1 (IDLE) 1 1 1 1 (R1) X X 1 (IDLE) 1 1 (H1) X X 1 (L1) 1 1 1 1 (L2) 1 X X 1 1 (L1) 1 1 (H1) 1 X X 1 1 (L2) 1 1 (L3) 1 1 X X 1 1 1 (L2) 1 1 (H1) 1 1 X X X 1 (L3) (IDLE) 1 1 1 X X 1 1 (R1) 1 1 1 1 1 1 (R2) 1 X X 1 1 1 (R1) 1 1 (H1) 1 X X 1 1 1 (R2) 1 1 1 1 (R3) 1 1 X X 1 1 1 1 (R2) 1 1 (H1) 1 1 X X X 1 1 (R3) (IDLE) 1 1 1 X X X 1 (H1) (IDLE) 1 1 1 1 1 1
Analysis and Design of Sequential Logic Circuits 5
2 2 2 1 2 1 1 1 2 1 2 1
2 1 2 2 1 2 1 2 1 2 1 2 1
2 1 2 2 1 2 1 2 2
Analysis and Design of Sequential Logic Circuits 6
1.
2.
Analysis and Design of Sequential Logic Circuits 7
Analysis and Design of Sequential Logic Circuits 8
Present State Next State Output x = 1 x = 0 x = 1 x = 0 1 1 3 2 2 3 3 5 4 1 4 5 1 5 5 6 1 6 5 1 4 3 3
Present State Next State Output x = 1 x = 0 x = 1 x = 0 1 1 3 2 2 3 3 3 4 1 4 3 1
Analysis and Design of Sequential Logic Circuits 9
Analysis and Design of Sequential Logic Circuits 10
If there are 2m states in a sequential machine we need m
Reduction in the number of states may or may not result
Determination of equivalent states can be done using a
Analysis and Design of Sequential Logic Circuits 11
1.
Using a table of present states, next states and outputs, construct an implication table as follows:
Each state is associated with a column and a row, i.e., list all states except
the first in rows and all except the last in columns. Each cell in this table corresponding to the intersection of a row and column represents two states being tested for equivalence.
2.
Based on condition 1 for equivalent states place a cross in the cells corresponding to those state pairs whose outputs are not equal for every input.
3.
In each remaining cell, place the pairs of next states whose equivalence is “implied” by the two states corresponding to the cell, i.e., states in each state pair must be equivalent in order for the states labeling the row and column to be equivalent.
4.
Make successive passes through the entire table to determine if any more cells should be crossed off. Repeat this procedure until no additional cells can be crossed off.
Analysis and Design of Sequential Logic Circuits 12
Analysis and Design of Sequential Logic Circuits 13
Implication Table
D-F
A ≡ H D ≡ G
Analysis and Design of Sequential Logic Circuits 14
Original State Diagram Reduced State Diagram
Analysis and Design of Sequential Logic Circuits 15
Present State Next State Out x = 1 x = 0 A C D B H F C D E 1 D E A E A C 1 F B F 1 G H B H G C 1
Intro to State Machines 18