Professional Documents
Culture Documents
05 Timing Clocking p6
05 Timing Clocking p6
05 Timing Clocking p6
X Z
Combinational
Logic
Q FF
D
FF
FF
... clock
FF clock period
clock
ECE152B TC 1 ECE152B TC 2
D
X Z
L Combinational • For correct operation of a
Q
D Q
Logic synchronous circuit:
• The clock period must be
Q CK Q Q FF D longer than the delay of
g p
the longest path in the
CK FF combinational logic.
L1 L2 FF • The width of the clock
D Q
Q1
D Q Q2 ... pulse must be long enough
D1
to allow the flip-flops to
FF
CK Q CK Q
clock change state.
CK clock
clock period
ECE152B TC 3 ECE152B TC 4
FF clk T
50%
Input Clk
clk Setup time Hold time
Q thold
D
tsu
z Flip-flop hold time Th: the required time the data
tc-q
input signal value must be held stable after the Q
arrival of clock pulse.
Delays can be different for rising and falling data transitions
ECE152B TC 5 ECE152B TC 6
Example: For the circuit shown below, assume the
A Simple RC Model for Logic Gates
delay through the register (tpd) is 0.6 and the delay
through each logic block is indicated inside the box.
Assume that the registers, which are positive edge- G
triggered, have a set-up time Tsu of 0.4. What is the equivalent
minimum clock period? circuit
A B A Rout B
logic
G
tpd=55 Cinput
a buffer/gate
logic logic
tpd=2 tpd=2
register register
logic logic
tpd=5 tpd=3
tθ tθ’
Clock θ
ECE152B TC 7 ECE152B TC 8
C2 Rd Rd
Vout Vout
driver C3
Cinput Coutput C1+ C2+ C3 Cinput Coutput C1+ C2+ C3
+ Cwire
1. Ignoring interconnects
VOUT
2. Lumped capacitance model Vout(t) = VDD (1 – e–t/T) T = Rd (Coutput+ C1+ C2+ C3)
1.0 x VDD or
3. RC tree model T = Rd (Coutput+ C1+ C2+ C3 + Cwire)
4. RLC tree model 0.5 x VDD
Vout-1(0.5VDD) = (ln 2) T = 0.693 T
5. Transmission line models (RC, LC, RLC) T 2T time
Vout(T) = 0.632 VDD
6. RC / RLC Network model
ECE152B TC 9 ECE152B TC 10
ECE152B TC 11 ECE152B TC 12
Delays of Simple RC Circuit Interconnect Models as a Tree
3. RC tree model
v(t) = v0(1 - e-t/RC) -- waveform under step input v0u(t)
4. RLC tree model
v(t)=0.5v0 ⇒ t = 0.7RC 5. Transmission line models (RC, LC, RLC)
– i.e., delay = 0.7RC (50% delay)
C2
v(t)=0.1v0 ⇒ t = 0.1RC
v(t)=0 9v0 ⇒ t = 22.3RC
v(t)=0.9v 3RC driver C3
– i.e., rise time = 2.2RC
Rise time (Fall time): time for a waveform to rise from
10% to 90%(90% to 10%) of its steady state value
or
VOH VOH transmission
VOL line
VOL
L-type π-type T-type
Rise time Fall time
ECE152B TC 13 ECE152B TC 14
Some Rule-of-Thumbs:
• Each wire maybe
Need to consider C: segmented into several
– if interconnect C is comparable to C of gates edges
driven • Each edge E modeled as a
Need to consider R: π-type or L-type circuit
– if interconnect R is comparable to R of • rE = unit res. × length(E)
driver • cE = unit cap. × length(E)
Need to consider L:
– if ωL is comparable to R of interconnect
ECE152B TC 15 ECE152B TC 16
ECE152B TC 21 ECE152B TC 22
G1 v0
v0(1-e-t/RC)
A Rout B
Cinput
time (courtesy P. Joshi, IBM)
ECE152B TC 23 ECE152B TC 24
Static Timing Analysis Static Timing Analysis
PI1 1 4 6 5 PO1
0/4 1/5 7/9 13/15
18/22 PO1
PI1 1 4 6 5
Netlist with delay for PI2 3 6 6 7 PO2 0/0 9/9
3/3 15/15
each gate arrival time/required time PI2 3 6 6 7 22/22 PO2
4
PI3 1 4 5 4 PO3 0/8 4 7/15 5 14/18 418/22
PI3 1 4
PO3
1/9 7/13
0 1 7 13 18
PI1 1 4 6 5 PO1 4 4 2 2 4
PI1 1 4 6 5 PO1
0
11 7 5 14 4 18 8
4
18 8 54 44
PI3
4
PO3 4
PI3 PO3
7 4
6
ECE152B TC 25 ECE152B TC 26
22
Clock skew
3 2 1 1 – Spatial variation in temporally equivalent clock
5 5 5
L L edges; deterministic + random, tSK
A A
T 19 2 1 T
Clock jjitter
C C – Temporal variations in consecutive edges of the
H
4 4 4
H clock signal; modulation + random noise
2 1 3 2 – Cycle-to-cycle (short-term) tJS
– Long term tJL
Variation of the pulse width
– Important for level sensitive clocking
ECE152B TC 27 ECE152B TC 28
Clock Skew
Clock Skew and Jitter
The delays from the clock source to the clock inputs
of different flip-flops are different Clk
CLOCK tSK
DRIVER A
Clk tJS
B
Both skew and jitter affect the effective cycle time
Only skew affects the race margin
ECE152B TC 29 ECE152B TC 30
Clock Uncertainties – Sources of Skew The clock skew problem: the race problem
and Jitter D1 Q1 D2 Q2
FF1 FF2
4 Power Supply 1ns
3 Interconnect
2 6 Capacitive Load
Devices
0ns
7 Coupling to Adjacent Lines 2ns
5 Temperature
1 Clock Generation Correct operation: D1 -> Q1 , D2 -> Q2
Due to clock skew: D1 -> Q2 (error!!)
ECE152B TC 33 ECE152B TC 34
1
TCLK
3 Assume the FF propagation delay (clock to Q delay)
CLK1
tc→q=0.6, the FF setup time tsu=0.4, the FF hold time
thd=0.5
CLK2 2 4 If tθ’-tθ = 0 (no clock skew),
δ
– minimum clock period = 11
Receiving edge arrives before the launching edge
ECE152B TC 37 ECE152B TC 38
3
T+δ A B
10
If tθ’-tθ=δ=1 tθ tθ tθ’
3
tθ
A B tθ ’ Data output of A
10 1
0.6
tθ tθ’ >=11
Data input
p of B 3.6
tθ ’
For proper operation, the time between positive edges at < (3.6 – 0.5)
registers A and B must be greater than or equal to 11 On the other hand, the clock skew cannot exceed 3.1 ns.
Îclock period + clock skew >= 11 Otherwise the data latched into register A may propagate through the
Îminimum clock period = 10 short path and reach the data input of register B before the rising edge
of the clock pulse of the same cycle reaching θ’.
ECE152B TC 39 ECE152B TC 40
Where δ=(tθ’ - tθ) (a) Determine the minimum clock period assuming a positive clock skew: δ = (tθ’ - tθ) = 1.
Requirement (1) have to be satisfied for datapath between any pair (b) Repeat part(a), factoring in a positive clock skew: δ = 3.
of registers where δ would be either positive or negative (c) Repeat part(a), factoring in a negative clock skew:δ = -2.
(d) Derive the maximum positive clock skew (i.e. tθ’ > tθ) that can be tolerated before the
Requirement (2) have to be satisfied for datapath between any pair circuit fails.
of registers with a positive clock skew (e) Derive the maximum negative clock skew (i.e. tθ’ < tθ) that can be tolerated before the
circuit fails.
ECE152B TC 43 ECE152B TC 44
2 TC LK 5
D Q
CLK 1 3 4 t j itter A FF
-tji tte r 6
Controller
B
clk
In
REGS Combinational
Logic
clk
CLK t log ic
tc-q , tc-q, cd t log ic, cd A
ts u, thold
tjitter An undesirable glitch or
B spike will result & cause an
additional trigger of the clock.
ECE152B TC 45 ECE152B TC 46
An alternative design:
Clock Gating
begin
CLK
q0 <= D0; RTL Synthesis
D0
q1 <= D1; or q0
Q Low-Power RTL CLK q1 Out
RTL Synthesis D en <= SEL;
end Synthesis D1
EN
always @(posedge assign Out = en ? q0:q1;
CLK
CLK) CLK
begin
if (EN)
Q <= D;
end en
SEL
D Q always @(posedge clk)
CLK
Low-Power RTL EN begin
D0
Synthesis if (sel == 1’b1) Low-Power RTL q0
Synthesis CLK CG q1 Out
CLK q0 <= d0;
CG cell if (sel == 1’b0) D1
q1 <= d1;
CLK CG
en <= sel;
end
assign out = en ? q0:q1;
Ref: Calypto
ECE152B TC 49 ECE152B TC 50
Block 1 Block 2
C oc Gat
Clock Gating
g 38.8% 29%
Efficiency
CLK
R Registers Rn SYNCHRONIZER
0
ASYNCHRONOUS SYNCHRONIZED
100% Clock Gated Registers/Duration D Q
Optimized Design After Identifying more INPUT SIGNAL D METASTABLE
gating opportunities STATE
Duration
output
input Fa() Fb() Fc()
SYSTEM CLOCK
ECE152B TC 55 ECE152B TC 56
ECE152B TC 57 ECE152B TC 58
A 5 4 B 2 C
… a c x …
… b d
A 5 B 4 2 C
… a
x Comparison: pipelining
… b d
A 5 A’ 4 B 2 C
ECE152B TC 61 ECE152B TC 62
Retiming Retiming
Edge label: # of registers Edge label: # of registers
V7 V6 V5 V7 V6 V5
0 0 0 0 1
0 1
0
7 7 7 7 7 7
0 0 0 0 1
0 1
0 1
0 1
0
1 1 1 1 10 10 10 10
3 3 3 3 3 3 3 3
V1 V2 V3 V4 V1 V2 V3 V4
ECE152B TC 63 ECE152B TC 64