Beruflich Dokumente
Kultur Dokumente
B
D2 Q2
Lecture 12
A Q1
FF2
Q2
FF1
Q1
tcomb(min)
D2
Q2
FF2
Q2
ITEE UQ
4/24/2006
ITEE UQ
4/24/2006
Timing diagram
tHIGH clock
There must be no change in input during this window
flip flop outputs
change
tLOW
change
input ts th
change
tcomb(max) comb(max)
change change
tsetup
thold
4
Timing calculations
Change regions indicate minimum to maximum propagation delays. For correct operation we must have: t clk - (t FF + t comb) > t setup The setup-time margin is defined as: setupt clk - (t FF(max) + t comb(max) + t setup) If this is negative, the circuit wont work. Note the use of maximum propagation delay.
Timing calculations
The hold time margin is defined as: t FF(min) + t comb(min) - t hold This, too, must be greater than or equal to zero. Note the use of minimum propagation delays.
ITEE UQ
4/24/2006
ITEE UQ
4/24/2006
4/24/2006
Clock skew
Synchronous systems using edge-triggered flip-flops work properly only if all flip-flops see the triggering clock edge at the same time. This difference between arrival times of the clock at different devices is called clock skew. How can this difference occur: In large systems, a single clock signal may not have adequate fanout to drive all the devices with clock inputs, so that it may be necessary to provide two or more copies of the clock signal.
Clock Skew
Illustrative Circuit Example:
74LS74
C
A D1 Q1
D2
Q2
FF1
Q1 CLOCKD CLOCK
FF2
Q2
ITEE UQ
4/24/2006
ITEE UQ
4/24/2006
tP
tH
CLOCKD (SAFE)
tskew
CLOCKD (MAXIMUM SKEW)
tH
ITEE UQ
tskew
4/24/2006
ITEE UQ
4/24/2006
10
Clock Skew
Good designers take care to balance the loads on multiple clocks, looking at both DC load (fanout) and AC load (wiring and input capacitance). Clock skew occurs if one clock signal is loaded much more heavily than the other; transitions on the more heavily loaded clock appear to occur later because of increases in output-transistor switching delay and signal rise and fall times.
Different ICs
BAD
GOOD
Same IC
ITEE UQ
4/24/2006
11
ITEE UQ
4/24/2006
12
4/24/2006
Hazards
Timing anomalies in combinational circuits 1 0 1-> 1 (a) Static hazard 1 0 1 -> 0 0 ->1 (b) Dynamic hazard
ITEE UQ 4/24/2006 13
x2
Static Hazards
x1 p f
0 -> 0
x3
x2 x1 x3 p q f 5 5 5 5 5 5 5 5 5 5 5 5 5 5ns
x3
x2 x1 f
x3
ITEE UQ
4/24/2006
14
Static Hazard
x1 x2 p f x3 q
Dynamic Hazard
One gate delay x1 x2, x3, x4 a b c d f (b) Timing diagram
x1 x2 x3 p q f
5 5 5 5 5 5 5 5 5 5 5 5 5 5ns
x1 x2
x3
4/24/2006
15
ITEE UQ
4/24/2006
16
HAZARDS
Static hazards can always be avoided in two-level circuits by inserting additional products. There must be a static hazard for the dynamic hazard to occur. Dynamic hazards occur in multilevel circuits. Prevention: - use two-level circuits (not always possible) - use synchronous design - always latch the outputs which are used to control other blocks of the design
ITEE UQ
4/24/2006
17
ITEE UQ
4/24/2006
18
4/24/2006
Timing Diagram
out1
Z E A !Z !Z/out1 Z C B Z D out3
!Z/out2
out2 out3
ITEE UQ
4/24/2006
19
ITEE UQ
4/24/2006
20
Clock gating
AVOID IF POSSIBLE !!! Gate the clock for the whole well defined module Legitimate use: optimising power consumption Frivolous use: cascading counters USE with CARE, and only after thorough analysis
ITEE UQ 4/24/2006 21
Clock gating
CLOCK GCLK CLKEN CLKEN GCLK CLOCK
WRONG because: If CLKEN is a state machine output or other signal produced by a register clocked by CLOCK, then CLKEN changes some time after CLOCK has already gone HIGH. This produces glitches on GCLK, and false clocking of the registers controlled by GCLK.
ITEE UQ
4/24/2006
22
Summary
Timing is more difficult than logic ! Timing is related to electrical properties Logic simulation is not enough to assure that integrated circuit will behave as expected Extensive timing simulations are performed after physical synthesis is made only then good approximations of delays are known More on timing later in the course
GCLK
ITEE UQ
4/24/2006
23
ITEE UQ
4/24/2006
24
4/24/2006