Lecture 5 Sequential Circuit
Lecture 5 Sequential Circuit
Chapter 5
5-1 Introduction
Combinational circuits
contains no memory elements
the outputs depends on the inputs
a feedback path
the state of the sequential circuit
(inputs, current state) Þ (outputs, next state)
synchronous: the transition happens at discrete
instants of time
asynchronous: at any instant of time
Fig. 5.4
SR latch with NAND gates
S_ 1/S'
0/1
R_ 1/R'
Fig. 5.5
SR latch with control input
Digital Circuits 5-8
D Latch
eliminate the undesirable conditions of the
indeterminate state in the RS flip-flop
D: data
gated D-latch
D Þ Q when En=1; no change when En=0
S_ 1/D'
0/1
R_ 1/D
Fig. 5.6
D latch
Digital Circuits 5-9
Fig. 5.7
Graphic symbols for latches
Fig. 5.8
Clock response in latch and flip-flop
Digital Circuits 5-11
If level-triggered flip-flops are used
the feedback path may cause instability problem
Edge-triggered flip-flops
the state transition happens only at the edge
eliminate the multiple-transition problem
Fig. 5.9
Master-slave D flip-flop
Digital Circuits 5-13
CP = 1: (S,R) Þ (Y,Y'); (Q,Q') holds
CP = 0: (Y,Y') holds; (Y,Y') Þ (Q,Q')
(S,R) could not affect (Q,Q') directly
the state changes coincide with the negative-edge
transition of CP
Fig. 5.10
D-type positive-edge-
triggered flip-flop Digital Circuits 5-15
three basic flip-flops
(S,R) = (0,1): Q = 1
(S,R) = (1,0): Q = 0
(S,R) = (1,1): no operation
(S,R) = (0,0): should be avoided
Fig. 5.10
D-type positive-edge-
triggered flip-flop
Digital Circuits 5-16
Digital Circuits 5-17
The setup time
D input must be maintained at a constant value prior to the
application of the positive CP pulse
The hold time
D input must not changes after the application of the positive
CP pulse
50% VH 50% VH
Fig. 5.11
Graphic symbols for edge-
triggered D flip-flop Digital Circuits 5-20
JK flip-flop
Fig. 5.13
T flip-flop
D = T⊕Q = TQ'+T'Q
T=0: D=Q, no change
T=1: D=Q' Þ Q=Q'
Fig. 5.14
D flip-flop with asynchronous reset
Digital Circuits 5-25
5-5 Analysis of Clocked Sequential Ckts
A sequential circuit
(inputs, current state) Þ (output, next state)
a state transition table or state transition diagram
Fig. 5.15
Example of sequential circuit
Digital Circuits 5-26
State equations
A(t+1) = A(t)x(t) + B(t)x(t)
B(t+1) = A'(t)x(t)
A compact form
A(t+1) = Ax + Bx
B(t+1) = Ax
The output equation
y(t) = (A(t)+B(t))x'(t)
y = (A+B)x'
A(t + 1) =Ax + Bx
B(t + 1) = Ax
y = Ax + Bx
Fig. 5.16
State diagram of the circuit
of Fig. 5.15
Fig. 5.17
Sequential circuit with D flip-flop
Digital Circuits 5-32
Analysis with JK flip-flops
Determine the flip-flop input function in terms of
the present state and input variables
Used the corresponding flip-flop characteristic
table to determine the next state
Fig. 5.18
Sequential circuit with JK
flip-flop
Digital Circuits 5-33
JA = B, KA= Bx'
JB = x', KB = A'x + Ax‘
derive the state table
A(t 1) JA K A
B (t 1) JB K B
Fig. 5.19
State diagram of the circuit of Fig. 5.18
Examples:
state a a b c d e d d e d e a
input 0 1 0 1 0 1 1 0 1 0 0
output 0 0 0 0 0 1 1 0 1 0 0
Digital Circuits 5-48
the checking of each pair of states for possible
equivalence can be done systematically (9-5)
the unused states are treated as don't-care
condition Þ fewer combinational gates
Fig. 5.26
Reduced State diagram
Digital Circuits 5-49
State assignment
to minimize the cost of the combinational circuits
three possible binary state assignments
Fig. 5.27
State diagram for
sequence detector
Digital Circuits 5-53
The flip-flop input equations
A(t+1) = DA(A,B,x) = S(3,5,7)
B(t+1) = DB(A,B,x) = S(1,5,7)
The output equation
y(A,B,x) = S(6,7)
Logic minimization using the K map
DA= Ax + Bx
DB= Ax + B'x
y = AB
Fig. 5.29
Logic diagram of
sequence detector
Digital Circuits 5-56
Excitation tables
A state diagram Þ flip-flop input functions
straightforward for D flip-flops
we need excitation tables for JK and T flip-flops
Fig. 5.30
Maps for J and K
input equations Digital Circuits 5-59
Fig. 5.31
Logic diagram for sequential
circuit with JK flip-flops
Digital Circuits 5-60
Synthesis using T flip-flops
A n-bit binary counter
the state diagram
Fig. 5.32
State diagram of three-
bit binary counter
no inputs (except for the clock input)
Fig. 5.34
Logic diagram of three-bit
binary counter
Digital Circuits 5-64