ECE 301 – Digital Electronics Sequential Logic Circuits: FSM Design (Lecture #19)
ECE 301 – Digital Electronicsece.gmu.edu/~clorie/Spring11/ECE-301/Lectures/Lecture_26.pdf ·...
Transcript of ECE 301 – Digital Electronicsece.gmu.edu/~clorie/Spring11/ECE-301/Lectures/Lecture_26.pdf ·...
ECE 301 – Digital Electronics
FSM Design Examples
(Lecture #26)
The slides included herein were taken from the materials accompanying
Fundamentals of Logic Design, 6th Edition, by Roth and Kinney,
and were used with permission from Cengage Learning.
Spring 2011 ECE 301 - Digital Electronics 2
Sequential Circuit Design1. Understand specifications
2. Draw state graph (to describe state machine behavior)
3. Construct state table (from state graph)
4. Perform state reduction (if necessary)
5. Assign a binary value to each state (state assignment)
6. Create state transition table
7. Select type of Flip-Flop to use
8. Derive Flip-Flop input equations and FSM output equation(s)
9. Draw circuit diagram
Spring 2011 3
FSM Design
Example #4:
Design a FSM to detect an even number of 1's and an odd number of 0's on an input bit stream (X).
The FSM should output a 1 when the specified conditions are met, and a 0 otherwise.
Requirements:
1. Moore machine2. Gray-code state-assignment3. SR Flip-Flops
Spring 2011 ECE 301 - Digital Electronics 5
Example #4: State Table
Present Next State Output
State X = 0 X = 1 X = 0 X = 1
Spring 2011 ECE 301 - Digital Electronics 7
Example #4: State Transition Table(using Gray-code state assignment)
A+B+ Z
AB X = 0 X = 1 X = 0 X = 1
Spring 2011 ECE 301 - Digital Electronics 8
Example #4: SR Excitation Table
Q Q+ S R
0 0 0 x
0 1 1 0
1 0 0 1
1 1 x 0
Spring 2011 ECE 301 - Digital Electronics 9
Example #4: State Transition Table
A+B+ SARA SBRB
AB X = 0 X = 1 X = 0 X = 1 X = 0 X = 1
(using Gray-code state assignment)
Spring 2011 14
FSM Design
Example #5:
Design a FSM to detect an even number of 1's and an odd number of 0's on an input bit stream (X).
The FSM should output a 1 when the specified conditions are met, and a 0 otherwise.
Requirements:
1. Moore machine2. Gray-code state-assignment3. D Flip-Flops
Spring 2011 ECE 301 - Digital Electronics 15
Example #5: State Transition Table(using Gray-code state assignment)
A+B+ DA DB
AB X = 0 X = 1 X = 0 X = 1 X = 0 X = 1
Spring 2011 19
FSM Design
Example #6:
Design a FSM to detect an even number of 1's and an odd number of 0's on an input bit stream (X).
The FSM should output a 1 when the specified conditions are met, and a 0 otherwise.
Requirements:
1. Moore machine2. Gray-code state-assignment3. T Flip-Flops
Spring 2011 ECE 301 - Digital Electronics 20
Example #6: T Excitation Table
Q Q+ T
0 0 0
0 1 1
1 0 1
1 1 0
Spring 2011 ECE 301 - Digital Electronics 21
Example #6: State Transition Table(using Gray-code state assignment)
A+B+ TA TB
AB X = 0 X = 1 X = 0 X = 1 X = 0 X = 1