Lecture 11: Synchronous Sequential...
Transcript of Lecture 11: Synchronous Sequential...
Lecture 11: Synchronous Sequential Logic
Aby K George, ECE Department, Wayne State University
Syed M. Mahmud, Ph.DECE Department
Wayne State University
Contents
• Characteristic equations
• Analysis of clocked sequential circuits
• State equation, state table and state diagram
• State reduction and assignment
• Design procedure
Chapter 5 ECE 2610 – Digital Logic 1 2
Characteristic Tables
Chapter 5 ECE 2610 – Digital Logic 1 3
Characteristic Equations
𝑄+ = 𝑆 + 𝑅′𝑄
Chapter 5 ECE 2610 – Digital Logic 1 4
𝑄+ = 𝐽𝑄′ + 𝐾′𝑄 𝑄+ = 𝐷 𝑄+ = 𝑇⊕𝑄
Analysis of Clocked Sequential Circuits
• Obtaining a table or diagram for the time sequence of inputs, outputs, and internal states.
• Write the Boolean expression that describe the behavior of the sequential circuit.
• Draw the logic diagram with flip-flops and clock inputs.
• Logic diagram may or may not include the combinational circuits.
Chapter 5 ECE 2610 – Digital Logic 1 5
State Equation
• Transition equation
• Specifies next state as a function of present state and inputs.
• Example:𝐴 𝑡 + 1 = 𝐴 𝑡 𝑥 𝑡 + 𝐵 𝑡 𝑥(𝑡)
𝐵 𝑡 + 1 = 𝐴′ 𝑡 𝑥 𝑡
• Output equation
𝑦 𝑡 = 𝐴 𝑡 + 𝐵 𝑡 𝑥′(𝑡)
Chapter 5 ECE 2610 – Digital Logic 1 6
State Table
• Time sequence of inputs, outputs, and flip-flops in a tabular form
• Also called transition table
Chapter 5 ECE 2610 – Digital Logic 1 7
𝐴 𝑡 + 1 = 𝐴𝑥 + 𝐵𝑥𝐵 𝑡 + 1 = 𝐴′𝑥
𝑦 𝑡 = 𝐴 + 𝐵 𝑥′
State Diagram
• Graphical representation of state table
Chapter 5 ECE 2610 – Digital Logic 1 8
Analysis with D Flip-flop
• Draw the state diagram for the following state equation
𝐷𝐴 = 𝐴⊕ 𝑥 ⊕ 𝑦 or 𝐴 𝑡 + 1 = 𝐴⊕ 𝑥 ⊕ 𝑦
Chapter 5 ECE 2610 – Digital Logic 1 9
Mealy and Moore Models of Finite State Machines• Finite State Machine (FSM)
Chapter 5 ECE 2610 – Digital Logic 1 10
State Reduction
• Reduction in number of flip-flops in a sequential circuit.
• 𝑚- flip-flops can produce 2𝑚 states.
• Two states are said to be equivalent, if for each member of the set of inputs, they give exactly same output and send the circuit either to the same stare or to an equivalent state.
Chapter 5 ECE 2610 – Digital Logic 1 11
State Reduction
Chapter 5 ECE 2610 – Digital Logic 1 12
Design Procedure
1. From the word description and specifications of the desired operation, derive a state diagram for the circuit.
2. Reduce the number of states if necessary.
3. Assign binary values to the states.
4. Obtain the binary-coded state table.
5. Choose the type of flip-flops to be used.
6. Derive the simplified flip-flop input equations and output equations.
7. Draw the logic diagram.
Chapter 5 ECE 2610 – Digital Logic 1 13
Excitation Tables for Flip Flops1. Excitation tables are needed to design a sequential system.
2. These tables can be derived from the characteristic tables of Flip Flops.
Chapter 5 ECE 2610 – Digital Logic 1 14
S R Q Q+
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 X
1 1 1 X
Q Q+ S R
0 0 0 X
0 1 1 0
1 0 0 1
1 1 X 0
Characteristic Table for S-R Flip Flop Excitation Table for S-R Flip Flop
Excitation Table for J-K Flip Flop
Chapter 5 ECE 2610 – Digital Logic 1 15
J K Q Q+
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
Q Q+ J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
Characteristic Table for J-K Flip Flop Excitation Table for J-K Flip Flop
Excitation Tables for D and T Flip Flops
Chapter 5 ECE 2610 – Digital Logic 1 16
D Q Q+
0 0 0
0 1 0
1 0 1
1 1 1
Q Q+ D
0 0 0
0 1 1
1 0 0
1 1 1
Characteristic Table for D Flip Flop Excitation Table for D Flip Flop
T Q Q+
0 0 0
0 1 1
1 0 1
1 1 0
Q Q+ T
0 0 0
0 1 1
1 0 1
1 1 0
Characteristic Table for T Flip Flop Excitation Table for T Flip Flop
Example: State diagram from description
• Draw the state diagram for a Moore Machine that detects a sequence of three or more consecutive 1’s in a stream of bits coming through an input line.
Chapter 5 ECE 2610 – Digital Logic 1 17
Design Example 1: Sequence Detector using D Flip-flop
Chapter 5 ECE 2610 – Digital Logic 1 18
Design Example 1: Sequence Detector using D Flip-flop
Chapter 5 ECE 2610 – Digital Logic 1 19
Design Example 2: Sequential circuit using JK Flip-flop
Chapter 5 ECE 2610 – Digital Logic 1 20
Design Example 2: Sequential circuit using JK Flip-flop
Chapter 5 ECE 2610 – Digital Logic 1 21
Design Example 3: Counter using T Flip-flop
Chapter 5 ECE 2610 – Digital Logic 1 22
Design Example 3: Counter using T Flip-flop
Chapter 5 ECE 2610 – Digital Logic 1 23
00 01 11 10
0 1
1 1 1 1
Design Example 4: Implement X Flip-flop using Y Flip-flop• Design JK flip-flop using T flip-flop
Chapter 5 ECE 2610 – Digital Logic 1 24
J K T
0 0 0 0 0
0 0 1 1 0
0 1 0 0 0
0 1 1 0 1
1 0 0 1 1
1 0 1 1 0
1 1 0 1 1
1 1 1 0 1
𝐽
𝐾𝑄𝑛
𝐽
𝐾
𝑄𝑛
𝑚0 𝑚1 𝑚3 𝑚2
𝑚6𝑚7𝑚5𝑚4
𝑇
𝑇 = 𝐾𝑄𝑛 + 𝐽𝑄𝑛′
Summary
• How to find the characteristic table, characteristic equation, and excitation table for a flip-flop
• How to implement a state table, state equation, or state diagram using different flip-flops?
• What are the design procedure for a state machine ?
• What are the differences between Mealy and Moore FSM ?
• How to do the state reduction ?
• How to design one Flip-flop using other flip-flop ?
Chapter 5 ECE 2610 – Digital Logic 1 25
Homework – 5
• 5.2
• 5.4
• 5.6
• 5.9
• 5.12
• 5.18
• 5.20
Chapter 5 ECE 2610 – Digital Logic 1 26