Documente Academic
Documente Profesional
Documente Cultură
Bob Reese and Sam Russ Electrical Engineering Department Mississippi State University University of South Alabama
Electrical& ComputerEngineering
University of SouthAlabama
timing constraints on inputs (setup, hold time) timing characteristics of outputs (propagation delays). Timing characterization of a digital system is the process of determining these timing parameters.
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Propagation Delay
Propagation Delay (tpd) - the elapsed time between a change on an input to a change on an output. A combinational output can have propagation high-to-low (tphl) and propagation low-to-high (tplh) times defined for each combinational input which can affect it.
IN OUT Propagation delays are measured from some reference point on the input to a corresponding reference point on the output; ie., 50% point on input to 50% point on the output or 10% and 90% points on input to 10% and 90% points on output.
IN
OUT
tphl
tplh
Timing
Electrical& ComputerEngineering
University of SouthAlabama
A B C
Each output can have propagation delays associated with a particular input: A_TO_Y_PHL A_TO_Y_PLH B_TO_Y_PHL B_TO_Y_PLH C_TO_Y_PHL C_TO_Y_PLH 0.9 ns 1.2 ns 1.0 ns 1.4 ns 0.7 ns 1.0 ns
For simplicity, usually a single propagation delay is associated with an output: Y tpd 1.4ns
Databooks give a typical and maximum propagation delay for combinational outputs.
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Not Valid
Valid
Not Valid
CLOCK
tsu thd
If Setup and Hold times are violated then incorrect operation may occur.
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Propagation Delays Clock to Q tplh Clock to Q tphl R to Q tphl Other constraints: D tsu D thd Clock pulse width high (minimum) Reset pulse width low (minimum)
Timing
Electrical& ComputerEngineering
University of SouthAlabama
System Timing
Inputs Outputs CombinationalLogic
PresentState
State FlipFlops
NextState CLK
Question: What is the maximum frequency of operation of this system? Maximum Frequency = 1 / (longest path delay)
Longest Path can be either a. Clock to output delay b. Clock to Register Input delay (register to register delay) c. Input to Register Input delay d. Input to Output Delay Typically, delay path b (register to register delay) dominates and is composed of: Clock_to_Q tpd + comb logic longest tpd from Pstate to Nstate + Nstate tsu
Timing
Electrical& ComputerEngineering
University of SouthAlabama
C to Q tpd maximum register to register delay = C to Q tpd + Comb tpd max + tsu
maximum clock frequency = 1 / (maximum register to register delay) Simple sequential system (divide by 2 circuit):
Q Q
Max Freq = 1/ ( C to Q tpd + Comb tpd max + tsu) = 1 /(C to Q tpd + tsu )
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Hold Time
Comb Logic D Q tpd shortest path (tpd min) thd
C to Q tpd In order for the hold time to be satisfied on the second flip-flop the following must be true: C to Q tpd + Comb tpd min > thd If this is NOT true, then the input on the second flip-flop can change before the hold time is satisfied and a hold time violation exists. Simple sequential system (divide by 2 circuit):
Q Q
Timing
Electrical& ComputerEngineering
University of SouthAlabama
10
Timing
Electrical& ComputerEngineering
University of SouthAlabama
DIN d
DIN tPD Min DIN tPD Max
CLK ck
CLK tPD Min CLK tPD Max
Consider the setup time... What is the worst case? A slow input signal and a fast clock. This occurs when td = tDIN + DIN tPD Max and when tck = tCLK + CLK tPD Min To operate correctly, the internal ck clock has to arrive at least tSU after the internal d signal. tck - td Internal tSU Substituting the td and tck expressions, we have... tCLK + CLK tPD Min - ( tDIN + DIN tPD Max ) tSU Since the external setup time is, by definition, tCLK - tDIN... External tSU Internal tSU - CLK tPD Min + DIN tPD Max
11
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Clk
Assume the following timing parameters: Propagation time though input buffer: 6 ns Propagation time though clock buffer: 6 ns Combinational gates prop time: 3 ns Flip-flop CQ tpd, CQ tpd time: 2 ns Flip-flop hold time: 1 ns Flip-flop setup time: 1 ns
What is the maximum operating frequency? The longest register-to-register path is from flip-flop F1 Q output through gates G2 and G3 to the D input of flip-flop F2. So: max freq = 1 / (F1 CQ tpd + G2 tpd + G3 tpd + F2 tsu) = 1/ (2 + 3 + 3 + 1) = 1/(9 ns) = 111.1 Mhz
12
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Assume the following timing parameters: Propagation time thoughclock buffer: 6 ns Combinational gates prop time: 3 ns 2 ns Flip-flop CQ tpd, CQ tpd time: Flip-flop hold time: 1 ns
What is the external hold, setup time on input DIN? DIN setup time is: DIN tsu = tsu + DIN tpd max - Clk tpd min = tsu + (B2 tpd + G2 tpd + G3 tpd) - (B3 tpd) = 1 + (6 + 3 + 3 ) - 6 = 7 ns DIN hold time is: DIN thd = thd - DIN tpd min + Clk tpd max = thd - (B2 tpd + G1 tpd) + (B3 tpd) = 1 - (6 + 3 ) + 6 = -2 ns Note: The setup time calculated is actually setup time referenced to flip-flop F2. Since the path to F2 is longer, this is the worst-case setup time; if you satisfy this setup time you will satisfy the setup time to flip-flop F1. The hold time is referenced to flip-flop F1 (the faster path); if you satisfy this hold time you satisfy the hold time to flip-flop F2. Likewise, SEL tsu = 4 ns, SEL thd = -2 ns
Bob Reese 6/93,SamRuss2/96 13 Timing
Electrical& ComputerEngineering
University of SouthAlabama
Assume the following timing parameters: Propagation time though input buffer: 6 ns Propagation time though clock buffer: 6 ns Combinational gates prop time: 3 ns Flip-flop CQ tpd, CQ tpd time: 2 ns Flip-flop hold time: 1 ns
Does an internal hold time violation exist in this circuit? Find shortest register to register path and see if the hold time is violated. The shortest register to register path is from the Q output of flipflop F2 thru gate G1 to the D input of flip-flop F1. So the following must be true in order for no hold time violation: F2 CQ tpd + G1 tpd > F1 hold time 2 + 3 > 1
14
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Assume the following timing parameters: Propagation time though input buffer: 6 ns Propagation time though clock buffer: 6 ns Combinational gates prop time: 3 ns Flip-flop CQ tpd, CQ tpd time: 2 ns Flip-flop hold time: 1 ns
Input SEL is available 5 ns after the clock rises. DIN is available 4 ns after the clock rises. What is the maximum clock frequency based on inputto-register-setup? Find the longest input-to-register path: Example: SEL to F2 delay = Tdelay + Tpd B1 + Tpd G3 + Tsu F2 = 5 + 6 + 3 + 1 = 15 ns Then subtract clock buffer delay, since input can be late by this extra amount. Tclk period = T Total Delay - Tpd Clock buffer = 15 - 6 = 9 ns Notice that the SEL to F2 delay can be re-written... TSEL to F2 = TdelaySEL + External Setup Time of SEL = 5 + 4 = 9 ns TDIN to F1/F2 = TdelayDIN + External Setup Time of DIN = 4 + 7 = 11 ns Longest = DIN path = 11 ns => Fmax = 1/11 ns = 90.9 MHz
15
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Clk
B3
Assume the following timing parameters: Propagation time though I/O buffer: 6 ns Propagation time though clock buffer: 6 ns Combinational gates prop time: 3 ns Flip-flop CQ tpd, CQ tpd time: 2 ns Flip-flop hold time: 1 ns
The signal OUT connects to another chip that has an external setup time of 8 ns. What is the clock cycle based on clock-to-output delay? Find the longest path from clock to output, which in this case is through B3 to F2, through G4 and B5, to the next chip. Tclk = B3 Tpd + F2 CQ Tpd + Tpd G4 + Tpd B5 + Tsu Next Chip = 6 + 2 + 3 + 6 + 8 = 25 ns Fclk = 1/25 ns = 40 MHz How early can the output change after a rising clock edge? Find the shortest path from clock to output, which in this case is via the same path. Time = 6 + 2 + 3 + 6 = 17 ns
16
Timing
Electrical& ComputerEngineering
University of SouthAlabama
G3
F2 D Q
G4 B5 OUT
Assume the following timing parameters: Propagation time though I/O buffer: 6 ns Propagation time though clock buffer: 6 ns Combinational gates prop time: 3 ns Flip-flop CQ tpd, CQ tpd time: 2 ns Flip-flop hold time: 1 ns
The signal OUT connects to another chip that has an external setup time of 8 ns. The signal EN1 is available 5 ns after the clock rises. What is the clock cycle based on input-to-output delay? Find the longest path from any input to any output ...which in this case is from EN1 through B4, G4, and B5, to the next chip. Tclk period = Tdelay + Tpd B4 + Tpd G4 + Tpd B5 + Tsu Next Chip = 5 + 6 + 3 + 6 + 8 = 28 ns Fclk = 1/28 ns = 35.7 MHz Notice how a signal that propagates out of one chip, through a second, and must set up on a third within one clock cycle can create very large delays and very slow clock frequencies. Also notice that the earliest the output can change from the EN1 input is 5 + 6 + 3 + 6 = 20 ns.
17
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Clk
B3
Assume the following timing parameters: Propagation time though I/O buffer: 6 ns Propagation time though clock buffer: 6 ns Combinational gates prop time: 3 ns Flip-flop CQ tpd, CQ tpd time: 2 ns Flip-flop hold time: 1 ns
The signal OUT connects to another chip that has an external hold time of 10 ns. Does a hold time violation exist? There are two paths from the clock to the OUT signal. The first, via the EN1 signal, cannot change earlier than 20 ns after a clock edge. The second, via the F2 flip-flop, cannot change earlier than 17 ns after a clock edge. Thus the output cannot change too soon after a clock edge, and the hold time of the next chip is satisfied.
18
Timing
Electrical& ComputerEngineering
University of SouthAlabama
FF1 D Ck Q 7
Dout D Q 9 6
Ck FF2
Clk
8 2
What is the fastest (shortest) allowable clock cycle, based on register-to-register delays? Start at a clock and consider what happens... Flip flop changes, propagates through logic, sets up on DFF Choose longest of two paths: FF2 to FF1 5 + 8 + 3 = 16 ns = Minimum clock period 1/16 ns = 62.5 MHz = Maximum clock frequency
19
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Example, continued
What is the external setup time for the A input? Find maximum A tpd = path to FF1 = 8 + 1 = 9 ns Use Formula: External setup = 3 2 + 9 = 10 ns What is the external hold time for the A input? Find minimum A tpd = path to FF2 = 7 + 1 = 8 ns Use Formula: External setup = 4 + 2 8 = 2 ns How late after the clock can Dout change? Find maximum register to output path its a tie! Dont forget to include the time from clocktoQ and clock buffer delay! Total delay = 2 + 5 + 9 + 6 = 22 ns This is also the minimum delay in this example (not usually the case!) Are there any hold time violations? What is the soonest a FF output can propagate to a FF input? ClocktoQ delay and then from FF1 to FF2 = 5 + 7 = 12 ns The FF input only has to stay valid for 4 ns, and so it cannot change too early.
20
Timing
Electrical& ComputerEngineering
University of SouthAlabama
tCLK
Input A
At SU At HD
Output Dout
tOUT
Description Clock Period Clock Frequency Input A Setup Time Input A Hold Time Dout Output Delay
Minimum 16 10 2 22
Maximum 62.5
22
Units ns MHz ns ns ns
Note that data sheets do not have linear time scales! The path from input A directly to Dout would also be included on a complete data sheet (min = max = 1 + 9 + 6 = 16 ns)
21
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Electrical& ComputerEngineering
University of SouthAlabama
The longest is inputtooutput. Coincidence? Probably not! The path winds through two buffers and involves an external input delay and an external output setup time. One point to remember: Direct paths from inputs to outputs are SLOW and make for a LONG system clock cycle. Another point: What if a DFF were put on the line between A and Dout? It would cut this critical path in half! DFFs break up long timing paths, allowing the system clock to be faster. This strategy makes the output available in more clock cycles, but it lets the clock run faster, and therefore the system can take in more inputs (and produce more outputs) per second. This strategy is called pipelining.
23
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Timing Analysis
There are two methods for doing timing analysis: simulation and static path analysis. Simulation is used to characterize the primitive elements of a cell library. This is Spicelevel simulation done with transistor level implementations of the gates in which the timing values are measured from the simulated waveforms. The timing information derived from this simulation is used to provide delay information for gate level simulation. Circuit delay will vary with voltage, temperature and process parameters (line width, p/n type transistor characteristics). For this reason, timing characterization is usually done at least for typical and worst case environmental parameters; usually timing characterization for primitive library elements is done with several environments. It can be tempting to use gate level simulation to try to characterize a digital system. One way to get maximum operating frequency is to keep increasing the clock frequency until the simulation behaves incorrectly...... For this to work correctly you must be sure that the test inputs (test vectors) which are being used to drive the simulation exercise the longest path!!! If they dont, then you will get an optimistic estimate of the maximum operating frequency.
24
Timing
Electrical& ComputerEngineering
University of SouthAlabama
25
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Environmental Conditions
Primitive component delays can vary with environmental conditions. Some typical environmental conditions are: Temperature: the lower the temperature, the faster the circuit. Voltage: the lower the voltage, the slower the circuit (however, power dissipation is also lowered). Speed Grade or Technology: a parameter such as this usually refers to the fabrication technology such as 1.2 micron CMOS versus 0.8 micron CMOS. The 0.8 number refers to the minimum feature size upon which the transistor and line width sizes are based. Smaller transistors and linewidths equate to a faster and denser circuit. Process variation: CMOS transistors are characterized by the four corner model (fast N/fast P transistors which is best case, slow N/slow P transistors which is worst case, and either slow N/fast P or fast N/slow P which is a typical case). Some delay analysis tools allow you to compute delays based upon best, typical or worst case transistor models. When running a static path analysis tool you will want to use the environment(s) which will best match your operating conditions.
26
Timing
Electrical& ComputerEngineering
University of SouthAlabama
Back Annotation
The term back annotation can be used in two contexts a schematic simulation context and a timing analysis context. Back annotation in reference to schematic simulation refers to the displaying of simulation values onto nets within the schematic display during the simulation. This aids in debugging simulation problems because one can traverse around the schematic examining simulation values for nets during any point of the simulation. Back annotation in reference to timing analysis means extracting accurate delay information from a physical implementation (FPGA, standard cell, gate array, etc) after the circuit has been mapped to that implementation. This delay information usually includes wiring delay information because the physical placement of gates will affect the length of the connected nets. This delay information is backannotated into the simulation netlist so that the simulator will now produce more accurate delay information. This delay information can be used by either a static path analysis tool or by a gate level simulator.
27
Timing