13. sequential circuit timing - school of computingbchong/vlsi/resources/sequential circuit...
TRANSCRIPT
13.1Elec 326 Sequential Circuit Timing
13. Sequential Circuit Timingo Objectives
This section covers several timing considerations encounteredin the design of synchronous sequential circuits. It has thefollowing objectives:n Define the following global timing parameters and show
how they can be derived from the basic timing parametersof flip-flops and gates.
u Maximum Clock Frequencyu Maximum allowable clock skewu Global Setup and Hold Times
n Discuss ways to control the loading of data into registersand show why gating the clock signal to do this is a poordesign practice.
13.2Elec 326 Sequential Circuit Timing
o Reading Assignmentn Much of the information in this section is not in the Brown
& Vranesic text. There is material on clock skew in section10.3. That section also discusses the effects of gating theclock.
13.3Elec 326 Sequential Circuit Timing
13.1. Maximum Clock Frequencyo The clock frequency for a synchronous sequential
circuit is limited by the timing parameters of its flip-flops and gates. This limit is called the maximumclock frequency for the circuit. The minimum clockperiod is the reciprocal of this frequency.
o Relevant timing parametersn Gates:
u Propagation delays: min tPLH, min tPHL, max tPLH, max tPHL
n Flip-Flops:u Propagation delays: min tPLH, min tPHL, max tPLH, max tPHL
u Setup time: tsu
u Hold time: th
13.4Elec 326 Sequential Circuit Timing
o ExampleD Q
QCK
Q
TW ≥ max tPFF + tsu
n For the 7474, max tPLH = 25ns, max tPHL = 40ns, tsu = 20nsTW ≥ max (max tPLH + tsu, max tPHL + tsu)
TW ≥ max (25+20, 40+20) = 60
13.5Elec 326 Sequential Circuit Timing
o Example
D Q
CK
Q
TW ≥ max tPFF + max tPINV + tsu
13.6Elec 326 Sequential Circuit Timing
o Example
D Q
Q
D Q
Q
MUX0
1
Q0 Q1
CK
TW ≥ max tPFF + max tPMUX + tsu
13.7Elec 326 Sequential Circuit Timing
o Example
Paths from Q1 to Q1:
Paths from Q1 to Q2:
Paths from Q2 to Q1:
Paths from Q2 to Q2:
None
TW ≥ max tPDFF +tJKsu = 20 +10 = 30 ns
TW ≥ max tPDFF + max tAND + tJKsu = 20 + 12 + 10 = 42 ns
TW ≥ max tPJKFF + tOR + TDsu = 25 + 10 + 5 = 40 ns
TW ≥ max tPJKFF + max tAND + tJKsu = 25 + 12 + 10 = 47 ns
TW ≥ 47 ns
13.8Elec 326 Sequential Circuit Timing
o Clock Skewn If a clock edge does not arrive at different flip-flops at
exactly the same time, then the clock is said to be skewedbetween these flip-flops. The difference between the timesof arrival at the flip-flops is said to be the amount of clockskew.
n Clock skew is due to different delays on different pathsfrom the clock generator to the various flip-flops.
u Different length wires (wires have delay)u Gates (buffers) on the pathsu Flip-Flops that clock on different edges (need to invert clock for
some flip-flops)u Gating the clock to control loading of registers (a very bad idea)
13.9Elec 326 Sequential Circuit Timing
o Example (Effect of clock skew on clock rate)n Clock C2 skewed after C1
Q1 Q2D Q
Q
D Q
Q
CK
C1 C2
D2
TW ≥ max TPFF + max tOR + tsu
(if clock not skewed, i.e., tINV = 0)TW ≥ max TPFF + max tOR + tsu - min tINV
(if clock skewed, i.e., tINV > 0)
13.10Elec 326 Sequential Circuit Timing
n Clock C1 skewed after C2
Q1 Q2D Q
Q
D Q
Q
CK
C1 C2
D2
TW ≥ max TPFF + max tOR + tsu
(if clock not skewed, i.e., tINV = 0)
TW ≥ max TPFF + max tOR + tsu + max tINV
(if clock skewed, i.e., tINV > 0)
13.11Elec 326 Sequential Circuit Timing
o Summary of maximum clock frequency calculationsD Q
LogicNetwork
D Q
C1 C2
Q1 D2
C1
Q1
D2
C2
TW
tPFF tOR tsu
tSK = tINV
C1
Q1
D2
C2
TW
tPFF tOR
tsu
tSK = tINV
C2 skewed after C1: TW ≥ max TPFF + max tNET + tsu - min tINV
C2 skewed before C1: TW ≥ max TPFF + max tNET + tsu + max tINV
13.12Elec 326 Sequential Circuit Timing
o Example
n For each of the following two connections findu The minimum clock periodu The maximum and minimum delay from CLK to YOUT
tXY = Network delay from X to YtXD = Network delay from X to DtQY = Network delay from Q to YtQD = Network delay from Q to D
13.13Elec 326 Sequential Circuit Timing
n Circuit 1:
max tPFF + max tQY + (n-2) max tXY +max tXD + tsu
max tPFF + max tQD + tsu
n ≥ 2
Tw ≥Tw ≥
≥ TW
Minimum Clock Period:
Maximum Delay:
Minimum Delay:TCY ≤
TCY ≥
max tPFF + max tQY + (n-1)tXY
min tPFF + tQY
tXY = Network delay from X to YtXD = Network delay from X to DtQY = Network delay from Q to YtQD = Network delay from Q to D
13.14Elec 326 Sequential Circuit Timing
n Circuit 2:
n ≥ 2
max tPFF + max tXD + tsu
max tPFF + max tQD + tsu Tw ≥Tw ≥
Minimum Clock Period:
Maximum Delay:
Minimum Delay:TCY ≤
TCY ≥
max tPFF + max (max tXY, max tQY)
min tPFF + min (min tXY, min tQY)
tXY = Network delay from X to YtXD = Network delay from X to DtQY = Network delay from Q to YtQD = Network delay from Q to D
13.15Elec 326 Sequential Circuit Timing
13.2. Maximum Allowable Clock Skewo How much skew between C1 and C2 can be tolerated
in the following circuit?
n Case 1: C2 delayed after C1
D Q
Q
D Q
Q
C2
Q1 D2
C1
tPFF > th + tSK
tSK < min tPFF - th
13.16Elec 326 Sequential Circuit Timing
n Case 2: C1 delayed from C2
D Q
Q
D Q
Q
C2
Q1 D2
C1
13.17Elec 326 Sequential Circuit Timing
o How does additional delay between the flip-flopsaffect the skew calculations?
tSK ≤ min tPFF - th
tsk ≤ min tPFF + min tMUX - th
13.18Elec 326 Sequential Circuit Timing
o Summary of allowable clock skew calculations
tSK + th ≤ tPFF + tNETtSK ≤ min tPFF + min tNET - th
13.19Elec 326 Sequential Circuit Timing
o Example: What is the minimum clock period for thefollowing circuit under the assumption that the clockC2 is skewed after C1 (i.e., C2 is delayed from C1)?
N1
N2
C1 C2
Q1 D2 Q2D1D Q
Q
D Q
Q
13.20Elec 326 Sequential Circuit Timing
n First calculate the maximum allowable clock skew.
n Next calculate the minimum clock period due to the pathfrom Q1 to D2.
n Finally calculate the minimum clock period due to the pathfrom Q2 to D1
N1
N2
C1 C2
Q1 D2 Q2D1D Q
Q
D Q
Q
tSK < min tPFF + min tN1 - th
TW > max tPFF + max tN1 + tsu - min tSK
TW > max tPFF + max tN1 + tsu + max tSK
TW > max tPFF + max tN2 + tsu + (min tPFF + min tN1 - th)
TW > max tPFF + min tPFF + max tN2 + min tN1 + tsu - th
13.21Elec 326 Sequential Circuit Timing
13.3. Global Setup Time, Hold Time andPropagation Delay
o Global setup and hold times (data delayed)
TSU = tsu + max tNET TH = th - min tNET
D Q
Q
X
CK
NET D
CLK
13.22Elec 326 Sequential Circuit Timing
o Global setup & hold time (clock delayed)
D Q
QCK
D
CLK
TSU = tsu - min tC TH = th + max tC
13.23Elec 326 Sequential Circuit Timing
o Global setup & hold time (data & clock delayed)
D Q
Q
X
CK
NET D
CLK
TSU = tsu + max tNET - min tC TH = th - min tNET + max tC
13.24Elec 326 Sequential Circuit Timing
o Global propagation delayD Q
QCK NET
CLKY
Q
TP = tC + tFF + tNET
13.25Elec 326 Sequential Circuit Timing
o Summary of global timing parameters
TSU = tsu + max tPN - min tPC ≤ tsu + max tPN
TH = th + max tPC - min tPN ≤ th + max tPC
TP = tPFF + tPN + tPC
13.26Elec 326 Sequential Circuit Timing
o Example
n Find TSU and TH for input signal LD relative to CLK.
LD
DCLK CK
QD Q
Q
TSU = tsu +max tNET - min tC
TH = th - min tNET + max tC
= tsu + max tINV + max tNAND + max tNAND - min tINV
= th - min tNAND - min tNAND + max TINV
13.27Elec 326 Sequential Circuit Timing
13.4. Register load control (gating the clock)o A very bad way to add a load control signal LD to a
register that does not have one is shown below
o The reason this is such a bad idea is illustrated by thefollowing timing diagram.
o The flip-flop sees two rising edges and will triggertwice. The only one we want is the second one.
D
LD
CLK
CK
D Q
Q
13.28Elec 326 Sequential Circuit Timing
o If LD was constrained to only change when the clock was low,then the only problem would be the clock skew.
13.29Elec 326 Sequential Circuit Timing
o If gating the clock is the only way to control theloading of registers, then use the following approach:
n There is still clock skew, but at least we only have onetriggering edge.
D
LD
CLK
D Q
Q
13.30Elec 326 Sequential Circuit Timing
o The best way to add a LD control signal is as follows:
LD
DCLK
D Q
Q
13.31Elec 326 Sequential Circuit Timing
13.5. Synchronous System Structure and Timing
13.32Elec 326 Sequential Circuit Timing
13.6. Tips & Trickso Use timing diagrams to determine the timing properties of
sequential circuits
13.7. Pitfalls
o Using typical timing values from the data sheet (useonly max and/or min values)
o Gating the clock
13.33Elec 326 Sequential Circuit Timing
13.8 Reviewo How the flip-flop and gate timing parameters affect
the maximum possible clock frequency.n How clock skew affect maximum possible clock frequency.
o How the delay of logic between flip-flops affects themaximum allowable clock skew.
o How flip-flop setup and hold times are translated bythe combinational logic delays to get global setup andhold times.
o The detrimental effect of gating the clock signal.