Title: Timing Analysis
1Timing Analysis
2Delay Time
- Def Time required for output signal Y to change
due to change in input signal X - Up to now, we have assumed this delay time has
been 0 seconds.
t0
t0
3Delay Time
- In a real circuit, it will take tp seconds for
Y to change due to X
t0
ttp
tp is known as the propagation delay time
4Timing Diagram
- We use a timing diagram to graphically represent
this delay
Horizontal axis time axis Vertical axis
Logical level axis (Logic One or Logic Zero)
5Timing Diagram
- We see a change in X at t0 causes a change in Y
at ttp
Horizontal axis time axis Vertical axis
Logical level axis (Logic One or Logic Zero)
6Timing Diagram
- We also see a change in X at tT causes another
change in Y at tTtp
We see that logic circuit F causes a delay of tp
seconds in the signal
7Simple Example Not Gate
Let tp2 ns Where ns nanosecond 1x10-9
seconds
2ns
8Simple Example 2 Not Gates
Let tp2 ns
4ns
2ns
2ns
Total Delay 2ns 2ns 4ns
9Simple Example 2 Not Gates
Notes Time axis is shared among signals
Logic levels (1 or 0) are implied, not shown
10Simple Example 2 Not Gates
Sometimes dashed vertical lines are added to aid
reading diagram
2ns
2ns
2ns
2ns
2ns
11Where does this delay come from?
12Circuit Delay
- All electrical circuits have intrinsic resistance
(R) and capacitance (C).
Lets analyze a simple RC circuit
13Circuit Delay Simple RC Circuit
Vin
Vout
Note
14Circuit Delay Example
Vin
Vout
Let R1ohm, C1F, so that RC1 second Time
Delay is 0.7s or 700 ms for 0.5Vdd Time Delay is
2.3s for 0.9Vdd Time Delay is 4.6s for 0.99 Vdd
15How do we relate this to logic diagrams?
16Def tplh
tplh low-to-high propagation delay time
This is the time required for the
output to rise from 0V to ½ VDD
tplh
17Def tphl
Tphl high-to-low propagation delay time
This is the time required for the
output to fall from Vdd to ½ VDD
tphl
18Def tp (propagation delay time)
Lets define tp propagation delay time as
This will be the average delay through the
circuit
19Gate Delay Simple RC Model
Ideal gate with tp0 delay
RC network
Tptp_not
Equivalent model with Gate delay of tp_not
Ideal gate with RC network
20Gate Delay - Example
X
0
25ns
5ns
Y
tp_not
0
5ns
30ns
We indicate tp on the gate
21Combinational Logic Delay
Longest delay
This circuit has multiple delay paths A-Y
5ns5ns5ns15ns B-Y 5ns5ns5ns5ns20ns C-Y
5ns5ns5ns15ns D-Y 5ns
Shortest delay
Longest delay 20ns Shortest delay 5ns
22Combinational Logic Delay
Longest delay
Well use the longest delay to represent the
logic function F. Lets call it Tcl for time,
combinational logic
Shortest delay
Longest delay 20ns
23Combinational Logic (CL) Cloud Model
Tcl20ns
Tcl20ns
24Logic Simulators
- Used to simulate the output response of a logic
circuit.
25Logic Simulations
- Three primary types
- Circuit simulator (e.g. PSPICE)
- Exact delay for each gate
- Most accurate timing analysis
- Very slow compared to other types
- Functional Simulation (e.g. Quartus )
- Assumes one unit delay for each gate
- Very fast compared to other types
- Most inaccurate timing analysis
- Timing Simulation (e.g. Quartus)
- Assumes average tp delay for each gate
- Not the fastest or slowest timing analysis
- Provides pretty good timing analysis
26TPS Quizzes
27Timing Quiz 1
28Calculate all delay paths through the circuit
shown below
What is the shortest and longest delay?
29Solution Calculate all delay paths through the
circuit shown below
This circuit has multiple delay paths A-Y
5ns5ns10ns20ns B-Y 2ns5ns5ns10ns22ns B-Y
8ns5ns10ns23ns C-Y 8ns5ns10ns23ns D-Y
10ns
Shortest path10ns Longest path23ns
30Timing Quiz 2
31Given the circuit below, find(a) Expression for
the logic function(b) Longest delay in original
circuit
32Solution Given the circuit below, find(a)
Original logic function(b) Longest delay in
original circuit
Longest Delay 7ns7ns 14ns
33Timing Quiz 3
34Given the circuit below,(a) Using Boolean
Algebra, minimize the logic function(b) Longest
delay in minimized circuit Delay times are
NOT gates 2ns AND,OR gates 5ns NAND,
NOR gates 7ns XOR gates 10ns XNOR
gates 12ns
35Solution Given the circuit below, find(a)
Minimized logic function(b) Longest delay in
minimized circuit Delay times are NOT
gates 2ns AND,OR gates 5ns NAND, NOR
gates 7ns XOR gates 10ns XNOR gates
12ns
You can show
36Solution Given the circuit below, find(a)
Minimized logic function(b) Longest delay in
minimized circuit Delay times are NOT
gates 2ns AND,OR gates 5ns NAND, NOR
gates 7ns XOR gates 10ns XNOR gates
12ns
Longest delay is 7ns
37Solution Expanded
38Given the circuit below,(a) Using a Truth Table
and a K-map, minimize the logic function
39Solution
40D-FF Timing
41Def Clock Period and Switching Frequency
Tc
0
Tc cycle period, seconds
Switching frequency,
42D-FF Timing Parameters
time
Timing Diagram
0
Tsu setup time D must be stable
(unchanging) tsu seconds before the clock
edge Thd hold time D must be stable
thd seconds after the clock edge. Tq
register delay time Q becomes valid tq
seconds after the clock edge.
If Tsu or Thd are violated, data are NOT stored
in D-FF
43Maximum Switching Frequency
- How fast can our circuits operate
44Maximum Switching Frequency Model
No feedback and thd0ns
W
We need to find the minimum time, Tc,min, needed
to propagate a signal from input X to node W.
45Maximum Switching Frequency Model
No feedback and thd0ns
W
From the model, we see that the minimum cycle
time is
Register Setup time
46Timing Diagram Maximum Switching Frequency
This model assumes tqtout lt tintcltsu
Tc,min
47Clock is too fast!!!
We have a setup time violation because the clock
is too fast!!!
48Correcting a Setup Time Violation
- Slow down the clock so that
However, in most cases, Tc is a system parameter
which cannot be changed. Plus, most users want
their designs to go faster not slower.
2. Use a pipeline design. Lets examine this
option more closely.
49Original Design
W
50Pipeline Design
Lets break the F Logic into two components, so
that F F1 F2 and tcl tcl1
tcl2
51Pipeline Design
Now, lets add two register blocks. One between
F1 and F2 and another one at the output.
52Pipeline Design Minimum Cycle Time for Each Stage
Stage 1
Stage 2
Stage 1
Stage 2
For simplicity,
53Pipeline Design Maximum Switching Frequency
Calculation
Stage 1
Stage 2
54Pipeline Design Maximum Switching Frequency
Calculation
We have,
where
so,
or,
55Pipeline Design Maximum Switching Frequency
Calculation
Stage 1
Stage 2
In other words, the pipeline design can run 2x
as fast as the original design. Lets look at a
timing diagram to see why.
56Stages 1 and 2 run in parallel
Too Slow
57End of Lecture
58N-stage Pipeline Design
59Lets extend this concept to an N stage
pipe What is the maximum switching frequency?
Let the total logic delay Tcl Tcl1Tcl2 .
Tcl,N
60i.e. all stages have equal delays.
We have for each stage
61Now, assume
So
Or,
62In other words, the pipelined design will
operate N times faster than the original design.
63Now, lets set
So
64constant
So,
65In other words, the absolute maximum frequency of
any design is fixed at
We can use this formula to perform a back of the
envelope calculation to determine if a desired
switching frequency is feasible
66- The pipeline approach is a very powerful design
technique. - However, we have two major trade-offs using a
- pipelined design. They are
- Data Load Time and 2. Data Latency Time
67DATA Load Time
At power-up, we must first load the pipeline.
This will require a time of
68DATA Latency Time
Data will require a finite time to progress
through the pipe, this is equivalent to the Data
load time.
unacceptable
Note as,
we find,