Lecture 16
Lecture 16
Lecture 16
Clocked Circuits, Timing and Clocking
CLK=1: D to Q
CLK=0:Holds
state of Q As long as
CLK remains
high, D will be
written on Q
D Q D Q
Clk Clk
Clk Clk
D D
Q Q
D Q D Q Data may
arrive after
Clk edge….
Clk Clk
tC 2 Q tC 2 Q
Requires an extra
Data is ready when
timing parameter…
Clk arrives….
CLK=0: D to QM
QM = D
QM
Slave holds previous value
of Q
CLK=1: master can’t sample
input and holds value of D
Slave opens and QM=(D) =Q
D DATA CLK
STABLE t
tc 2 q
Q DATA
STABLE t
tsu= setup time =time for which the data inputs (D) must be valid before the CLK edge
thold= hold time =time for which data input must remain valid after the CLK edge
tc2q= worst case propagation time through the Register (w.r.t the CLK edge)
FF’s
D Q
CLK
Edge
Register
To ensure that the input data
of the sequential elements is
held long enough after the
CLK edge and is not modified
LOGIC too soon by the new wave of
data coming in:
tp,comb
I2 T2 I3 I5 T4 I6 Q
QM
D I1 T1 I4 T3
CLK
CLK=0: T1 is on, T2 is off, D input sampled CLK=1: T3 is on, T4 is off, QM sampled onto Q
onto QM
T2 on and T1 off: I2 and I3 hold the state of QM
T3 off and T4 on: I5 and I6 hold the state of the
Slave
Lecture 16, ECE 225 Kaustav Banerjee
Master-Slave +ve Edge Triggered
Register
Transistor Level Implementation
Master Slave
I2 T2 I3 I5 T4 I6 Q
tsu = set-up time = time before the rising edge of the CLK during which the D input
should remain stable so that QM samples the value reliably
Since D must propagate through I1, T1, I3, and I2 before the rising edge
REG
a a
REG
REG
REG
REG
log Out CLK log Out
CLK
REG
REG
Q
D Q
CLK
D CLK
Thold~0
CLK CLK
Tc-q=2td-inv + tdx_T2
A B
D T1 I1 T2 I2 Q
C1 C2
C1 consists of Leakage will destroy the
CLK gate cap. of I1, CLK
jnc. & overlap state if not refreshed
Master gate cap. of T1 Slave
CLK=0: D input is sampled at storage node 1, Slave stage in hold mode with node 2 in high-
impedance state
At the rising edge of CLK: T2 is turned on and value sampled at node 1 right before the rising
edge is copied to Q
Very efficient: requires only 8 transistors, can be made even simpler (6 transistors) using NMOS-
only pass transistors
Race condition can occur due to CLK overlaps!
Robustness is also an issue….(state at the nodes can be distorted by injected noise)
Lecture 16, ECE 225 Kaustav Banerjee
Impact of Non-overlapping Clocks…on +ve
Edge Triggered Register
CLK CLK
A B
D T1 I1 T2 I2 Q
C1 C2
CLK CLK
CLK
toverlap_0-0 < tT1 + t I1 + tT2
So that output Q doesn’t change
on the falling CLK edge….
A
D D
CLK
Increases delay slightly…but improves noise immunity
Most registers should be pseudo-static or static unless used in
high-performance datapaths
Higher throughput
Data is sampled both in positive-edge
and negative edge of the clock
Duty cycle of the clock should be 50%
Setup time and hold time is important in
both edges of the clock
D to Q: both at the
rising and falling
edge of CLK
Note: lower frequency CLK giving same throughput, good for power savings
Lecture 16, ECE 225 Kaustav Banerjee
Other Latches/Registers: C2MOS
Clocked CMOS Register: +ve edge triggered Master-Slave FF
VDD VDD
CLK=0: M2 M6 CLK=1:
first tri-state Master is in hold
buffer turns CLK M4 CLK M8 mode…second
on….and D
X
Q
stage turns on
Master CL1 CL2 and CL1
CLK M3 CLK M7
samples the propagates to
inverted the output Q
version of D M1 M5
Q retains
previous value
on CL2 Master Stage Slave Stage
M2 M6 M2 M6
0 M4 0 M8
X X
D Q D Q
1 M3 1 M7
M1 M5 M1 M5
Out
Out
Negative latch
Positive latch
(transparent when CLK= 1,
(transparent when CLK= 0)
when CLK=0, both inverters are disabled...latch is
in hold mode)
Lecture 16, ECE 225 Kaustav Banerjee
Including Logic in TSPC
Reduces delay overhead associated with the latches…..
VDD VDD VDD VDD
In1 In2
PUN
Q Q
PDN In1
In2
Example: logic inside the +ve latch AND +ve latch
Tcd-reg=3td-inv
CLK Q
M3 M6 M9
On the rising
Y
Q edge of CLK
D CLK X CLK dynamic-
M2 M5 M8
Note: if D=1, X=0, inverter M4-M6
hence, D must be evaluates…inv
stable until the
value on X
M7-M9 is ON,
CLK
(before the rising M1 M4 M7 and passes the
edge of CLK)
propagates to Y
value of Y to Q
(hold time)
Master-Slave Pulse-Triggered
Latches Latch
L1 L2 L
Data Data
D Q D Q D Q
MN
M1 M4
CLK
CLKG
CLK
In Combinational
R1 R2
Cin Logic Cout Out
D Q
Clk
T
Clk PWm
tsu
D
thold
tc-q td-q
Q
D Q
Clk
T
Clk
D thold
tsu
tc-q
Q
tc - q tlogic
tc - q, cd tlogic, cd
tsu, thold
CLK period constraint:
Hold time constraint: TCLK > tc-q + tlogic + tsu
t(c-q, cd) + t(logic, cd) > thold
Worst case is when receiving edge arrives late
Race between data and clock
Clk tJS
TCLK + d
TCLK
1 3
CLK1
d
CLK2 2 4
d + th
tc - q tlogic
tc - q, cd tlogic, cd Minimum cycle time:
tsu, thold
TCLK + = tc-q + tsu + tlogic
is -ve
TCLK + d
TCLK
1 3
CLK1
CLK2 2 4
d
tc - q tlogic
tc - q, cd tlogic, cd
tsu, thold Minimum cycle time:
TCLK - = tc-q + tsu + tlogic
delay delay
(a) Positive skew
R1 R2 R3
In Combinational Combinational
D Q D Q D Q ???
Logic Logic
REG
REG
REG
. log Out
REG
In
Positive Skew
Clock Distribution
t j itter
CLK
-tji tte r
Combinational
Worst Case:
REGS
In Logic Tjitter = 2tjitter
CLK t log ic
tc-q , tc-q, cd t log ic, cd
ts u, thold
tjitter
Absolute jitter = tjitter= worst case variation of a CLK edge at a given location w.r.t. an ideally
periodic reference CLK edge
Cycle-to-Cycle Jitter = Tjitter = time varying deviations of a single clock period relative to an ideal
reference CLK: i
T jitter n tclk
i i
, n1 clk , n Tclk
t
Arrival time of the nth CLK edge at i
Lecture 16, ECE 225 Kaustav Banerjee
Longest Logic Path in
Edge-Triggered Systems
TJI +
TSU
Clk
TClk-Q
TLogic
T
Clk
TClk-Q TLogic
Clk
TH
tjitter
Clk
TCLK
CLK2 thold
tjitter
CLK
[Restle98]
Driver
GCLK GCLK Absolute delay is
minimized
Large power
dissipation: due to
excess interconnects
Driver
GCL K
•No rc-matching
•Large power
Skew is zero at
the output of left
and right
drivers….
+ widely dispersed
NCLK
(Mem Ctrl) drivers
+ DLLs compensate
DLL
DLL
DLL
static and low-
frequency variation
+ divides design and
verification effort
(L2 Cache)
(L2 Cache)
L2R_CLK
L2L_CLK
PLL