Lec 11 Sequential Logic Circuits
Lec 11 Sequential Logic Circuits
Lec 11 Sequential Logic Circuits
Lec 11
Sequential CMOS Logic
Circuits
Sequential Logic
In
Combinational
Logic
circuit
Out
Memory
Sequential
The output is determined by
Current inputs
Previous inputs
Output = f(In, Previous In)
The regenerative behavior of sequential circuits is due to either a
direct or an indirect feedback connection between the output and
input
2
Bistable
3
Monostable
Astable
CMOS Digital Integrated Circuits
stable
unstable
C
stable
Vi1
Vo1
Vi1=Vo2
Energy
Vo2
Vi2
VDD
VDD
VOH
Vi2
Vo1
Vi1
Vo2
Vth
VOL
Vo1
Vo2
t
CMOS Digital Integrated Circuits
g m v g1 = C
ig1
vg1
dv g1
dt
dv g2
dt
id1
1
id2
ig2
2
vg2
q2 =
dq1
dt
q1 =
dq 2
dt
gm
d q1 g m
1
C g d q1
Cg
=
=
;
=
q1 =
q
q
1
2
2
2 1 0
dt
dt
g
gm
0
Cg
m
Cg
2
q (0 ) 0 q 1 ( 0 )
q 1 (t ) = 1
2
'
q (0 ) + 0 q 1 ( 0 )
+ 1
2
'
t
0
Vth
VOL
vo1
VOL
Vth
VOH
Phase-plane Representation
vo1: Vth VOH or VOL
vo2: Vth VOL or VOH
9
vo1(t)/vo1(0)et/0
Loop
vo2
loop 1
A1
loop 2
A2
loop n
vo1
Vth
An
et/0
vo2
VOL
10
Naming Conventions
Latch
Register
stores data when
clock rises
D Q
Clk
Clk
Clk
Clk
Q
Digital Integrated Circuits2nd
12
Latches
Positive Latch
In
Negative Latch
Out
In
CLK
clk
clk
In
In
Out
Out
Out
follows In
Out
CLK
Out
stable
Out
stable
Out
follows In
SR Latch Circuit
The two cross-coupled inverters can perform a simple memory
function of holding its state. However, the two-inverter circuit
alone has no provision for allowing its state to be changed
externally from one stable operating point to other.
In order to allow such a change of state, we need to add simple
switches which can be used to force or trigger the circuit from one
operating point to the other.
Q
S
R
NOR-based
SR Latch
Q
Q
Q
Schematic Diagram of SR Latch
14
M5
M8
M7
Q
S
15
M1
basic cross
coupled inverter
Q
M2
M3
M4
SR Latch Circuit
Truth Table
active high
S
0
1
0
1
R
0
0
1
1
Qn+1
Qn
1
0
0
Qn+1
Qn
0
1
0
Operation
Hold
Set
Reset
Not Allowed
SR Latch Circuit
Operation Modes of the Transistors
S
Qn+1 Qn+1
Operation
NMOS
PMOS
1
2
2
3
1
VOL VOH VOL1 VOH
M1
1, M2 off; M3, M4 on
1
2 1
M3
7, M8 off; M5, M6 on
VDD
M6
M5
VDD
M8
M1
basic cross
coupled inverter
M7
17
Q
M2
M3
M4
R
CMOS Digital Integrated Circuits
SR Latch Circuit
Transient Analysis
For transient analysis, we have to consider an event which results
in a state change, reset set, or set reset
In either case, we note that both of the output nodes undergo
simultaneous voltage transitions. One is from logic-low to logichigh, and the other is from logic-high to logic-low.
The exact transient analysis need to solve two coupled differential
equations.
For simplicity, we can assume that the two events take place in
sequence rather than simultaneously. (overestimation)
18
SR Latch Circuit
Transient Analysis (Cont.)
Assuming that the latch is initially reset and that a set operation is
being performed, the rise time associated with node Q can be
estimated as
rise,Q(SR-latch) = fall,Q(NOR2) + riseQ(NOR2)
VDD
VDD
Q M2 on
Q
S
0 1
19
M1
Q
M2
CQ
CQ
M3
M4
rise,Q(NOR2)
R
1 0
SR Latch Circuit
NAND-based (active low signals)
VDD
VDD
basic cross
coupled inverter
active low
20
Qn+1
Qn+1
Operation
Not Allowed
Set
Reset
Qn
Qn
Hold
CMOS Digital Integrated Circuits
Clocked SR Latch
SR Latch
CK
Q
R
When CK=0, S, R have no influence of Q, Q Hold
Set State: CK=1, S=1, R=0 Qn+1=1, Qn+1=0
Reset State: CK=1, S=0, R=1 Qn+1=0, Qn+1=1
Not Allowed: CK=1, S=1, R=1
21
Active High
AOI-based Implementation of
Clocked NOR-based SR Latch
The AOI-based implementation need a very small transistor count,
compared with the circuit consisting of two AND2 and two NOR2 gates
NOR-based: 20 transistors
NOR SR
AOI-based: 12 transistors
VDD
CK
VDD
Q
S
M1
CK
22
M1
Latch
Q
M2
M3
M4
R
CK
CK
CK
Qn+1
Qn+1
Hold
Qn
Qn
Set
Reset
Not Allow
Glitch
S
R
Q
Glitch Free Q
When Glitch ON S (or R) occurs during CK = 1, Q is set (or reset).
Level Sensitive: When CK = 1, any changes in S, R will effect Q.
23
CK
Q
R
When CK = 1, S and R have no influence of Q and Q Hold
Operation
24
CK
Qn+1
Qn+1
Hold
Qn
Qn
Set
Reset
Not Allow
0
CMOS Digital Integrated Circuits
Q
M2
M1
CK
NAND
SR Latch
VDD
Q
M4
M3
CK
Synchronous operation
Level sensitive (any changes in S and R as CK=1 will be reflected onto outputs)
Not allowed input sequence
25
Clocked JK Latch
NAND SR
J
CK = 0 hold
CK = 1 active
CK
26
K
No not-allowed
input combination
CK = 1
Qn
Qn
0
0
0
0
0
1
1
0
1
1
1
1
0
1
1
0
Hold
Hold
0
0
1
1
0
1
1
0
1
1
1
0
0
0
1
1
Reset
Reset
1
1
0
0
0
1
1
0
0
1
1
1
1
1
0
0
Set
Set
1
1
1
1
0
1
1
0
0
1
1
0
1
0
0
1
Toggle
Toggle
OSC
AOI-based Implementation of
NOR-based Clocked JK Latch (1/2)
NAND SR
S
J
CK
K
Q
R
Q
NOR SR
S
J
CK
K
S
J
Q
R
CK
K
27
AOI-based Implementation of
NOR-based Clocked JK Latch (2/2)
The AOI-based implementation has a very small transistor count,
and a more compact circuit compared to all-NAND realization.
VDD
VDD
CK
J
CK
28
CK
JK Toggle Switch
J =K=1
J=1
CK
K=1
CK
JK
Latch
Q
Q
T1
Q
Iff JKP > T1 (awkward to implement)
Output Q changes only once per clock period
No not allowed input
Timing issues
Level sensitive
29
Master-Slave Flip-Flop
J
CK
K
S NAND
R
SR
Qm
Qm
S NAND
R
SR
Qs
Qs
CK
Two cascaded latches operating on opposite clock phases insures
that the flip-flop is never transparent; i.e., a change occurring in
the primary inputs is never reflected directly to the outputs.
Eliminates oscillations when J = K =1.
Still level sensitive.
Number of transistors:
NAND-based: 36
AOI-based: 28
30
D-Latch
D-latch is obtained by modifying the clocked NOR-based SR latch
circuit. The circuit has a single input D which is connected to S
input, and D is also inverted and connected to R input.
The applications of D-latch are primarily for temporary storage of
data or as a delay element.
SR Latch
D
Q
CK
Q
If CK=1 Qn+1 = D
If CK=0 Qn+1 = Qn
31
D-Latch (Cont.)
D-latch is a mux-based latch which can be represented as
1
D
0
CK
Q=CKQ+CKIn
Negative latch
(transparent when CK= 0)
32
Q
D
1
CK
Q=CKQ+CKIn
Positive latch
(transparent when CK= 1)
CMOS Digital Integrated Circuits
D-Latch
Implementation with Transmission Gates
Transmission gate D-latch: Use switch-like properties of
transmission gates
CK
CK
D
CK
D-Latch
Implementation with Three-State
Q
CK = 1
Q
CK = 0
VDD
VDD
CK
CK
D
CK
34
CK
D-Latch
Implementation with Three-State (Cont.)
The first three-state inverter acts as the input switch. Accept the input
signal when CK is high, the second three-state inverter is at its high
impedance state, and Q = D.
The first three-state inverter is inactive when the CK goes low, and the
second three-state inverter completes the two-inverter loop, which
preserves its state (Qn+1 = Qn)
VDD
VDD
VDD
CK
CK
D
CK
35
CK
D-Latch
Setup Time and Hold Time
CK
tsetup
thold
Q
tclock-to-Q
Tsetup: time before the negative-CK edge the D-input has to be stable
The setup time is the delay between the data input of the register and the
storage element. As the data takes a finite time to travel to the storage
point, the clock cannot be changed until the correct data value appears.
Thold: time after the negative-CK edge D-input has to remain stable
The hold time relates to the delay between the clock input to the register
and the storage element. That is, the data has to be held for this period
while the clock travels to the point of storage.
Tclock-to-Q: Delay from the negative-CK edge to new value of Q output
36
Q
CK
Q
CK=0
D
CK
Q
CK=1
D
D
CK
Positive D-Latch
CK
Q
Q
CK=1
D
CK
D
CK
37
Q
CK=0
D
CMOS Digital Integrated Circuits
positive level-sensitive
Slave
CK
CK
Qm
CK
Qm
Qs
Qs
CK
D
CK
CK
For CK=0
Qm
For CK=1
D
38
Qm
39
40
D Flip-Flop
Clock Skew Issues
In a TG or three-state implemented flip-flop, if CK and CK changes
are skewed (misaligned) enough, then a change in Master can
immediately propagate into Slave violating the master-slave (edgetriggered) concept.
If global or shared drivers used, can use the following to reduce skew:
CK
CK IN
0
CK
1
For the global case, skew can also arise due to interconnect delay.
41
Non-Bistable Sequential
Schmitt Trigger
The Schmitt trigger has an inverter-like voltage transfer
characteristic, but with two different threshold voltages for
increasing and decreasing input signals.
In
Out
VOH
Vout
VOL
VM
VM+
Vin
Vout
VM+
VM
t0
Vout
VOH
t0 + tp
VOL
VM
43
VM+
Vin
Schmitt Trigger
The Circuit(1)
VDD
M2
Vin
M4
Vout
M1
M3
44
2.5
2.0
2.0
VM1
Vout
1.5
Vout
1.5
1.0
1.0
VM2
k= 1
k=3
0.5
0.0
0.0
0.5
0.5
1.0
1.5
Vin (V)
2.0
2.5
(kM1+kM3)/kM2
45
k= 2
k=4
0.0
0.0
0.5
1.0
1.5
Vin (V)
2.0
2.5
Schmitt Trigger
The Circuit(2)
VDD
M4
M6
M3
In
Out
M2
M5
VDD
M1
Multivibrator Circuits
R
S
Bistable Multivibrator
flip-flop, Schmitt Trigger
T
Monostable Multivibrator
one-shot
Astable Multivibrator
oscillator
Digital Integrated Circuits2nd
47
Transition-Triggered Monostable
In
DELAY
td
Out
td
N-1
Ring Oscillator
3.0
2.5
V1 V3 V5
Volts
2.0
1.5
1.0
0.5
0.0
20.5
0.0
0.5
1.0
1.5
time (ns)