Static Timing Analysis
Static Timing Analysis
© Mirafra Technologies 1
Introduction
Effective methodology for verifying the timing characteristics of a design without the use of test vectors
Conventional verification techniques are inadequate for complex designs
Simulation time using conventional simulators
Thousands of test vectors are required to test all timing paths using logic simulation
Increasing design complexity & smaller process technologies
Increases the number of iterations for STA
© Mirafra Technologies 2
Simulation vs. Static timing
0% 100%
© Mirafra Technologies 3
OVERVIEW
© Mirafra Technologies 4
OVERVIEW
© Mirafra Technologies 5
What is Static Timing Analysis?
© Mirafra Technologies 6
STA in ASIC Design Flow – Pre layout
Logic Synthesis
Constraints
(clocks, input drive,
output load) Design For test
Floor planning
Static Timing Analysis
© Mirafra Technologies 7
STA in ASIC Design Flow – Post Layout
Floor planning
Constraints
(clocks, input drive,
output load) Clock Tree Synthesis
© Mirafra Technologies 8
2 Types of Timing Verification
Dynamic Timing Simulation
Advantages
Can be very accurate (spice-level)
Disadvantages
Analysis quality depends on stimulus vectors
Non-exhaustive, slow
Examples:
VCS,Spice,ACE
© Mirafra Technologies 9
2 Types of Timing Verification
Static Timing Analysis (STA)
Advantages
Fast, exhaustive
Better analysis checks against timing requirements
Disadvantage
Less accurate
Must define timing requirements/exceptions
Difficulty handling asynchronous designs, false paths
© Mirafra Technologies 10
Three Steps in Static Timing Analysis
© Mirafra Technologies 11
What is a Timing Path?
© Mirafra Technologies 13
Net and Cell Timing Arcs
The actual path delay is the sum of net and cell delays along the
timing path
© Mirafra Technologies 14
Net and Cell Delay
“Net Delay” refers to the total time needed to charge or discharge all of the
parasitics of a given net
Total net parasitics are affected by
net length
net fanout
Net delay and parasitics are typically
Back-Annotated (Post-Layout) from data obtained from
an extraction tool
Estimated (Pre-Layout)
© Mirafra Technologies 15
Cell Delay
© Mirafra Technologies 16
Clocked Storage Elements
Transparent Latch, Level Sensitive
– data passes through when clock high, latched when clock low
© Mirafra Technologies 17
Flip-Flops
© Mirafra Technologies 18
Basic terminologies
Pulse Width Recovery & Removal times
Setup & Hold times
False paths
Signal slew
Clock latency Multi-cycle paths
Clock Skew
Input arrival time
Output required time
Slack and Critical path
© Mirafra Technologies 19
Pulse Width
Pulse width
It is the time between the active and inactive states of the same signal
© Mirafra Technologies 20
Setup and Hold time
Setup time
For an edge triggered sequential element, the setup time is the time interval before the active
clock edge during which the data should remain unchanged
Hold time
Time interval after the active clock edge during which the data should remain unchanged
© Mirafra Technologies 21
Signal Slew
Signal (Clock/Data) slew
Amount of time it takes for a signal transition to occur
Accounts for uncertainty in Rise and fall times of the signal
Slew rate is measured in volts/sec
© Mirafra Technologies 22
Clock Latency
Clock Latency
Difference between the reference (source) clock slew to the clock tree endpoint signal slew
values
Rise latency and fall latency are specified
INV
INV INV INV INV CLKA
Rise=7 Rise=7 Rise=7 Rise=7
Fall=4 Fall=4 Fall=4 Fall=4
BUF CLKC
Rise=7
Fall=4
© Mirafra Technologies 23
Clock Latency
© Mirafra Technologies 24
Clock Skew
Clock Skew is a measure of the difference in latency between any two leaf pins in a clock tree.
between CLKA and CLKB
rise = 22-8 = 14
fall = 22-14 = 8
between CLKB and CLKC
rise = 8-7 = 1
fall = 14-4 = 10
between CLKA and CLKC
rise = 22-7 = 15
fall = 22-4 = 18
It is also defined as the difference in time that a single clock signal takes to reach two different
registers
© Mirafra Technologies 25
Input Arrival time
Input Arrival time
An arrival time defines the time interval during which a data signal can arrive at an input pin in
relation to the nearest edge of the clock signal that triggers the data transition
© Mirafra Technologies 26
Output required time
Output required time
Specifies the data required time on output ports.
© Mirafra Technologies 27
Slack and Critical path
Slack
It is the difference between the required (constraint) time and the arrival time (inputs and delays).
Negative slack indicates that constraints have not been met, while positive slack indicates that
constraints have been met.
Slack analysis is used to identify timing critical paths in a design by the static timing analysis tool
Critical path
Any logical path in the design that violates the timing constraints
Path with a negative slack
© Mirafra Technologies 28
Slack Analysis – Data Path types
© Mirafra Technologies 29
Slack analysis – data path types
Primary input-to-register paths
Delays off-chip + Combinational logic delays up to the first sequential device.
Register-to-primary output paths
Start at a sequential device
CLK-to-Q transition delay + the combinational logic delay + external delay requirements
Register-to-register paths
Delay and timing constraint (Setup and Hold) times between sequential devices for synchronous
clocks + source and destination clock propagation times.
Primary input-to-primary output paths
Delays off-chip + combinational logic delays + external delay requirements.
© Mirafra Technologies 30
Hold Slack calculation
© Mirafra Technologies 31
Calculate the hold slack
Source Clock signal timing parameters: Min Data path delay = 0.802 ns
Min Edge = 8.002 ns Hold time constraint = 1.046 ns
Min clock path delay = 0.002 ns
© Mirafra Technologies 32
Hold slack calculation
© Mirafra Technologies 33
Setup Slack calculation
© Mirafra Technologies 34
Calculate the setup slack
Source Clock signal timing parameters: Min Data path delay = 13.002 ns
Max Edge = 2.002 ns Setup time constraint = 0.046 ns
Max clock path delay = 0.002 ns
© Mirafra Technologies 35
Setup slack calculation
© Mirafra Technologies 36
Recovery and Removal time
Recovery time
Like setup time for asynchronous port (set, reset)
Removal time
Like hold time for asynchronous port (set, reset)
Recovery time
It is the time available between the asynchronous signal going inactive to the active clock edge
Removal time
It is the time between active clock edge and asynchronous signal going inactive
© Mirafra Technologies 37
False Paths
False paths
Paths that physically exist in a design but are not logic/functional paths
These paths never get sensitized under any input conditions
Mux 1 Mux 2
A C C1 C2 OUT
B1 B2
B
© Mirafra Technologies 38
Multi-cycle paths
Multi-cycle paths
Data Paths that require more than one clock period for execution
© Mirafra Technologies 39
Sequential Circuit Timing
Objectives
This section covers several timing considerations encountered in the design of synchronous sequential
circuits. It has the following objectives:
Define the following global timing parameters and show how they can be derived from the basic
timing parameters of flip-flops and gates.
• Maximum Clock Frequency
• Maximum allowable clock skew
• Global Setup and Hold Times
Discuss ways to control the loading of data into registers and show why gating the clock signal to do
this is a poor design practice.
© Mirafra Technologies 40
Maximum Clock Frequency
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 maximum clock frequency for the circuit. The minimum
clock period is the reciprocal of this frequency.
Relevant timing parameters
Gates:
• Propagation delays: min tPLH, min tPHL, max tPLH, max tPHL
Flip-Flops:
• Propagation delays: min tPLH, min tPHL, max tPLH, max tPHL
• Setup time: tsu
• Hold time: th
© Mirafra Technologies 41
Example
D Q Q
CK Q
For the 7474, max tPLH = 25ns, max tPHL = 40ns, tsu = 20ns
TW ≥ max (max tPLH + tsu, max tPHL + tsu)
TW ≥ max (25+20, 40+20) = 60
© Mirafra Technologies 42
Example
D Q Q
CK
© Mirafra Technologies 43
Example
0
Q0 D Q
Q1
D Q MUX
1
Q Q
CK
© Mirafra Technologies 44
Example
TW ≥ 47 ns
© Mirafra Technologies 45
Clock Skew
If a clock edge does not arrive at different flip-flops at exactly the same time, then the clock is said
to be skewed between these flip-flops. The difference between the times of arrival at the flip-flops is
said to be the amount of clock skew.
Clock skew is due to different delays on different paths from the clock generator to the various flip-
flops.
• Different length wires (wires have delay)
• Gates (buffers) on the paths
• Flip-Flops that clock on different edges (need to invert clock for some flip-flops)
• Gating the clock to control loading of registers (a very bad idea)
© Mirafra Technologies 46
• Example (Effect of clock skew on clock rate)
Clock C2 skewed after C1
D2 Q2
D Q
Q1 D Q
C2
C1 Q
Q
CK
TW ≥ max TPFF + max tOR + tsu TW ≥ max TPFF + max tOR + tsu - min tINV
(if clock not skewed, i.e., tINV = 0) (if clock skewed, i.e., tINV > 0)
© Mirafra Technologies 47
Clock C1 skewed after C2
D2 Q2
D Q
Q1 D Q
C2
C1 Q
Q
CK
© Mirafra Technologies 48
Summary of maximum clock frequency calculations
Q1 D2
D Q D Q
Logic
C1 Network C2
TW
TW
C1
C1 tSK = tINV
tSK = tINV C2
C2
Q1
Q1
D2
D2
tPFF tOR
tPFF tOR ts u
ts u
C2 skewed after C1: TW ≥ max TPFF + max tNET + tsu - min tINV
C2 skewed before C1: TW ≥ max TPFF + max tNET + tsu + max tINV
© Mirafra Technologies 49
Maximum Allowable Clock Skew
How much skew between C1 and C2 can be tolerated in the following circuit?
D Q
Q1 D2 D Q
Q Q
C1 C2
– Case 1: C2 delayed after C1
© Mirafra Technologies 50
Case 2: C1 delayed from C2
D Q
Q1 D2 D Q
Q Q
C1 C2
© Mirafra Technologies 51
How does additional delay between the flip-flops affect
the skew calculations?
© Mirafra Technologies 52
Summary of allowable clock skew calculations
© Mirafra Technologies 53
Example: What is the minimum clock period for the following circuit under the assumption that the clock
C2 is skewed after C1 (i.e., C2 is delayed from C1)?
N2
D1 Q1 D2 Q2
D Q N1 D Q
Q Q
C1 C2
© Mirafra Technologies 54
N2
D1 Q1 D2 Q2
D Q N1 D Q
Q Q
C1 C2
TW > max tPFF + max tN2 + tsu + (min tPFF + min tN1 - th)
TW > max tPFF + min tPFF + max tN2 + min tN1 + tsu - th
© Mirafra Technologies 55
Global Setup Time, Hold Time and Propagation Delay
CK
CLK Q
© Mirafra Technologies 56
Global setup & hold time (clock delayed)
D D Q
CK
CLK Q
© Mirafra Technologies 57
Global setup & hold time (data & clock delayed)
X NET D D Q
CK
CLK Q
© Mirafra Technologies 58
Global propagation delay
D Q
Q
NET Y
CK
CLK Q
TP = tC + tFF + tNET
© Mirafra Technologies 59
Summary of global timing parameters
© Mirafra Technologies 60
Example
LD Q
D Q
D CK
CLK Q
© Mirafra Technologies 61
Register load control (gating the clock)
• A very bad way to add a load control signal LD to a register that does not have one is shown below
D D Q
LD CK
Q
CLK
• The reason this is such a bad idea is illustrated by the following timing diagram.
• The flip-flop sees two rising edges and will trigger twice. The only one we want is the second one.
© Mirafra Technologies 62
If LD was constrained to only change when the clock was low, then the only problem would be the
clock skew.
© Mirafra Technologies 63
If gating the clock is the only way to control the loading of registers, then use the following approach:
D D Q
CLK Q
LD
There is still clock skew, but at least we only have one triggering edge.
© Mirafra Technologies 64
The best way to add a LD control signal is as follows:
LD
D Q
D
CLK Q
© Mirafra Technologies 65
Tips & Tricks
© Mirafra Technologies 66
Detecting timing violations – CASE 1
Delay (min) = 5 ns
DFF 1 DFF 2
Data
clk20Mhtzref clk10Mhtz
© Mirafra Technologies 67
Detecting timing violations – CASE 2
Data
clk20Mhtzref clk10Mhtz
© Mirafra Technologies 68
Detecting timing violations – CASE 3
Data
clk20Mhtzref clk10Mhtz
© Mirafra Technologies 69
Detecting timing violations – CASE 4
Consider
(a) Clock skew of 3.72 ns between clk20mref and clk10mz
(b) Clock network delays
Data
clk20Mhtzref clk10Mhtz
© Mirafra Technologies 70
Thank you
© Mirafra Technologies 71