This action might not be possible to undo. Are you sure you want to continue?
Static Timing Analysis Introduction Depending on the design methodologies used, three types of timing analysis methods are commonly used: Manual analysis, static timing analysis and dynamic timing analysis. Latch based designs are not common in large-scale integration, a separate section is attached at the end of the notes to cover latch based static timing analysis. Manual analysis consists of taking a schematic or a netlist to determine the times signals arrive or leave at the input and output ports of the design, and calculating the delay time for the path by adding up the delay times for each component in the path. The objective of the process is to ensure that all signals meet the circuit constraints. This method works well for simple circuits and it is undesirable for large or iterative design process. Dynamic timing analysis verifies circuit timing by applying test vectors to the circuit. This approach is an extension of simulation and ensures that circuit timing is tested in its functional context. This method reports timing errors that functionally exist in the circuit and avoids reporting errors that occur in unused circuit paths. The most common dynamic timing analysis is the so-called minmax analysis method. Under min-max timing analysis, both minimum and maximum delays of circuit components are used to generate outputs, which are ranges (the spread of earliest data and latest arrival data) instead of edges. Since outputs are in turn fed into inputs, managing the ranges (merging them) can become very complex. As can be seen, if both min version & max version of the delays must be used, the simulation speed will be extremely slow.
Page 1 of 49
Another major issue with dynamic timing analysis is the incomplete coverage. It may only check circuitry that is exercised by test stimulus, which may leave critical paths untested, and timing problems undiscovered. It is also not path oriented. Since dynamic timing analysis reports errors on a certain pin at a certain time, the user must trace through the schematic to locate the path that caused the problem (difficult for large designs). Finally this method requires development time for test vectors. Dynamic timing analysis tools often track more information than logic simulators, making their performance slower. Also each component must contain both timing information and a functional model before timing verification can proceed. This could prevent the use of new parts that do not have functional models. It should be noted that min-max simulation is not currently used in the industry. Instead, either functional simulation with timing (timing simulation) or formal verification method is typically used to verify complex IC designs. Typically people use the max version of delays to verify the circuit works under worst-case timing (no setup issues) and min version of the delays to verify best-case timing (no hold issues). Static timing analysis verifies circuit timing by adding up propagation delays along paths between clocked elements in a circuit. It checks the delays along each path against the specified timing constraints for each circuit path and reports any existing timing violations. Static timing analysis tools can determine and report timing statistics such as the total number of paths, delays for each path and the circuit’s most critical paths. As design complexity increases, performing timing analysis manually becomes extremely difficult and sometimes even impossible. With increasing popularity of HDL based design methodologies, static timing analysis becomes increasingly popular among digital logic designers.
Page 2 of 49
To summarize, both static and dynamic timing analysis methods offer tradeoffs. One is not a replacement for the other. However, the static timing analysis method offers more complete coverage, little overhead, and the ability to report errors in terms of the design schematic.
Page 3 of 49
Commercially Available Static Timing Analysis Tools The following Static timing analysis tools are the most popular ones by ASIC designers. Synopsys Inc: PrimeTime & DesignTime Cadence Design Systems: Pearl Dynamic Timing Analysis Summary Advantages: 1.Extends coverage of circuit simulation (edges to region). 2.Evaluates worst-case timing using both minimum and maximum delay values for components. 3.Uses the same test stimulus as logic simulation. 4.Does not report false errors. Disadvantages: 1.It is not complete. 2.It is not path oriented. 3.It is slower than logic simulation and may require additional test stimulus. 4.It requires functional behavioral models. Dynamic timing analysis extends logic simulation by reporting violations in terms of simulation times and states. To test circuit timing using worst-case conditions, dynamic timing analysis evaluates the circuit using minimum and maximum propagation delays for each component for each component in the design. Since dynamic timing analysis performs a simulation, it can use the same stimulus as a logic simulation. Because the stimulus functionally exercises the design, false errors of unused or
Page 4 of 49
3. 2. This makes static analysis available earlier since development time for stimulus and models are not required. However. It is path oriented and finds all setup and hold violations. 2. A logic simulation reports results as edge times and a timing simulation reports results as regions of ambiguity. It does not require stimulus or functional models. (for the same amount of coverage) Disadvantages: 1. This allows the design to be analyzed much faster.It cannot detect timing errors related to logical operation. they specify a range of time in which an event can occur. Because static timing analysis does not perform logic simulation. Note a timing simulation reports results differently than a logic simulation.It can report false errors.5 uninteresting paths are not tested. It resembles manual analysis methods. Static Timing Analysis Summary Advantages: 1. not just those exercised by test stimulus. except that it is automated. test stimulus and functional models are not required. It is faster than simulation. Static timing analysis is similar to manual analysis process. The modeling requirements for a static analysis tool are relatively simple. This method is also complete because it traces and evaluates all paths in a design. The results of a timing simulation do not specify exactly when an event occurs. This makes it possible for a designer to experiment with different synthesis options and constraints in a short time. 4. timing information for each component in the Page 5 of 49 .
hold time specifications and signal inversion information. However. Static analysis tools cannot detect timing errors related to logical operation.6 design is required and the designer must specify waveform information about the input data and clock signals the design uses. and clock frequency constraints. the potential to detect some false errors exists since circuit behavior is not considered during the analysis. it cannot detect timing errors. Such timing information typically include: pin-topin delays. The major drawback of a static timing analysis tool is that it reports false errors. that are based on the logical operation of the circuit. The component timing information can be found in parts libraries or data books. static timing analysis ensures that all possible setup and hold violations in the circuit have been found. Page 6 of 49 . setup. such as race conditions. Because static timing analysis does not perform functional testing. Clock and data waveforms are a normal requirement of the design process. and do not require additional development time. By checking all possible paths in a design.
transition time measurement rise time fall time Propagation delay time is the time between the specified reference points on the input and output voltage waveforms with the output changing from one defined level (high or low) to the other defined level. Transition fall time is the time between a specified high voltage level and a specified low voltage level. Propagation delay time up is the time between the specified transition reference points on the input and output voltage waveforms with the output changing from low level to the defined high level. Timing Measurements for Primitive Gates Transition time is the time between one specified voltage level and another voltage level for a given signal. Propagation delay time down is the time between the specified transition reference points on the input and output voltage Page 7 of 49 . Transition rise time is the time between a specified low voltage level and a specified high voltage level.7 Timing Models Static timing analysis tools typically use timing models at the logic primitive level. The following are some of the common timing parameters for primitive logic gates. The timing parameters are typically similar among different timing tools. flip-flop and latch.
8 waveforms with output changing from high level to the defined low level. Setup time is specified as the shortest interval for which correct operation of the flip-flop is guaranteed. Edge Triggered Flip-Flop Timing Measurements C D Q C D Page 8 of 49 Q . Hold time is specified as the shortest interval for which correct operation of the flip-flop is guaranteed. Propagation delay time is the time between the specified transition reference points on the clock input and data output voltage waveforms with the output changing from one defined level (high or low) to the other defined level. Hold time is the time interval between a specified transition reference point of the clock input signal and a specified transition reference point of the data input signal. Propagation Delay Time Measurement A A B Z Z time down time up Timing Measurements for Edge Triggered Flip-Flops Setup time is the time interval between a specified transition reference point of the data input signal and a specified transition reference point of the clock input signal.
However. Note that the control to output measurement is not quite accurate in this case. reference points are not the same as shown in the wavefom diagrams.9 hold time setup C to Q Timing Measurements for Level Sensitive Latches The definition of setup time and hold time for a latch are the same for those for an edge triggered flop-flop. Propagation delay time is the time between either the specified transition reference points on the control input or the data input and data output voltage waveforms with the output changing from one defined level (low or high) to the other defined level. the timing measurements are for the transparent mode. In this case. Timing Measurements for a level sensitive Latch D Q C C D Q C->Q setup D->Q hold Page 9 of 49 .
10 Common Features of Static Timing Analysis Tools Static timing analysis tools are used for three major purposes: design characterization. often a maximum frequency. Characterization involves deriving a timing model for the design under analysis. In the analysis mode. Given a system performance requirement. The circuit critical paths are typically derived during the characterization mode. Most timing analysis tools also provide a tracing capability for debugging purposes. This model can be used for board level or system level timing analysis. a designer would often want to know if the design would operate reliably under the given system timing environment. Page 10 of 49 . data required times and other constraints are given. lower level modules can be characterized so that they can be used hierarchically to reduce overall analysis time. The environment includes the input signal arrival time as well as the required departure times (also referred to as stable time and required time) of the output signals. design analysis & verification and design debugging (tracing). In additional to performance estimation. and the timing analysis tool would trace all the paths or a subset of them based on some threshold delay value. data arrival times. Typically a source and a destination are selected. the given design is analyzed under a given timing environment where clock frequency.
output required times. input arrival times. The following diagram shows typical design environments settings: set drive set operating conditions set wire load create clock definition set max area set multicycle paths set false paths set max delay paths set min delay paths set max capacitance set max transition set max fanout set output delay set drive or set drive cell set Resistance set Capacitance set max capacitance set max transition set max fanout set input delay set R C The left hand side parameters specify timing environment parameters on inputs. output loads. the most common parameters used to describe the timing environments include the system clock frequencies. Page 11 of 49 . For synchronous digital circuits. input loads and drive strengths on the input side. the right hand side parameters specify timing environment parameters on outputs.11 Timing Environments Most design modules are specified to meet certain performance goals.
register to primary output and primary input to primary output.12 The ones in the middle are typically the parameters for the design itself. constraints can be applied so that a static timing analyzer can check the circuit for any potential violation: 1. Refer to notes on how to set design constraints using Synopsys design compiler. Primary input to register paths This type of paths can be constrained by defining the clock for the register and setting the input delay for the input (arrival time) with respect to the clock. critical path identification and timing model generation (e. Primary input to primary output paths This type of paths can be constrained by setting an input delay on the input port (arrival time). extracting chip level timing models for board level timing analysis). 4. Register to primary output paths This type of paths can be constrained by defining the clock for the register and setting an output delay relative to a clock on the output port (departure time). Register to register paths This type of paths can be constrained by defining the clock(s) for the registers. Page 12 of 49 . and minimum and/or maximum delays required at the output (departure time).g. 3. 2. They are primary input to register. For each type of paths. Path Analysis Path analysis is the most fundamental type of analysis and is used as basis for slack analysis. register-to-register. Timing Paths Definitions There are four types of timing paths in a synchronous design.
During path tracing. Page 13 of 49 . signals that propagate through a device contains a region of ambiguity. A path has a source and a destination. output rise max (tRmax). the shorted delay from the shorted paths are used to make sure that the “fast” signals will be stable long enough to meet the hold time requirement. To perform a worst case analysis. After tracing. Adding Component Delays When a static timing tool calculates a path delay. This region is the range of time in which the signal arrives at or leaves the device and it is denoted by minimum and maximum signal edges. To perform a best case analysis. the output polarity causes the signal to change polarity as well. If the longest paths are needed.13 Ambiguity Region of a Design Because the specifications for circuit devices have a tolerance range associated with them. both the rise and fall min paths (tRmin and tFmin) for each individual path is compared to others to find the ones with minimum delays. output fall min (tFmin) and output fall max (tFmax). the longest delay from the longest paths are used to make sure that the “slow” signals will still make it on time with enough setup time. it propagates min and max delay values for both rise and fall transitions. both the rise and fall max paths (tRmax and tFmax) for each individual path is compare to others to find the ones with max delays. each path would have four values: output rise min (tRmin). If the shortest paths are needed.
6) For the above simple path A to Z: tRmin = 8+6+4 = 18 tRmax = 12+8+6=26 tFmin = 4+2+8 = 14 tFmax = 6+4+12=22 Page 14 of 49 .6) Path delays for the above path: tRmin = 8 + 2 + 7 = 17ns tRmax = 10 + 4 + 9 = 23ns tFmin = 3 + 6 + 4 = 13ns tFmax = 5 + 8 + 6 = 19 Example: Determine the path delay for the following circuit segment: A Z rise=(8.8) fall=(2.9) fall=(4.8) fall=(2.14 Example: Determine the path delays for the following circuit segment: rise=(8.5) rise=(6.4) rise=(8.6) rise=(6.12) fall=(4.12) fall=(4.4) rise=(7.10) fall=(3.
we assume that the delay rise and delay fall are the same.15 Longest and Shortest Paths Calculation For each input pin to an output pin of a basic component. these six numbers are made of minimum. we may just use a single number for a component to represent its delays for all the paths in the logic component. the “clock to Q” delay of a flip-flop are also included in the calculation. the AND gate g2 has delay of 40ns. The shortest path is the path which has the smallest delay from start point to end point. In the following sections. Example: Given that the inverter g1 has delay of 20ns. A timing analyzer calculates the delay of a path by tracing from a starting point of the path to its ending point. the AND gate g3 has delay of 30ns and the OR gate g4 has delay 30ns. Also the minimum. calculate the longest and shortest path from A to F: B H A D g2 40ns g4 E 30ns 30ns F g 1 20ns C g3 Page 15 of 49 . typical and maximum delays are assumed to be the same. cumulatively adding delays along the way. there are four or six numbers (in this case. For simplicity. if a single number is used. The longest path is the path that has the largest delay from start point to end point. When calculating the longest and shortest paths. typical and max for both delay up and delay down).
Hierarchical timing analysis 2. The problem with this approach is that the longest path may not be a register to register path in which case the clock to register output and register setup time are not known. Feasibility studies 4.16 After exhaustively trace all the paths from A to F: The longest path: A→g1→D→g2→H→g4→F 20+40+30=90ns The shortest path: A→g3→E→g4→F = 30+30 = 60ns = Timing Characterization In the following scenarios. a design/module needs to be characterized: 1. Setup and hold time requirements for the first level flip-flop elements with respect to primary inputs 3. Primary inputs to primary outputs delays The following sections show how these timing parameters can be calculated: Maximum Frequency Calculation One way to calculate the frequency is to take the longest path in a circuit and use it as the basis for estimating a maximum frequency. A custom block A typical design/module can be fully characterized (timing wise for verification) with the following parameters: 1. It is more often that the frequency calculation is performed for register to register paths. If a design does not have any registers or Page 16 of 49 . Max internal frequency 2. For Reuse 3. Also primary input to register delay and register to output delay may not be complete to calculate frequency. Clock to output delays for the last level flip-flop elements 4.
the minimum clock period is first estimated. That is: Max frequency = 1/(minimum clock period) = 1/(clk→Q + max path + setup) Example: Given the following circuit.17 if a design has only one level of registers. frequency calculation is typically not performed. and the setup time of the destination register is 5ns. or the exact input arrival time and the output required time must be known. To get the maximum frequency. In another word. calculate the maximum frequency. IN3 IN1 OUT2 OUT1 IN2 D1 Q1 90 5 D2 Q2 C2 CLK C1 10 The minimum clock period would then be 10 + 90 + 5 = 105ns The maximum frequency is 1/(minimum clock period) = 1/105 = 9. the delay from C1 to Q1 of the source register is 10ns. the maximum path delay from source register Q output to destination register D input and the setup time of the destination register. This is done by adding up the maximum clock to output delay of the source register.5Mhz Page 17 of 49 . if the longest delay from Q1 to D2 is 90ns. the timing environment must be complete.
18 Setup Time and Hold Time Evaluation at the Primary Inputs Once a design is synthesized into gate level technology dependent network. The first task is to identify the clock and data signals at the primary inputs. Example: In the circuit below calculate the setup and hold time for the circuit at the primary inputs with the following given information: • The setup time for the registers are 10ns • The hold time for the registers are 5ns Page 18 of 49 . a static timing analyzer can characterize the setup time and hold time at the chip primary inputs. the sum of the setup time and hold time with respect to one pair of clock and data paths should be greater equal to zero. the setup and hold time of the chip level model can be either positive or negative. This can be done by tracing back from all register data inputs and register clock inputs to the chip primary inputs. However. The setup and hold values on a sequential logic element such as a FF can be derived in a similar why using transistor level models with C and R. The following formula can be used to calculate the setup time and hold time at the chip level: setup time = (longest data path delay) – (shortest clock path delay) + (setup time of register) hold time = (longest clock path delay) – (shortest data path delay) + (hold time of register) Since both the data path and the clock path can be independent of each other.
19 • The longest and shortest paths from clock to FF1 and FF2 are both 20ns • The longest and shortest paths from in1 to D1 are both 100ns • The longest and shortest paths from in2 to D1 are both 40ns in1 10 in2 clk 100 40 5 FF1 D1 Q1 10 FF2 D1 Q1 5 out1 20 The setup and hold time calculations with respect to register FF1 are: • The setup time of port in1 to port clk is: 100 – 20 + 10 = 90ns • The hold time of port in1 to port clk is: 20 – 100 + 5 = -75ns • The setup time of port in2 to port clk is: 40 – 20 + 10 = 30ns • The hold time of port in2 to port clk is: 20 – 40 + 5 = -15ns Page 19 of 49 .
there will be three sets of clock to output delays one set for each of the output ports: Out1. Each clock to output pair will consist of the following delays (assuming flip-flop is rising edge triggered): • Max clock to output for data rising • Min clock to output for data rising • Max clock to output for data falling Page 20 of 49 . Out2 and Out3.20 Clock to output Delays Clock to output delays can be calculated by adding up the following types of delays: • • • Delay from primary clock port to the last level flip-flop clock pin delay (tcp) Clock to output delay of the flip-flop (tcq) Flip-flop output to primary output (tcom) Clock to output delays (Tco) can be calculate using: Tco = (tcp) + (tcq) + (tcom) Out1 Tcom Tcq Out2 Out3 Clk Tcp Not that in the above drawing.
For each input to output path. the following will be calculated: Max input to output rise (using longest path. min component delay) Max input to output fall (using longest path. The longest and shorted paths calculation methods introduced earlier can be used for this purpose. max component delay) Min input to output fall (using shortest path. they need to be characterized.21 • Min clock to output for data falling Primary inputs to Primary outputs If primary inputs to primary output paths exist (for a combinational circuit. max component delay) Min input to output rise (using shortest path. min component delay) Page 21 of 49 . there are only primary input to output paths).
The data arrival time at the inputs are all 3 and the data required time at the function output L is 20. Calculate the slacks for each of the component inputs and outputs. slack analysis can be applied to any circuit element based on internal and external timing constrains.22 Timing Verification and Slack Analysis Slack analysis is a specialized type of timing analysis that applies specifically to synchronous logic designs. Besides sequential elements in a circuit. Slack time is defined as the difference between the required time and actual time: slack = required data arrival time – actual data arrival time The following circuit shows how slack calculation is performed for a simple combinational circuit before the more complicated setup/hold slack analysis. 10-3=7 A F 7 15-8=7 B C D 7 7 H 7 K -3 L 2 E G 5-3=2 7 J Page 22 of 49 -3 I 20-23 = -3 . These designs require that data and clock signals are synchronized for circuitry to operate properly. Example: Assuming each component delay is 5 for both rise and fall. Slack analysis is only meaningful if the circuit is properly constrained with the correct timing environment.
This check determines if the device’s (memory element) latest arriving data signal will meet the setup constraint for its earliest arriving clock signal.23 -3 -3 10 – 13=-3 15 – 18 = -3 The required time at output L is propagated backward to derive the required time for each component and nets. Setup Slack Analysis (single cycle data transfer) When performing a setup slack analysis. The slack numbers are labelled on the nets and it can be seen that the path with worst slack is the critical path. The slack time is the difference between the required time and the actual data arrival time. Only two types of slack analysis are covered in detail here: setup slack and hold slack. The setup slack can be calculated using the following equation: Setup slack = Clock Period + minimum clock path – maximum data path – setup Page 23 of 49 . the maximum edge of the data signal and the minimum edge of the corresponding clock signal are used. Setup slack analysis determines whether or not data arrives and is valid at the input of a synchronous device before the input clock arrives. Hold slack analysis determines whether or not data remains at the input of a synchronous device long enough to be clocked into the device.
it can be seen that the clock edge of interest would include one clock period if absolute time scale is used. you may wonder why some slack analysis relations include the clock period for the destination register. This check determines if the device’s earliest changing data signal will meet the hold constraint for its earliest arriving clock signal. Using absolute time reference for clock path: max_data_path for setup data data launch here data capture here clock t=0 min_clock_path (includes T) From the above diagram (assuming the clock is not gated). and others do not. the minimum edge of the data signal to the maximum edge of the corresponding clock signal is used. the clock period is included. The hold slack can be can be calculated using the following equation: Hold slack = minimum data path – maximum clock path – hold Question: Why is the clock period is not part of this equation? When to add and when not to add Clock Period In case you have read static timing analysis in literature.24 Hold Slack Analysis (single cycle data transfer) When performing a hold slack analysis. The reason for such difference is due to the selection of reference point. The following two drawings demonstrate the difference in selecting the reference points. In this note. The longest data delay with Page 24 of 49 .
it can be seen from the diagram that the clock delay must be compensated by a clock period for setup check.25 respect to the clock edge is the third transition on the data for setup check. If the data goes too fast. It can be seen that the reference of (t=0) only affects setup check. so that it is not necessary to include the clock period in this case. Single Clock Cycle based Setup and Hold Slack Analysis Most digital circuits use single cycle timing. the fourth edge will be shifted to the left and this is why fast data causes hold violation. the transition for hold check happens after the clock edge. which means that it takes one clock cycle for data to propagate from source to destination. Using relative time reference for clock path: data launch edge for hold data stable reference for hold data data launch edge for setup data capture edge for setup t=0 clock If the time reference point is chosen at the active clock edge of the destination register. Static timing analysis tools usually do not know the exact number of cycles required for a signal to reach its Page 25 of 49 . not hold check in single cycle based data transfer. This also explains why the clock period is not included in either case for hold slack check. Otherwise the wrong edge will be compared. However. The data transition for hold check is the fourth transition on data which happens after the clock edge.
Primary input or inout to register and register to register.26 destination. Page 26 of 49 . most static timing analysis tools perform single cycle based analysis. There are only two cases for setup and hold slack analysis. By default.
data launched by this edge is used for setup check data launched by this edge is used for hold check clock at source register clock at destination register Page 27 of 49 . The following three cases are investigated: Single-clock and single phase for both registers. Single Clock and Single phase In this case. The hold time will be analyzed using the shortest data path with respect to the same active edge. single-clock and two-phase. clock For setup analysis.27 Register to Register Slack Analysis This is the most difficult case since the starting register and ending register may or may not have the same clock.L . the latest arrival data is used. data is launched at the active-edge of the source register. such data is launched by the previous active edge of the clock. the latest data arrives with be that launched by the previous active clock edge at the source register. C. source register destination register C. After the active edge at the destination register. and two-clocks and multiple frequencies. With respect to the active edge of the destination register. and captured at the active edge (one cycle later) of the destination register. the hold slack is calculated with respect to the same clock edge seen by the source register.L .
28 active edge at destination register. Page 28 of 49 .
L.∆ t differ by < T/2 T/2 + ∆ t differ by > T/2 T/2 differ by T/2 destination clock Page 29 of 49 . Com b. If the phase difference is zero.29 Single Clock and multiple phases Different registers may use either the non-inverted or inverted version of the same clock source. source reg C. reg phase 1 phase 2 When the source register and destination register do not have the same phase. the destination is ahead of the source register or the source register is ahead of the destination register. then it degenerates to the previous case. T/2 . the phase difference can be anything between none and totally out of phase. dest. there can be three cases: they are totally out of phase.L. Between a source register and destination register.
∆ t When the active edge of the source is (T/2 .30 The left pointing arrows point to the launching active clock edges from the source registers. The right pointing arrows point to the active clock edges for the hold time check edges.∆ t) ahead of the active edge of the destination clock. the following can be used to calculate the setup and hold slack: Setup slack = T/2 + ∆ t + minimum clock path – maximum data path – setup Hold slack = minimum data path – maximum clock path – hold + T/2 . the following can be used to calculate the setup and hold slack: Setup slack = T/2 .∆ t + minimum clock path – maximum data path – setup Hold slack = minimum data path – maximum clock path – hold + T/2 + ∆ t Page 30 of 49 . In each case. the setup and hold slack calculation need to be adjusted. When the source and destination registers are out of phase (the source is T/2 ahead of the destination clock edge). the following can be used to calculate the setup and hold slacks: setup slack = T/2 + minimum clock path – maximum data path – setup hold slack = minimum data path – maximum clock path – hold + T/2 When the active edge of the source register is (T/2 + ∆ t) ahead of the active edge of the destination clock.
L. clkA R1A R2A C.31 Multiple Clocks and Multiple phases Some designs have multiple clocks with different frequencies.L. C. Also. a static timing analyzer can usually detect the path properly. Given that the clocks are properly described. C. The following diagram shows a general case where the source and destination registers are controlled by either the same or different clocks. clkB R1B R2B The following diagram shows setup and hold relations for R1A to R2B and R1B to R2A: clkA hold setup setup & hold relations for R1A to R2B clkB Page 31 of 49 . it is assumed that the frequency of clkA is 3 times that of clkB in the following two diagrams. The multiplier used can be different depending on the source clock frequency and destination clock frequency.L. The general method is to meet the most restrictive of all setup and hold relations.
12) • The NOR gate has output rise and output fall (3. the setup and hold relations will be different. din FF1 clk →Q rise (4. hold = 5. 7) fall (2.15) fall (3.12) dout .7) and (2. setup = 10. The following two examples use the delta delay method so that the clock period is used in the setup slack analysis.12) b4 b2 rise (4.32 clkB setup hold setup & hold relations for R1B to R2A clkA All the above diagrams have assumed that a single clock cycle is used to launch and capture the data. 11) FF2 clk →Q rise (4.15) and (4.15) fall (3.15) and (3. The timing parameters are as following: • The clock period is 40 • For both flip flops. 8) Page 32 of 49 rise (3.11) • The buffers have output rise and output fall times (4. clock → q rise and fall are: (4. Example 1: This example shows setup margin calculation for a given simple circuit.8) Setup slack for data fall on the second register. 15) fall (4. If it is known that multiple clock cycles are needed to for data to reach from one register to another.
7) fall (2. both data path and clock path originate from the clock port.33 clock rise (4. we may choose either the maximum or the minimum data for the common gates in the two paths. we need different values for the register FF1 and the NOR gate b4. the clock path is the same and the data path delay used will be different. 7) fall (2. Namely. The minimum clock path = tRmin(b1) + tRmin(b3) Page 33 of 49 . 8) In this case. 8) b1 b3 rise (4. First. The first buffer b1 is common to both data path and clock path. calculate the paths for data fall transition at the input of the destination register: The minimum clock path = tRmin(b1) + tRmin(b3) =4+4=8 The maximum data path = tRmin(b1) + tRmax(b2) + C→Q(FF1)Rmax + tFmax(b4) = 4 + 7 + 15 + 11 = 37 Setup slack (data fall) = T + minimum clock path – maximum data path – setup = 40 + 8 – 37 – 10 = 1ns When calculate the setup slack for data rise. We choose tRmin=4 for this case. Since the setup margin takes the difference of data path and clock path.
7 F: 2.15 F:3. 8 b1 R: 4. 8 R:4. we have the following numbers: The maximum clock path = tRmax(b1) + tRmax(b3) = 7 + 7 = 14 The minimum data path = tRmax(b1) + tRmin(b2) + C→Q(FF1)Rmin + tFmin(b4) = 7 + 4 + 4 + 4 = 19 Page 34 of 49 . 15 F: 4.34 =4+4=8 The maximum data path = tRmin(b1) + tRmax(b2) + C→Q(FF1)Fmax + tRmax(b4) = 4 + 7 + 12 + 15 = 38 Setup slack (data rise) = T + minimum clock path – maximum data path – setup = 40 + 8 – 38 – 10 = 0 ns Example 2: This example shows hold margin (slack) calculation for the same circuit: din Data Hold Slack (margin) for data fall FF1 R: 4. 7 F: 2.15 F:3. 7 F: 2. 8 b3 For data fall on register FF2.12 R: 3. 11 FF2 R:4.12 dout b4 b2 clock R: 4.
the delay values for block b4 and register FF1 will have to be different. we have the following numbers: The maximum clock path = tRmax(b1) + tRmax(b3) = 7 + 7 = 14 The minimum data path = tRmax(b1) + tRmin(b2) + C→Q(FF1)Fmin + tRmin(b4) = 7 + 4 + 3 + 3 = 17 hold slack (data rise) = minimum data path – maximum clock path – hold = 17 – 14 – 5 = -2 ns Obviously. Multiple Clocks and Arbitrary Phases If two clocks are totally unrelated for the launching and capture flip-flop. and they do not have a fixed relationship (if one is not multiple of the other one). Page 35 of 49 . there is a hold violation for the given circuit. and a static TA shall report such problem.35 hold slack (data fall) = minimum data path – maximum clock path – hold = 19 – 14 – 5 = 0 ns For data rise on register FF2. One approach is to have synchronization circuitry to make data transfer more reliable. timing analysis can be difficult.
However. data path FF clock path The equations for setup and hold slacks are the same. This must be added to clock and data paths.36 Primary Input/Inout to Register Slack Analysis This is very similar to the register to register paths. The minimum and maximum paths are calculated for both the clock and data starting from the primary inputs. the amount of time it took the signals to arrive at the primary inputs must be known. The clock path and data path can then be used directly to calculate the setup and hold slacks. Setup slack = Clock Period + minimum clock path – maximum data path – setup Hold slack = minimum data path – maximum clock path – hold Page 36 of 49 . The starting points of the paths are from the primary inputs (specified by set_input_delay in case of Synopsys tools). Assuming single cycle data transfer.
only slack analysis for combinational circuit needs to be performed. the data required time is needed. Combinational gates The following equation can be used: Slack = required data arrival time – actual data arrival time On the input side.37 Performing Timing Analysis for PI to PO Since the end point of the timing path is a non-register element. Page 37 of 49 . the time data arrival time is needed and on the output side.
only slack analysis for combinational circuit needs to be performed. FF Combinational Data Path Clock path The equation is: Slack = required data arrival time – actual data arrival time When calculating the path delay. Page 38 of 49 . clock to Q for FF and the combinational path delay are all used to get the actual data arrival time. clock path.38 Performing Timing Analysis for R to PO Same as the preview case.
39 False Paths Elimination Static timing tools tend to be overly pessimistic and they report timing paths or violations that do not exist. When tracing a circuit. the tool needs to know that the topological longest path (40 + 40) cannot happen by using a justification algorithm like the one discussed in the D-Algorithm for test vector generation. Page 39 of 49 . Another way is to de-select a path manually. Note that a minimum of two points is needed to specify the de-selection of the path. Otherwise. a static timing analyzer assumes that the topological longest and shortest paths can be sensitized by setting other non-controlling inputs along the paths to appropriate logic values so that a transition can be propagated through the path. In case that the pessimistic results still meet the target performance requirement. then the paths are false paths. it is necessary to examine all the violation to determine if they are real violations. the designers do not have to do anything. If the assumption turned out to be not true. 40 40 din D 20 sel clk 20 In this case. One type of false paths are those that can never happen such as the case shown below.
The designer needs to specify all the multiple cycle paths before timing analysis. False paths and multiple cycle paths are also referred to as timing exceptions. an ending point and a number of mid-points. Multiple cycle are typically cannot be detected by the tool automatically. Page 40 of 49 . but most tools do not allow fraction of a cycle.40 In other cases. the path is feasible. The number of cycles is not limited to an integer. but it may take more than one clock cycle to complete the propagation of a signal. A multiple cycle path is typically characterized by a starting point.
When data arrives at the input of a latch. However. Stage 3 Latch Capture for Stage 2 Page 41 of 49 . the system can be extremely high performance. From the latch timing models. Since latch based designs are not encouraged by educational institutions as well as the industry (EDA tools vendors specially). it can be in one of the three situations: • Before the latch opens (going into transparent mode) • The latch is already open (transparent mode) • Just closed (just went into latch mode) The following diagram shows the different scenarios: Data launching from Stage 1 Assuming no time borrow from preview stage. design & test. static timing analysis for latchbased design is not as well understood by designers as Flip-flop based designs. it can be seen that the setup/hold checks are performed at the edge the latch is closing (into the latch mode). Time Borrow (cycle stealing) occurs: Time borrowed: Tc – Tb If data from Stage 1 arrives at Td: Slack = Td – Te (violation) Tb Tc Td Te Data launching from Stage 2 Time is being borrowed here. when properly done.41 Latch Based Static Timing Analysis Latch based designs are harder to analysis. Slack = 0. Some of the best-known high performance microprocessors are latch based. Stage 1 Latch Launch for Stage 2 If data from Stage 1 arrives at Ta. Slack = Tb – Ta (no violation) Stage 2 Latch Capture for Stage 1 Launch for Stage 3) Ta If data from Stage 1 arrives at Tc. Cycle-stealing or time borrowing is one of the few features a static timing analysis tool must support for latch based design.
• Multiple cycle paths Page 42 of 49 . The concept is simple. This made possible by taking some available time from the subsequent shorter paths. This is not true for designs based on edge-triggered flip-flops with a single clock domain or with multiple domains but data do not run across the domains. Determining clock frequency and amount of time for borrowing Latch based design allows designer to “data path” longer than the clock cycle time. but in reality. In addition. This requires the launching and capturing latches be using the same phase of the same clock. Preventing Time Borrowing Time borrowing occurs within the same clock cycle. the following items make the situation even worse: • Multiple clocks used to launch and capture data. When the clocks of the launching and capturing latches are out of phase. time borrowing is not to happen.42 Describing Clock waveforms for Latch based Design It should be noted that it is very important to describe the clock waveform for latch based designs since both the close and open edges of the clocks are used. Even both launching and capturing latches are the same. determining what frequency the circuit can run at and how many stages timing borrowing are allowed is very difficult. time borrowing can be typically disabled as a tools option.
Since hold time slack calculation uses fastest data. Note: Time borrowing typically only affects setup slack calculation since time borrowing slows data arrival times. Page 43 of 49 .43 • False paths The following first simple example shows timing borrowing concepts in some details. timeborrowing typically does not affect hold slack calculation. The second one shows the same example except the latches are replaced by edge-triggered flip-flops.
16 setup = 0.08 hold = 0.16 + 1. Page 44 of 49 .31 accumulative (slack = 0).31).03 L3 Q G Latch Timing: G2Q = 0.16 = 2. Timing is met with Tborrow = 2 (slack = 0).44 Example 1 (zero cycle data transfer): Clock G Waveform & timing environments: 0 5 10 Data arrives at port D at 2 Data required at port Q at 8 D L1 1.16).07 Data Timing Diagram over one clock cycle: Time: 10 0 2 Valid data 3 4 5 D to L1: Data arrives at Latch (L1) at t = 2. L1 to L2: Next.15 = 3. It continues to arrive at Latch (L2) at t = (2. Timing is met with Tborrow = 3. the same data arrives at L1 output at (2 + 0.18 D2Q = 0.15 L2 0.
5).16 = 3.31 + 0.03 = 3. The slack time at Q is: (8 – 3. data arrives at Q at t = (3.66 = 4.5 + 0.47 + 0. Timing is met with Tborrow = 3.50 accumulative (slack = 0). data is assumed to be needed for the next clock cycle. So that data needs to be available at Q at (T – 2 = 8). It continues to arrive at Latch (L3) at t = (3. Since time borrowing occurred.47).66).34) Page 45 of 49 . L3 to Q: Note that here.16 = 3.45 L2 to L3: The same data arrives at L2 output at (3.
11 = 2.11 hold = 0.46 Example 2 (single cycle data transfer): Clock G Waveform & timing environments: 0 5 10 Data arrives at port D at 2 Data required at port Q at 8 D F1 1. Slack time = 10 – 2.15 = 1.03 F3 Q G D flip-flop Timing: G2Q = 0.16 + 1. Data is captured on the next cycle. Add data setup time at F1: 2.11.16 setup = 0.05 Data Timing Diagram over one clock cycle: Time: 10 0 2 Valid data 3 4 5 D to F1: Data arrives at FF (F1) at t = 2. Continues to arrive at F2 input at t = 0.89 F1 to F2: Data starts from G (clock) arriving F1 output at t = 0.0 + 0.16.11 = 7.31.15 F2 0. Add the Page 46 of 49 .
3 = 9. Page 47 of 49 . Since a percentage of the time is given to data transfer to off chip (2 in this case).16 + 0.31 + 0. Slack Time = 8 – 0. Add the setup time of F3: 0.7. Slack time = 10 – 1.42. F2 to F3: Data arrives from F2 at t = (0.30.16 = 7.11 = 1.58. Data is captured on the next cycle when t = 10.19 + 0. Data is captured on the next cycle when t = 10. Slack time = 10 – 0.47 setup time of F2: 1.19). data required time is 8.03 = 0. F3 to Q: Data is captured at Q one clock cycle later. The only time data takes here is the G2Q delay (0.16).11 = 0.42 = 8.84.
negative slack time indicates a violation.48 Commonly Used Terms and Definitions Divided Clock A clock divider circuit generates a new clock signal with a lower frequency than the original clock signal. Clock Skew Clock skew is the difference in rise or fall edges at two register clock pins. By default. False Path A timing path in the design that cannot propagate a signal is referred to as false path. Some tools can detect false paths automatically others allow users to mark them interactively. Gated Clock A gated clock signal occurs when the clock network contains logic other than inverters and buffers. Positive slack indicates that the requirement is met. Multi-cycle Path A timing path in the design that is not expected to propagate a signal in one cycle is referred to as multicycle path. Page 48 of 49 . Some tools allow fractional number of cycles others may require integer number of clock cycles for timing analysis. Slack The amount of margin by which maximum or minimum path delay requirement is met is referred to as slack time. The potential for skew can be modeled before layout by using plus and minus uncertainty values. all paths are assumed to be single cycle paths.
A violation is indicated by a negative slack value. A hold violation occurs when a timing path is shorter than its minimum delay target. Page 49 of 49 . A setup violation occurs when a timing path is longer than its maximum delay target.49 Violation Timing violation is an indicator that a timing constraint is not met.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.