Sie sind auf Seite 1von 71

STATIC TIMING ANALYSIS STATIC TIMING ANALYSIS

Introduction Introduction

Effective methodology for verifying the timing characteristics of a design Effective methodology for verifying the timing characteristics of a design without the use of test vectors Conventional verification techniques are inadequate for complex Conventional verification techniques are inadequate for complex designs designs Simulation time using conventional simulators Simulation time using conventional simulators Thousands of test vectors are required to test all timing paths Thousands of test vectors are required to test all timing paths using logic simulation Increasing design complexity & smaller process technologies Increasing design complexity & smaller process technologies Increases the number of iterations for STA Increases the number of iterations for STA

Simulation vs. Static timing Simulation vs. Static timing

True timing paths True timing paths Timing Simulation (adding vectors) 0% 0% 100% 100%

False timing paths False timing paths

Static timing analysis (eliminating false paths)

STA approach typically takes a fraction of the time it takes to run logic simulation on a large design and guarantees 100% coverage of all true timing paths in the design without having to generate test vectors

OVERVIEW OVERVIEW
Previous Verification Flow

OVERVIEW OVERVIEW
Requires

extensive vector creation

Valid for FPGAs and smaller ASICs

Falls apart on multi-million gate ASICs

What is Static Timing Analysis?

Static Timing Analysis is a method for determining if a circuit meets timing constraints without having to simulate Proper circuit functionality is not checked Vector generation NOT required

Much faster than timing-driven, gate-level simulation

STA in ASIC Design Flow Pre STA in ASIC Design Flow Pre layout layout
Logic Synthesis Constraints
(clocks, input drive, output load)

Design For test Floor planning

Static Timing Analysis Static Timing Analysis (estimated parasitics)

STA in ASIC Design Flow STA in ASIC Design Flow Post Layout Post Layout
Floor planning Constraints
(clocks, input drive, output load)

Clock Tree Synthesis Place and Route Parasitic Extraction

Static Timing Analysis (estimated parasitics)

Static Timing Analysis (extracted parasitics)

SDF
(extracted parasitics)

2 Types of Timing Verification


Dynamic Timing Simulation Advantages Can be very accurate (spice-level) Disadvantages Non-exhaustive, slow Examples: VCS,Spice,ACE

Analysis quality depends on stimulus vectors

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

10

Three Steps in Static Timing Analysis

Circuit is broken down into sets of timing paths Delay of each path is calculated

Path delays are checked to see if timing constraints have been met

11

What is a Timing Path?

A Timing Path is a point-to-point path in a design which can propagate data from one flip-flop to another Each path has a start point and an endpoint Start point: Input ports Clock pins of flip-flops Endpoints: Output ports Data input pins of flip-flops

12

Organizing Timing Paths Into Groups

Timing paths are grouped into path groups by the clocks controlling their endpoints

Synthesis tools like PrimeTime and Design Compiler organize timing reports by path groups

13

Net and Cell Timing Arcs

The actual path delay is the sum of net and cell delays along the timing path

14

Net and Cell Delay


Total net parasitics are affected by net length net fanout Net delay and parasitics are typically

Net Delay refers to the total time needed to charge or discharge all of the parasitics of a given net

Back-Annotated (Post-Layout) from data obtained from an extraction tool Estimated (Pre-Layout)

15

Cell Delay
In ASICs, the delay of a cell is affected by: The input transition time (or slew rate) The total load seen by the output transistors Net capacitance and downstream pin capacitances

These will affect how quickly the input and output transistors can switch

Inherent transistor delays and internal net delays

16

Clocked Storage Elements


Transparent Latch, Level Sensitive

data passes through when clock high, latched when clock low

D-Type Register or Flip-Flop, Edge-Triggered

data captured on rising edge of clock, held for rest of cycle

17

Flip-Flops

18

Basic terminologies Basic terminologies


Pulse Width Pulse Width Setup & Hold times Setup & Hold times Signal slew Signal slew Clock latency Clock latency Clock Skew Clock Skew Input arrival time Input arrival time Output required time Output required time Slack and Critical path Slack and Critical path

Recovery & Removal times Recovery & Removal times False paths False paths Multi-cycle paths Multi-cycle paths

19

Pulse Width Pulse Width

Pulse width Pulse width It is the time between the active and inactive states of the same It is the time between the active and inactive states of the same signal signal

20

Setup and Hold time Setup and Hold time

Setup time Setup time For an edge triggered sequential element, the setup time is the 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 remain unchanged Hold time Hold time Time interval after the active clock edge during which the data Time interval after the active clock edge during which the data should remain unchanged should remain unchanged

Both the above 2 timing violations can occur in a design when Both the above 2 timing violations can occur in a design when clock path delay > data path delay clock path delay > data path delay

21

Signal Slew Signal Slew


Signal (Clock/Data) slew Signal (Clock/Data) slew Amount of time it takes for a signal transition to occur Amount of time it takes for a signal transition to occur Accounts for uncertainty in Rise and fall times of the signal Accounts for uncertainty in Rise and fall times of the signal Slew rate is measured in volts/sec

22

Clock Latency Clock Latency

Clock Latency Clock Latency Difference between the reference (source) clock slew to the clock Difference between the reference (source) clock slew to the clock tree endpoint signal slew values Rise latency and fall latency are specified Rise latency and fall latency are specified
INV
INV INV INV INV INV INV INV INV

CLKA CLKA Rise=7 Rise=7 Fall=4 Rise=7 Rise=7 Fall=4

Rise=7 Fall=4 CLK

Rise=7 Rise=7 Fall=4

INV

Rise=7 Rise=7 Fall=4 Fall=4


BUF

BUF

Rise=7 Rise=7 Fall=4 Fall=4

CLKB

CLKC CLKC Rise=7 Rise=7 Fall=4 Fall=4

23

Clock Latency Clock Latency

24

Clock Skew Clock Skew

Clock Skew is a measure of the difference in latency between any two Clock Skew is a measure of the difference in latency between any two leaf pins in a clock tree. leaf pins in a clock tree. between CLKA and CLKB between CLKA and CLKB rise = 22-8 = 14 rise = 22-8 = 14 fall = 22-14 = 8 fall = 22-14 = 8 between CLKB and CLKC between CLKB and CLKC rise = 8-7 = 1 fall = 14-4 = 10 fall = 14-4 = 10 between CLKA and CLKC between CLKA and CLKC rise = 22-7 = 15 rise = 22-7 = 15 fall = 22-4 = 18 fall = 22-4 = 18 It is also defined as the difference in time that a single clock signal It is also defined as the difference in time that a single clock signal takes to reach two different registers takes to reach two different registers

25

Input Arrival time Input Arrival time

Input Arrival time Input Arrival time An arrival time defines the time interval during which a data signal 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 can arrive at an input pin in relation to the nearest edge of the clock signal that triggers the data transition signal that triggers the data transition

26

Output required time Output required time


Output required time Output required time Specifies the data required time on output ports. Specifies the data required time on output ports.

27

Slack and Critical path Slack and Critical path

Slack Slack It is the difference between the required (constraint) time and the It is the difference between the required (constraint) time and the arrival time (inputs and delays). arrival time (inputs and delays). Negative slack indicates that constraints have not been met, while Negative slack indicates that constraints have not been met, while positive slack indicates that constraints have been met. positive slack indicates that constraints have been met. Slack analysis is used to identify timing critical paths in a design by Slack analysis is used to identify timing critical paths in a design by the static timing analysis tool

Critical path Critical path Any logical path in the design that violates the timing constraints Any logical path in the design that violates the timing constraints Path with a negative slack Path with a negative slack

28

Slack Analysis Data Path Slack Analysis Data Path types types

29

Slack analysis data path Slack analysis data path types types

Primary input-to-register paths Primary input-to-register paths Delays off-chip + Combinational logic delays up to the first sequential device. sequential device. Register-to-primary output paths Register-to-primary output paths Start at a sequential device Start at a sequential device CLK-to-Q transition delay + the combinational logic delay + external CLK-to-Q transition delay + the combinational logic delay + external delay requirements delay requirements Register-to-register paths Register-to-register paths Delay and timing constraint (Setup and Hold) times between Delay and timing constraint (Setup and Hold) times between sequential devices for synchronous clocks + source and destination sequential devices for synchronous clocks + source and destination clock propagation times. clock propagation times. Primary input-to-primary output paths Primary input-to-primary output paths Delays off-chip + combinational logic delays + external delay Delays off-chip + combinational logic delays + external delay requirements. requirements.

30

Hold Slack calculation Hold Slack calculation

Actual data arrival time definition Actual data arrival time definition Data Input Arrival Timemin + Data path delaymin Data Input Arrival Timemin + Data path delaymin If the data path starts in a primary input, Data Input arrivalmin = Input arrival timemin Data Input arrivalmin = Input arrival timemin If the data path starts at a register, If the data path starts at a register, (Source Clock Edgemin + Source Clock Path Delaymin) = (Source Clock Edgemin + Source Clock Path Delaymin) = Data Input Arrivalmin Data Input Arrivalmin

Required Stability time definition Required Stability time definition (Destination Clock Edgemax + Destination Clock Path Delaymax) + (Destination Clock Edgemax + Destination Clock Path Delaymax) + Hold = Required Stability Timemax Hold Slack definition Hold Slack definition Actual Data Arrivalmin - Required Stability Timemax Actual Data Arrivalmin - Required Stability Timemax

31

Calculate the hold slack Calculate the hold slack

Source Clock signal timing parameters: Min Edge = 8.002 ns Min clock path delay = 0.002 ns

Min Data path delay = 0.802 ns Hold time constraint = 1.046 ns

Destination Clock signal timing parameters: Max Edge = 2.020 ns Max clock path delay = 0.500 ns

32

Hold slack calculation Hold slack calculation

33

Setup Slack calculation Setup Slack calculation

Actual data arrival time definition Actual data arrival time definition Data Input Arrival Timemax + Data path delaymax Data Input Arrival Timemax + Data path delaymax If the data path starts in a primary input, Data Input arrivalmax = Input arrival timemax Data Input arrivalmax = Input arrival timemax If the data path starts at a register, If the data path starts at a register, (Source Clock Edgemax + Source Clock Path Delaymax) = (Source Clock Edgemax + Source Clock Path Delaymax) = Data Input Arrivalmax Data Input Arrivalmax

Required Stability time definition Required Stability time definition (Destination Clock Edgemin + Destination Clock Path Delaymin) (Destination Clock Edgemin + Destination Clock Path Delaymin) Setup = Required Stability Timemin Setup slack definition Setup slack definition Required Stability Timemin - Actual Data Arrivalmax Required Stability Timemin - Actual Data Arrivalmax

34

Calculate the setup slack Calculate the setup slack

Source Clock signal timing parameters: Max Edge = 2.002 ns Max clock path delay = 0.002 ns

Min Data path delay = 13.002 ns Setup time constraint = 0.046 ns

Destination Clock signal timing parameters: Min Edge = 20.02 ns Min clock path delay = 0.500 ns

35

Setup slack calculation Setup slack calculation

36

Recovery and Removal time Recovery and Removal time


Recovery time Recovery time Like setup time for asynchronous port (set, reset) Like setup time for asynchronous port (set, reset) Removal time Removal time Like hold time for asynchronous port (set, reset)

Recovery time Recovery time It is the time available between the asynchronous signal going inactive It is the time available between the asynchronous signal going inactive to the active clock edge to the active clock edge Removal time Removal time It is the time between active clock edge and asynchronous signal It is the time between active clock edge and asynchronous signal going inactive going inactive

37

False Paths False Paths

False paths False paths Paths that physically exist in a design but are not logic/functional Paths that physically exist in a design but are not logic/functional paths paths These paths never get sensitized under any input conditions These paths never get sensitized under any input conditions
Mux 1 A B1 B B2 C C1 C2 Mux 2

OUT

38

Multi-cycle paths Multi-cycle paths

Multi-cycle paths Multi-cycle paths Data Paths that require more than one clock period for execution Data Paths that require more than one clock period for execution 2 clock period delay

39

Sequential Circuit Timing Sequential Circuit Timing

Objectives Objectives This section covers several timing considerations encountered in the design This section covers several timing considerations encountered in the design of synchronous sequential circuits. It has the following objectives: of synchronous sequential circuits. It has the following objectives: Define the following global timing parameters and show how they can be Define the following global timing parameters and show how they can be derived from the basic timing parameters of flip-flops and gates. derived from the basic timing parameters of flip-flops and gates.

Maximum Clock Frequency Maximum Clock Frequency Maximum allowable clock skew Maximum allowable clock skew Global Setup and Hold Times Global Setup and Hold Times Discuss ways to control the loading of data into registers and show why 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. gating the clock signal to do this is a poor design practice.

40

Maximum Clock Frequency Maximum Clock Frequency

The clock frequency for a synchronous sequential circuit is limited by 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 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 maximum clock frequency for the circuit. The minimum clock period is the reciprocal of this frequency. the reciprocal of this frequency. Relevant timing parameters Relevant timing parameters Gates: Gates:

Propagation delays: min tPLH, min tPHL, max tPLH, max tPHL Flip-Flops: Flip-Flops: Setup time: tsu Setup time: tsu Hold time: th Hold time: th

Propagation delays: min tPLH, min tPHL, max tPLH, max tPHL Propagation delays: min t , min t , max t , max t

41

Example Example
D Q

CK
Q

TW max tPFF + tsu

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

42

Example Example
D Q

CK

TW max tPFF + max tPINV + tsu

43

Example Example
D Q
1

Q0 MUX

D Q Q

Q1

CK

TW max tPFF + max tPMUX + tsu

44

Example Example

Paths from Q1 to Q1: None Paths from Q1 to Q2: Paths from Q2 to Q1: Paths from Q2 to Q2: 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

45

Clock Skew Clock Skew

If a clock edge does not arrive at different flip-flops at exactly the same 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 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 difference between the times of arrival at the flip-flops is said to be the amount of clock skew. amount of clock skew.

Clock skew is due to different delays on different paths from the clock Clock skew is due to different delays on different paths from the clock generator to the various flip-flops. generator to the various flip-flops.

Different length wires (wires have delay) Different length wires (wires have delay) Gates (buffers) on the paths Gates (buffers) on the paths Flip-Flops that clock on different edges (need to invert clock for 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) Gating the clock to control loading of registers (a very bad idea)

46

Example (Effect of clock skew on clock rate) Example (Effect of clock skew on clock rate) Clock C2 skewed after C1 Clock C2 skewed after C1
D Q

Q1 C2

D2

D Q Q

Q2

C1
Q

CK

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)

47

Clock C1 skewed after C2


Q1 C2 D2
D Q Q

D Q

Q2

C1
Q

CK

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)

48

Summary of maximum clock frequency calculations Summary of maximum clock frequency calculations
D Q C1 Logic Network C2 Q1 D2 D Q

TW C1 C2 Q1 D2 tPFF tOR tsu tSK = tINV

TW C1 C2 Q1 D2 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

49

Maximum Allowable Clock Skew Maximum Allowable Clock Skew

How much skew between C1 and C2 can be tolerated in the following How much skew between C1 and C2 can be tolerated in the following circuit? circuit? Q1 D2 D Q D Q
Q Q

C1 Case 1: C2 delayed after C1 Case 1: C2 delayed after C1

C2

tPFF > th + tSK

tSK < min tPFF - th

50

Case 2: C1 delayed from C2 Case 2: C1 delayed from C2


D Q Q Q

Q1 D2
D Q

C1

C2

51

How does additional delay between the flip-flops affect the skew How does additional delay between the flip-flops affect the skew calculations? calculations?

tSK min tPFF - th

tsk min tPFF + min tMUX - th

52

Summary of allowable clock skew calculations

tSK + th tPFF + tNET tSK min tPFF + min tNET - th

53

Example: What is the minimum clock period for the following circuit under 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 the assumption that the clock C2 is skewed after C1 (i.e., C2 is delayed from C1)? from C1)?

N2 D1
D Q Q

Q1

N1

D2

D Q Q

Q2

C1

C2

54

N2 D1
D Q Q Q

Q1 N1
D Q

D2

Q2

C1

C2

First calculate the maximum allowable clock skew. First calculate the maximum allowable clock skew.

tSK < min tPFF + min tN1 - th Next calculate the minimum clock period due to the path from Q1 to D2. Next calculate the minimum clock period due to the path from Q1 to D2. TW > max tPFF + max tN1 + tsu - min tSK

Finally calculate the minimum clock period due to the path from Q2 to Finally calculate the minimum clock period due to the path from Q2 to D1

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

55

Global Setup Time, Hold Time Global Setup Time, Hold Time and Propagation Delay and Propagation Delay
Global setup and hold times (data delayed) Global setup and hold times (data delayed)
X NET CLK D CK
D Q Q

TSU = tsu + max tNET

TH = th - min tNET

56

Global setup & hold time (clock delayed) Global setup & hold time (clock delayed) D
D Q

CLK

CK

TSU = tsu - min tC

TH = th + max tC

57

Global setup & hold time (data & clock delayed) Global setup & hold time (data & clock delayed) X NET D
D Q Q

CLK

CK

TSU = + max =-0987654321\ - min .

TH = th - min tNET + max tC

58

Global propagation delay Global propagation delay


D Q

Q NET

CLK
Q

CK

TP = tC + tFF + tNET

59

Summary of global timing parameters 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

60

Example Example LD
D Q

D CK Q CLK Find TSU and TH for input signal LD relative to CLK. Find TSU and TH for input signal LD relative to CLK.

TSU = tsu +max tNET - min tC = tsu + max tINV + max tNAND + max tNAND - min tINV TH = th - min tNET + max tC = th - min tNAND - min tNAND + max TINV

61

Register load control (gating the clock) Register load control (gating the clock)

CK

A very bad way to add a load control signal LD to a register that does not A very bad way to add a load control signal LD to a register that does not have one is shown belowD have one is shown below D Q
LD CLK

The reason this is such a bad idea is illustrated by the following timing The reason this is such a bad idea is illustrated by the following timing diagram. diagram.

The flip-flop sees two rising edges and will trigger twice. The only one we The flip-flop sees two rising edges and will trigger twice. The only one we want is the second one. want is the second one.

62

If LD was constrained to only change when the clock was low, then the only If LD was constrained to only change when the clock was low, then the only problem would be the clock skew. problem would be the clock skew.

63

If gating the clock is the only way to control the loading of registers, then use the following approach: the following approach:
D CLK LD

D Q Q

There is still clock skew, but at least we only have one triggering edge. There is still clock skew, but at least we only have one triggering edge.

64

The best way to add a LD control signal is as follows:

LD D CLK

D Q Q

65

Tips & Tricks Tips & Tricks

Use timing diagrams to determine the timing properties of sequential circuits Using typical timing values from the data sheet (use only max and/or min values) Gating the clock

66

Detecting timing violations Detecting timing violations CASE 1 CASE 1


(a) Hold time for clocks is 1.5 ns Determine if there are any timing violations in this design Determine if there are any timing violations in this design
Delay (min) = 5 ns Delay (min) = 5 ns DFF 2 DFF 2

DFF 1 DFF 1 Data

clk20Mhtzref clk20Mhtzref

clk10Mhtz clk10Mhtz

67

Detecting timing violations Detecting timing violations CASE 2 CASE 2


(a) Hold time for clocks is 1.5 ns (b) Clock skew of 3.72 ns between clk20mref and clk10mz Determine if there are any timing violations in this design Determine if there are any timing violations in this design
DFF 1 DFF 1 Data Data Delay (min) = 5 ns Delay (min) = 5 ns DFF 2 DFF 2

clk20Mhtzref clk20Mhtzref

clk10Mhtz clk10Mhtz

68

Detecting timing violations Detecting timing violations CASE 3 CASE 3


(a) Hold time for clocks is 1.5 ns (b) Clock skew of 3.72 ns between clk20mref and clk10mz
Delay (min) = 5 ns Delay (min) = 5 ns DFF 2 DFF 2

DFF 1 DFF 1 Data Data

clk20Mhtzref clk20Mhtzref

clk10Mhtz clk10Mhtz

69

Detecting timing violations Detecting timing violations CASE 4 CASE 4


Consider (b) Clock skew of 3.72 ns between clk20mref and clk10mz (c) Clock network delays
DFF 1 DFF 1 Data Data clk20Mhtzref clk20Mhtzref Delay (min) = 5 ns Delay (min) = 5 ns

DFF 2 DFF 2

clk10Mhtz clk10Mhtz

Propagation delay = 4 ns Propagation delay = 4 ns (thru clock tree buffers) (thru clock tree buffers)

Propagation delay = 2 ns Propagation delay = 2 ns (thru clock tree buffers)

70

Thank you Thank you

71

Das könnte Ihnen auch gefallen