Professional Documents
Culture Documents
Sequential Circuits
Chapter 5 - Part 1 1
Overview
Chapter 5 - Part 1 2
Introduction to Sequential Circuits
Inputs Outputs
Combina-
A Sequential tional
circuit contains: Storage
Logic
Elements
• Storage elements:
Latches or Flip-Flops Next
State State
• Combinational Logic:
Implements a multiple-output
switching function
Inputs are signals from the outside.
Outputs are signals to the outside.
Other inputs, State or Present State, are
signals from storage elements.
The remaining outputs, Next State are
inputs to storage elements.
Chapter 5 - Part 1 3
Introduction to Sequential Circuits
Chapter 5 - Part 1 4
Introduction to Sequential Circuits
Inputs Outputs
Combina-
tional
Storage
Logic
Elements
Combinatorial Logic Next
• Next state function State State
Next State = f(Inputs, State)
• Output function
Outputs = g(Inputs, State)
• Output function
Outputs = h(State)
Output function type depends on specification and affects
the design significantly
Chapter 5 - Part 1 5
Types of Sequential Circuits
Chapter 5 - Part 1 6
Types of Sequential Circuits
Chapter 5 - Part 1 7
Gate Delay and Information Storage
Chapter 5 - Part 1 8
Information Storage
Chapter 5 - Part 1 11
LATCHES
Chapter 5 - Part 1 12
Basic (NOR) S – R Latch
Cross-coupling two
NOR gates gives the
S – R Latch:
Which has the time
sequence
behavior:
S = 1, R = 1 is
forbidden as
input pattern
Chapter 5 - Part 1 13
Basic (NOR) S – R Latch
Chapter 5 - Part 1 14
Latches
SR Latch S R Q0 Q Q’
Q = Q0
0 0 0 0 1
0 0
R Q
S Q
0 1
Initial Value
0 1
R Q
S Q
0 0
0 0 1 1 0
Q=0
0 1 0 0 1
1 0
R Q
S Q
0 1
0 0 1 1 0
Q=0
0 1 0 0 1
1 1 Q=0
R Q
0 1 1 0 1
S Q
0 0
0 0 1 1 0
0 1 0 0 1 Q=0
0 0
R Q
0 1 1 0 1
Q=1
1 0 0 1 0
S Q
1 1
0 0 1 1 0
0 1 0 0 1 Q=0
0 1
R Q
0 1 1 0 1
Q=1
1 0 0 1 0
1 0 1 1 0 Q=1
S Q
1 0
0 0 1 1 0
0 1 0 0 1 Q=0
1 0
R Q
0 1 1 0 1
1 0 0 1 0 Q=1
1 0 1 1 0
Q = Q’
1 1 0 0 0
S Q
1 10
0 0 1 1 0
0 1 0 0 1 Q=0
1 10
R Q
0 1 1 0 1
1 0 0 1 0 Q=1
1 0 1 1 0
Q = Q’
1 1 0 0 0
Q = Q’
1 1 1 0 0
S Q
1 0
S Q 1 1 Q=Q’=0
S S R Q
Q Invalid
0 0 Q=Q’=1
Set
0 1 1 Reset
1 0 0 No change
R Q
1 1 Q0
Eastern Mediterranean University
23
Latches
SR Latch
S R Q
R Q Q0 No change
0 0
Reset
0 1 0 Set
1 0 1 Invalid
S Q 1 1 Q=Q’=0
“Cross-Coupling”
two NAND gates gives
the S -R Latch:
Which has the time
sequence behavior:
S = 0, R = 0 is
forbidden as
input pattern
Chapter 5 - Part 1 25
Basic (NAND) S – R Latch
Chapter 5 - Part 1 26
Basic (NAND) S – R Latch
S S’ R’ Q
Q Invalid
0 0 Q=Q’=1
Set
0 1 1 Reset
1 0 0 No change
R Q
1 1 Q0
Chapter 5 - Part 1 27
Clocked S - R Latch
Chapter 5 - Part 1 28
Clocked S - R Latch (continued)
Chapter 5 - Part 1 29
D Latch – Clocked or controlled D
Latch
To Eliminate undesirable undefined state.
Ensure that s and R and
Adding an inverter to the S-R Latch, gives the
D Latch:
Note that there are no
indeterminate/Undefined”
states!
C=0 both inputs are 1 and circuit cannot
change state.
Chapter 5 - Part 1 30
D Latch
Chapter 5 - Part 1 31
D Latch
D Latch (D = Data) Timing Diagram
C
D S
Q
D
C
R Q
Q
t
C D Q
Output may change
0 x Q0 No change
Reset
1 0 0 Set
1 1 1
C
D S
Q
D
C
R Q
Q
0 x Q0 No change
Reset
1 0 0 Set
1 1 1
Chapter 5 - Part 1 34
The Latch Timing Problem
Clock C Q
Suppose that initially Y = 0.
Clock
Y
As long as C = 1, the value of Y continues to change!
The changes are based on the delay present on the loop
through the connection from Y back to Y.
This behavior is clearly unacceptable.
Desired behavior: Y changes only once per clock pulse
Chapter 5 - Part 1 36
The Latch Timing Problem (continued)
Chapter 5 - Part 1 38
JK Master Slave Flip Flop
Chapter 5 - Part 1 39
Flip-Flop Problem
The change in the flip-flop output is delayed by
the pulse width which makes the circuit slower or
Master Slave Flip Flop also Called Pulse
Triggered Flip Flop ; can respond to input values
that can cause a change in state and occur
anytime during the pulse
Chapter 5 - Part 1 40
Flip Flop Problem
Chapter 5 - Part 1 41
Flip-Flop Solution
Chapter 5 - Part 1 42
Flip-Flops solutions
Controlled latches are level-triggered
Master Slave
CLK
CLK
QSlave
Eastern Mediterranean University
45
Positive-Edge Triggered D Flip-Flop
Formed by D D Q S Q
Q
adding inverter C
to clock input C C Q R Q Q
Chapter 5 - Part 1 46
Flip-FlopT
T Flip-Flop
T Q
T J Q
Q
K Q
D Q D Q(t+1)
0 0 Reset
Set
Q 1 1
J K Q(t+1)
J Q No change
0 0 Q(t) Reset
0 1 0 Set
1 0 1 Toggle
K Q
1 1 Q’(t)
T Q T Q(t+1)
0 Q(t) No change
Q Toggle
1 Q’(t)
Eastern Mediterranean University
48
Flip-Flop Characteristic Equations
D Q D Q(t+1)
0 0 Q(t+1) = D
Q 1 1
J K Q(t+1)
J Q 0 0 Q(t)
Q(t+1) = JQ’ + K’Q
0 1 0
K Q 1 0 1
1 1 Q’(t)
T Q T Q(t+1)
0 Q(t) Q(t+1) = T Q
Q
1 Q’(t)
Eastern Mediterranean University
49
Flip-Flop Characteristic Equations
Analysis / Derivation
J K Q(t) Q(t+1)
No change
0 0 0 0
J Q Reset
0 0 1 1
0 1 0 Set
K Q 0 1 1
Toggle
1 0 0
1 0 1
1 1 0
1 1 1
R R C C
Master-Slave:
(a) Latches
Postponed output S S D D
indicators C C
R R C C
Dynamic D D
indicator
C C
Triggered D Triggered D
(c) Edge-Triggered Flip-Flops
Chapter 5 - Part 1 55
Sequential Circuit Analysis
General Model
Inputs Outputs
• Current State Combina-
at time (t) is tional
stored in an Storage Logic
array of Elements
Next
flip-flops. State State
• Next State at time (t+1)
is a Boolean function of CLK
State and Inputs.
• Outputs at time (t) are a Boolean function of
State (t) and (sometimes) Inputs (t).
Chapter 5 - Part 1 56
Analysis of Clocked Sequential
Circuits
The State
• State = Values of all Flip-Flops
x
Example D Q A
AB=00 Q
D Q B
CLK Q
57
Analysis of Clocked Sequential
Circuits
State Equations
x
D Q A
A(t+1) = DA
= A(t) x(t)+B(t) x(t)
=Ax +Bx Q
B(t+1) = DB
= A’(t) x(t)
= A’ x D Q B
y(t) = [A(t)+ B(t)] x’(t)
= (A + B) x’ CLK Q
58
Analysis of Clocked Sequential Circuits
1 0 0 0 0 1
1 0 1 1 0 0
A(t+1) = A x + B x
1 1 0 0 0 1
1 1 1 1 0 0 B(t+1) = A’ x
y(t) = (A + B) x’
t t+1 t
59
Analysis of Clocked Sequential
Circuits
State Table (Transition Table)
x
Present Next State Output D Q A
t t+1 t A(t+1) = A x + B x
B(t+1) = A’ x
y(t) = (A + B) x’
60
Analysis of Clocked Sequential Circuits
State Diagram Present Next State Output
State x=0 x=1 x=0 x=1
A B A B A B y y
AB input/output
0 0 0 0 0 1 0 0
0 1 0 0 1 1 1 0
0/0 1/0
1 0 0 0 1 0 1 0
0/1 1 1 0 0 1 0 1 0
00 10
x
D Q A
0/1
Q
1/0 0/1 1/0
D Q B
CLK Q
01 11
y
62
Analysis of Clocked Sequential
Circuits
JK Flip-Flops J Q A
Example: x K Q
1 1 0 0 1 1
0 1 1 1 0 0 0 0 0
1 0 0 0 0 1 1 1 1 A(t+1) = JA Q’A + K’A QA
1 1 1 0 0 0 = A’B + AB’ + Ax
1 0 1 B(t+1) = JB Q’B + K’B QB
= B’x’ + ABx + A’Bx’
1 1 0
1 1 1
Eastern Mediterranean University
63
Analysis of Clocked Sequential
Circuits
JK Flip-Flops J Q A
x K Q
Example:
Present Next Flip-Flop J Q B
I/P
State State Inputs
A B x A B JA KA JB KB K Q
0 0 0 0 1 0 0 1 0 CLK
0 0 0 0 0 1 1 0 1
0 0 1 1 1 1 1 1 0
0 1 0 1 0 1 0 0 1 00 11
1 1 0 0 1 1
0 1 1 1 0 0 0 0 0
0
1 0 0 0 0 1 1 1 1 0 0
1 1 1 0 0 0
1 0 1
1 1 0 01 10
1
1 1 1 1
Eastern Mediterranean University
64
Analysis of Clocked Sequential
Circuits
x A
T Flip-Flops T Q y
R Q
Example:
Present Next F.F
I/P O/P
State State Inputs T Q
B
A B x A B TA TB y
0 0 R Q
0 0 0 0 0 0
0 1 0 1 0
0 0 1 0 1 0 0 0 CLK Reset
0 1 0 1 0 1 1 0
1 0 0 0 0 TA = B x TB = x
0 1 1 1 1 0 1 0 y =AB
1 0 0 1 1 0 0 1
0 0 1 1 1 A(t+1) = TA Q’A + T’A QA
1 0 1 = AB’ + Ax’ + A’Bx
1 1 0 B(t+1) = TB Q’B + T’B QB
=x B
1 1 1
65
Analysis of Clocked Sequential
Circuits
x A
T Flip-Flops T Q y
R Q
Example:
Present Next F.F
I/P O/P
State State Inputs T Q
B
A B x A B TA TB y
0 0 R Q
0 0 0 0 0 0
0 1 0 1 0
0 0 1 0 1 0 0 0 CLK Reset
0 1 0 1 0 1 1 0 0/0 0/0
1 0 0 0 0
0 1 1 1 1 0 1 0 00
1/0 01
1 0 0 1 1 0 0 1
0 0 1 1 1 1/1 1/0
1 0 1
1 1 0 11 10
0/1 0/0
1 1 1 1/0
66