Module 6
Module 6
in out
CL CL CL
Flop
D Q D Q
clk
Q (latch)
Q (flop)
Bistable Circuit
Bistable Circuit
Metastability
S-R Latch
D Latch
D Latch
Latch Design
Vt drop
dynamic
output noise sensitivity
diffusion input
Latch Design
Transmission gate D Q
+ No Vt drop
- Requires inverted clock
Inverting buffer
X
D Q
+ Fixes
Output noise sensitivity
D Q
Inverter at the input
+ Fixes diffusion input (reduces
noise)
Latch Design
Tristate feedback
X
+ Static D Q
because of leakage
Buffered output Q
+ No backdriving D
X
Datapath latch Q
+ smaller D
X
+ faster
- unbuffered input
Conventioanl Flip-Flop Design
Flip-flop is built as pair of back-to-back latches
X
D Q
Q
X
D Q
Pulsed Latches
A pulsed latch can be built from a conventional CMOS transparent latch driven by a brief
clock pulse.
Enabled Latches and Flipflops
Enable: ignore clock when en = 0
Mux: increase latch D-Q delay
Clock Gating: increase en setup time, skew
Symbol Multiplexer Design Clock Gating Design
en
D 1
Latch
Latch
Latch
D Q Q D Q
0
en en
en
D 1
Flop
Q
0
Flop
Flop
D Q D Q
en
en
Resettable Latches and Flipflops
Force output low when reset asserted
Asynchronous reset forces Q low immediately, while synchronous reset waits for the clock.
S ym bol
Latch
F lop
D Q D Q
reset reset
S ynchronous R eset
Q Q
reset reset
Q
D D
Q
Q
A synchronous R eset
reset
reset
D
D
reset
reset
Asynchronous reset requires gating both the data and the feedback to force the reset
independent of the clock.
Set / Reset
Set forces output high when enabled
reset
set Q
D
set
reset
Sequencing Methods
Tc
Flip-Flops
clk
Flipflops: Tokens advance from one cycle to
clk clk
the next on the rising edge. If a token arrives
too early, it waits at the flip-flop until the next
Flop
Flop
Combinational Logic
cycle.
Latch
Latch
Latch
Combinational Combinational
Logic Logic
Half-Cycle 1 Half-Cycle 1
Pulsed Latches
Pulsed Latches: eliminate one of the p tpw
Latch
Combinational Logic
Setup and Hold Time
Timing Diagrams
Logic Prop. Delay Contamination and Propagation Delays
tpd
Flop
D Q D
tpcq
Latch/Flop Clk->Q Cont. Delay Q tccq
tccq
clk tsetup thold
clk
tccq tpcq
Latch
Q1 D2
Combinational Logic
F1
F2
Tc
tsetup
clk
tpcq
Q1 tpd
D2
OR
Max Delay: 2-Phase Latches
1 2 1
D1 Q1 Combinational D2 Q2 Combinational D3 Q3
L1
L3
L2
Logic 1 Logic 2
1
2
Tc
D1 tpdq1
Q1 tpd1
D2 tpdq2
Q2 tpd2
D3
OR
Max Delay: Pulsed Latches
p p
D1 Q1 D2 Q2
Combinational Logic
L2
L1
Tc
D1 tpdq
D2
p
tpcq Tc tpw
Q1 tpd tsetup
(b) tpw < tsetup
D2
OR
Min-Delay: Flip-Flops
clk
Q1
CL
F1
clk
D2
F2
clk
Q1 tccq tcd
D2 thold
Min-Delay: 2-Phase Latches
1
Q1
CL
L1
2
D2
L2
tnonoverlap
1
tccq
2
Q1 tcd
D2 thold
Q1
L1 CL
p
D2
L2
p
tpw
thold
Q1 tccq tcd
D2
In a flop-based system:
Data launches on one rising edge
Must setup before next rising edge
If it arrives late, system fails
If it arrives early, time is wasted
Flops have hard edges
In a latch-based system
Data can pass through latch while transparent
Long cycle of logic can borrow time into next as long
as each loop completes in one cycle
Clock Skew
Q1 D2
F1
F2
Combinational Logic
Tc
clk
tpcq
tskew
Q1 tpdq tsetup
D2
clk
Q1
F1
CL
clk
D2
F2
tskew
clk
thold
Q1 tccq
D2 tcd
Skew: Latches
2-Phase Latches 1 2 1
D1 Q1 Combinational D2 Q2 Combinational D3 Q3
L1
L2
L3
Logic 1 Logic 2
1
2
If the pulse is wide enough, the skew will not increase the sequencing overhead because
the data can arrive while the latch is transparent.