Professional Documents
Culture Documents
Ch7 Sequential
Ch7 Sequential
Sequential Circuits
Boonchuay Supmonchai
Integrated Design Application Research (IDAR) Laboratory
B.Supmonchai
Sequential Logic
B.Supmonchai
Sequential Logic
Inputs Outputs
COMBINATIONAL LOGIC
Current State
Q
Next state
State Register
CLOCK
Charge-Based DYNAMIC
3
Sequential Logic
B.Supmonchai
Static storage
preserve state as long as the power is on have positive feedback (regeneration) with an internal
Dynamic storage
store state on parasitic capacitors only hold state for short periods of time (milliseconds)
Sequential Logic
B.Supmonchai
Flipflops (edge-triggered)
edge sensitive circuits that sample the inputs on a clock
transition
positive edge-triggered: 0 1 negative edge-triggered: 1 0
built using latches (e.g., master-slave flipflops)
2102-545 Digital ICs
Sequential Logic
B.Supmonchai
Cascaded Inverters
Small deviation from bias point C (e.g., from noise) is amplified and regenerated around the circuit loop until either point A or B is reached If the gain in the transient region is larger than 1, only A and B are stable operation points. C is a metastable operation point.
6
C B Vi1 = Vo2
2102-545 Digital ICs
Sequential Logic
B.Supmonchai
The cross-coupling of two inverters results in a bistable circuit (a circuit with two stable states)
Vi1 Vi2
Have to be able to change the stored value by making A (or B) temporarily unstable by increasing the loop gain to a value larger than 1
done by applying a trigger pulse at Vi1 or Vi2 the width of the trigger pulse need be only a little larger than
the total propagation delay around the loop circuit (twice the delay of an inverter)
2102-545 Digital ICs
Sequential Logic
B.Supmonchai
Review: SR Latch
!Q
S 0
R 0
Q Q
!Q !Q
Action memory
1
R Q 0 1
0
1 1
1
0 0
0
1 0
set
reset disallowed
Sequential Logic
B.Supmonchai
clock
B.Supmonchai
Clk D Q
2102-545 Digital ICs
Clk
D
Q
Sequential Logic
10
B.Supmonchai
Out
Clk
Clk
Clk In Out
Out Stable
2102-545 Digital ICs
Clk
In Out
Out Follow In Out Stable Out Follow In Out Stable
Out Follow In
Out Stable
Out Follow In 11
Sequential Logic
B.Supmonchai
Latch-Based Design
N latch is transparent when f = 0 P latch is transparent when f = 1
N Latch
Logic
P Latch
Logic
2102-545 Digital ICs
Sequential Logic
12
B.Supmonchai
Timing Metrics
clock
time
data stable
tc-q
time
output stable
Out
output stable
Sequential Logic
time
2102-545 Digital ICs
13
B.Supmonchai
Timing Definitions
Setup time, tsetup is the time that the data inputs (D) must be valid before the clock transition
0 to 1 transition for a positive edge-triggered device 1 to 0 transition for a negative edge-triggered device
Hold time, thold is the time that the data inputs must remain valid after the clock edge Propagation Delay, tc-q is the worst case propagation delay (with reference to the clock edge)
time to copy D to Q
Sequential Logic
14
B.Supmonchai
COMBINATIONAL LOGIC
Current State
Q
Next state
State Register
T (clock period)
CLOCK
Sequential Logic
B.Supmonchai
It is important to minimize the values of the timing parameters associated with the register.
In modern high-performance systems, the register propagation delay and set-up times account for a significant portion of the clock period.
DEC Alpha EV6 has a maximum logic depth of 12 gates and
the register overhead accounts for about 15% of the clock period.
Hold time becomes an issue when there is little logic between registers or when the clocks at different registers are somewhat out of phase due to clock skew.
Sequential Logic
16
B.Supmonchai
CLK
Q CLK
D CLK
CLK
can implement as NMOS-only Overpowering the feedback loop (as in Static RAM)
Sequential Logic
17
B.Supmonchai
1 Q D 0 clk Negative Latch Q = clk & Q | !clk & D transparent when the clock is low
2102-545 Digital ICs
0 Q D 1 clk Positive Latch Q = !clk & Q | clk & D transparent when the clock is high
18
Sequential Logic
B.Supmonchai
Positive Latch
input sampled (transparent mode)
clk !clk
Sequential Logic
B.Supmonchai
Q
input sampled (transparent mode) !clk clk
Reduced clock load, but threshold drop at output of pass transistors so reduced noise margins and performance
2102-545 Digital ICs
!clk
Sequential Logic
B.Supmonchai
clk
B.Supmonchai
clk
clk
Slave D QM Q
22
clk = 0 clk = 1
2102-545 Digital ICs
transparent hold
hold transparent
Sequential Logic
B.Supmonchai
MS ET Implementation
Master Slave
I2
T2
I3
I5
T4
I6
QM D
clk
I1
T1
I4
T3
Sequential Logic
23
B.Supmonchai
MS ET Timing Properties
Assume propagation delays are tpd_inv and tpd_tx, that the contamination delay is 0, and that the inverter delay to derive !clk is 0 Set-up time - time before rising edge of clk that D must be valid
tsu = 3 * tpd_inv + tpd_tx
B.Supmonchai
Set-up time
How long before the rising edge does D have to be stable such
edge to ensure that the node voltages on both terminals of T2 are the same value.
of I4 is valid before the rising edge of clk, so the delay is simply the delay through T3 and I6
Hold time
since T1 turns off when the clock goes high, any changes in D
Sequential Logic
25
B.Supmonchai
Q QM D
Volts
1.5 1
tsetup = 0.21 ns
clk
I2 out
0.5
0
Time (ns)
works correctly
2102-545 Digital ICs
Sequential Logic
26
B.Supmonchai
Q I2 out D clk QM
0 0.2 0.4 0.6 0.8 1
Volts
1.5 1 0.5 0
tsetup = 0.20 ns
-0.5
Time (ns)
Fails!
2102-545 Digital ICs
the clock is enabled before the nodes on both sides of the transmission gate T2 settle to the same value
Sequential Logic
27
B.Supmonchai
Volts
1.5
Clk
1
0.5 0 -0.5
tc-q (LH)
tc-q (HL)
0.5
1.5
2.5
Time (ns)
propagation delay is measured from the 50% point of the clk edge to the 50% point of the Q output
2102-545 Digital ICs
Sequential Logic
28
B.Supmonchai
Reduced Load MS ET FF
Clock load per register is important since it directly impacts the power dissipation of the clock network. Can reduce the clock load (at the cost of robustness) by making the circuit ratioed
clk
I1
!clk
I3
T
1
QM
I2
T
2
Q
I4 reverse conduction
!clk
clk
to switch the state of the master, T1 must be sized to overpower I2 to avoid reverse conduction, I4 must be weaker than I1
2102-545 Digital ICs
Sequential Logic
29
B.Supmonchai
Non-Ideal Clocks
clk !clk
clk !clk
Ideal clocks
2102-545 Digital ICs
Non-Ideal clocks
Sequential Logic
30
B.Supmonchai
X A
I1 I2
!clk
P3
I3 I4
Q !Q
B
P2
P4
!clk
clk
Race condition direct path from D to Q during the short time when both clk and !clk are high (1-1 overlap)
Undefined state both B and D are driving A when clk and !clk are both high
Dynamic storage when clk and !clk are both low (0-0 overlap)
2102-545 Digital ICs
Sequential Logic
31
B.Supmonchai
Pseudostatic Two-Phase ET FF
clk1 D
P1
X A
I1 I2
clk2
P3
I3 I4
Q !Q
B
P2
P4
dynamic storage
clk1
clk1
clk2
2102-545 Digital ICs
tnon_overlap
Sequential Logic
32
B.Supmonchai
clk
B clk2
clk
A B clk1 clk2
2102-545 Digital ICs
Sequential Logic
33
B.Supmonchai
Power PC Flipflop
clk !clk
1D
01
10
10
Q 01
!clk
clk
!clk
2102-545 Digital ICs
Sequential Logic
34
B.Supmonchai
Q !Q
clk S
M6 M1 M5 M3
M8
clk
R
M7
This is not used in datapaths any more, but is a basic building block for memory cell
2102-545 Digital ICs
Sequential Logic
35
B.Supmonchai
on off
Q 1 0
1 0 !Q off ->on
0 1 clk 0 S
M6
off ->on
M8
on off
M5
M1
off on
M3
M7
off
on
No static power consumption, but a ratioed device where sizing is critical to ensure proper functionality
M7, M8 must overcome M4 to bring Q low, so must M5, M6
over M2
2102-545 Digital ICs
Sequential Logic
36
B.Supmonchai
Sizing Issues
2
1.5
!Q (Volts)
0.5
0 2 2.5 3 3.5 4
(W/L)5 and 6
Sequential Logic
37
B.Supmonchai
Transient Response
3
!Q
S
W=0.5 m W=0.6 m W=0.7 m
W=0.8 m W=1 m
!Q (Volts)
W=0.9 m
1.6 2
Time (ns)
Individual device ratio for M5 or M6 must be larger than approx. 6. Analysis results give 2.26 (instead of 3) since it doesnt take into account channel length modulation and DIBL (drain induced barrier loading).
2102-545 Digital ICs
Sequential Logic
38
B.Supmonchai
Problems with noise margins and static power consumption due to threshold drop across pass transistors Once again, sizing is important - especially M5 and M6
clk R
M5
clk
M2 M4
Q !Q
M1 M3
M6
B.Supmonchai
Dynamic (charge-based)
CLK
Q
D
CLK
CLK
CLK
Sequential Logic
B.Supmonchai
Dynamic ET Flipflop
master
!clk
T1 I1
slave
clk QM
T2 I2
C clk
master transparent slave hold
1
C !clk
2
clk !clk
B.Supmonchai
clk
C clk
1
C !clk
2
clk !clk
Sequential Logic
42
B.Supmonchai
Dynamic Two-Phase ET FF
clk1 QM D
T1 I1 T2 I2
clk2
C !clk1
master transparent slave hold
1
C !clk2
2
clk1 clk2
tnon_overlap
master hold slave transparent
Sequential Logic
43
B.Supmonchai
!clk
2102-545 Digital ICs
Slight increase in delay (adds to the capacitive load) and power consumption, but it improves noise immunity significantly
Sequential Logic
44
B.Supmonchai
Slave
M6
on
M4
QM C1
!clk on clk
off
M8
on
M3
off
M7
off
M1
on
M5
clk
!clk
2102-545 Digital ICs
Sequential Logic
45
B.Supmonchai
0 D
M4
QM C1
M8
Q
M7 M5
M3 M1
C2
clk !clk
clk !clk
Sequential Logic
46
B.Supmonchai
Does any new data sampled during the overlap window propagate to Q (race)?
New data is sampled on QM, but cannot propagate to Q since
For clocking on the left: at the end of the overlap period !clk = 1 and both M7 and M8 turn off, putting the slave in the hold mode For the clocking on the right: at the end of the overlap period clk = 1 and both M3 and M4 turn off, putting the master in the hold mode (affects setup time as well) The result: the FF is slower (slower tc-q time)
Sequential Logic
47
B.Supmonchai
D 1
M3 M1
QM C1 1
M8
Q
M7 M5
C2
clk !clk
Sequential Logic
48
B.Supmonchai
New data is sampled on QM, but cannot propagate to Q since M8 is off (slave is in hold).
However, possible race can occur if the rise/fall times of the clock are sufficiently slow.
Works correctly as long as the clock rise/fall times is smaller
Sequential Logic
49
B.Supmonchai
0
-0.5 0 2 4 6 8
Time (nsec)
Sequential Logic
50
B.Supmonchai
B.Supmonchai
B
Q clk
B.Supmonchai
Technique used extensively in the design of the EV4 DEC Alpha microprocessor and many other high performance processors.
Sequential Logic
53
B.Supmonchai
TSPC ET FF
Master Slave
clk
on off
clk
on QM off
on clk off
on clk off
Sequential Logic
54
B.Supmonchai
Notes on TSPC ET FF
Warning! - similar to C2MOS, TSPC flipflops malfunction when the slope of the clock is not sufficiently steep.
Slow clock cause both the NMOS and PMOS
clocked transistors to be ON simultaneously, resulting in undefined values of the states and race conditions.
Clock slopes thus must be carefully engineered. If
necessary, local buffers must be introduced to ensure the quality of the clock signal
2102-545 Digital ICs
Sequential Logic
55
B.Supmonchai
Simplified TSPC ET FF
I1
M3
I2 clk off
I3
Q D
clk
B.Supmonchai
Notes on TSPC ET FF
On the positive edge of the clock, note that the node X transitions to a low if D is high. Therefore, the input must be kept stable until the value on node X before the rising edge of the clock propagates to Y
Hold time of the register (less than 1 inverter delay since it
Propagation delay is essentially three inverters since the value on node X must propagate to output Q Set-up time is the time for node X to be valid one inverter delay
Sequential Logic
57
B.Supmonchai
clk !Qorig
!Qmod
Transistor sizing
Original width M4, M5 = 0.5m M7, M8 = 2m
Qmod Qorig
0 0 0.2 0.4 0.6 0.8 1
Time (nsec)
Sizing is critical with improper sizing glitches may occur due to race condition when the clock transitions from low to high
2102-545 Digital ICs
Sequential Logic
58
B.Supmonchai
Q In clk A In clk
A Q
Sequential Logic
B.Supmonchai
Split-Output TSPC ET FF
8 Transistors* 2 Clock loads
*(10 if Q is needed)
clk
A
clk
QM Q
Which edge-triggered?
Downside is not all node voltages in the latch experience full logic swing due to threshold drop.
E.g., for positive latch when D=0 and clk=1, A=Vdd-Vth (Also
Sequential Logic
60
B.Supmonchai
Pulse-Triggered Flipflops
Pulse-Triggered Flipflop
L1
Data D Clk Clk Q
L2
D Clk Q Data Clk D
L
Q
Clk
Sequential Logic
61
B.Supmonchai
Pulsed FF (AMD-K6)
Pulse registers - a short pulse (glitch clock) is generated locally from the rising (or falling) edge of the system clock and is used as the clock input to the flipflop
OFF 0/Vdd ON/OFF
clk
ON P1 X Vdd
P3
1/0
M3OFF
ON
M6OFF
ON
D
1 1
1/0 0 1 0
M2ON/
OFF
P2
M5
M1ON
ON OFF
!clkd
M4
Sequential Logic
62
B.Supmonchai
Notes on Pulsed FF
Race conditions are avoided by keeping the transparent mode time very short (during the pulse only)
propagate to Q.
The set-up time can be NEGATIVE (if the transparency window is longer than the delay from input to output).
This is attractive, as data can arrive at the register even after
the clock goes high, meaning that time can be borrowed from the previous cycle.
2102-545 Digital ICs
Sequential Logic
63
B.Supmonchai
Sense amplifier is a circuit that accept small swing input signals and amplify them to full rail-to-rail signals
0 1
D
M2
1 M5
M9 M7
!S Q
M1 1 M6 1 M8 M10 0 1
Sequential Logic
64
M4
!R
M3 0
!Q
clk
2102-545 Digital ICs
B.Supmonchai
The key is transistor M4 (in the middle of Sensed amp); it delays signals that pass through to the other side of its terminal, making the change on the other side slower
When D = 1, Y changes after X due to the delay of M4. By the
time M6 reacts to the change at its terminal, it is already turned off by the terminal voltage at M4 (a 0). Thus, M6 holds a 1.
M4 also provides DC-leakage path to ground for either node X or Y in case that the inputs change their value after the positive edge of CLK arrives.
Advantages are reduced clock load and that it can be used as a receiver for reduced swing differential buses
Where does the differential signal enter?
Sequential Logic
65
B.Supmonchai
#clk ld
8 (clk-!clk) 8 (clk-!clk)
#tr
20 16
tset-up
3tpinv+tptx
thold
0
tpFF
tpinv+tptx
2-phase
T-gate C2MOS
Ps-Static
Dynamic Dynamic
8 (clk1-clk2)
4 (clk-!clk) 4 (clk-!clk)
16
8 8 tptx to1-1 2tpinv+tptx
TSPC
S-O TSPC AMD K6
Dynamic
Dynamic Dynamic SenseAmp
4 (clk)
2 (clk) 5 (clk) 3 (clk)
11
10 19 20
tpinv
tpinv
3tpinv
SA 100
2102-545 Digital ICs
Sequential Logic
66
B.Supmonchai
Choosing the right clocking scheme affects the functionality, speed, and power of a circuit
Two-phase designs
+ robust and conceptually simple - need to generate and route two clock signals - have to design to accommodate possible skew between the
B.Supmonchai
Previously, we have defined a circuit having two stable states a bi-stable circuit Other regenerative circuits, which are nonbistable:
Monostable
Only one stable state -> Pulse generators, One-shot circuits
Astable
No stable states -> Oscillator, On-chip clock generator
Schmitt Trigger
A special regenerative circuit exhibiting hysteresis in VTC.
2102-545 Digital ICs
Sequential Logic
68
B.Supmonchai
Schmitt Trigger
Non-Bistable Sequential Circuits
Vou t
In Out
V OH
2 important properties
Hysteresis Fast Transition Time
V OL
at the output
2102-545 Digital ICs
VM
Sequential Logic
VM+
Vi n
69
B.Supmonchai
VIN
VM+
VOUT
VM-
t0
t0 + t p
Sequential Logic
70
B.Supmonchai
M2
M4
VIN
M1
X
M3
VOUT
Low-to-High reff = kM1/(kM2 + kM4) High-to-Low reff = (kM1 + kM3)/kM2
Adapting the ratio between PMOS and NMOS, depending upon the direction of the transition results in a shift in switching threshold
2102-545 Digital ICs
Sequential Logic
71
B.Supmonchai
M4 = k x 0.5 m/0.25 m
Vout(V)
Vout(V)
1.5 VM2
VM1
k=1 k=3 k=2 k=4 0.5 1.0 1.5 Vin (V) 2.0 2.5
0.5
2.0
2.5
Sequential Logic
B.Supmonchai
VIN
M2
M5
VOUT
X
M1
Sequential Logic
73
B.Supmonchai
Period: T = 2 x tp x N
Different Clock Duty-Cycles and phases can be derived using simple logic operations
Sequential Logic
74
B.Supmonchai
VDD
M4
M2
In
M1
Iref Vcontr
M3 M5
Iref
Delay of6a current starved inverter depends on the current limit available to discharge the load capacitance of the gate
(nsec)
Sequential Logic
75
Vcontr
M3 M5
Current starv
B.Supmonchai
4 2
0.0 0.5
The device is in the subthreshold region when Vctrl is smaller than VT, resulting in large variations of tp as the drive current is exponentially dependent on the propagati drive voltage
Delay sensitive to
1.5
2.5
of control
76
Sequential Logic
B.Supmonchai
Vo1
+
in2
+
Vctrl
v1 v2
v3 v4
delay cell
- Inverting Inputs/Outputs
Differential-type VCO has better immunity to common mode noise (e.g., supply noise) but consume more power
2102-545 Digital ICs
Sequential Logic
77
B.Supmonchai
V1 V2
V3
V4
Sequential Logic
78