1 / 36

Lecture 28 Timing Analysis

Lecture 28 Timing Analysis. Overview. Circuits do not respond instantaneously to input changes Predictable delay in transferring inputs to outputs Propagation delay Sequential circuits require a periodic clock Goal: analyze clock circuit to determine maximum clock frequency

archibald
Download Presentation

Lecture 28 Timing Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 28Timing Analysis

  2. Overview • Circuits do not respond instantaneously to input changes • Predictable delay in transferring inputs to outputs • Propagation delay • Sequential circuits require a periodic clock • Goal: analyze clock circuit to determine maximum clock frequency • Requires analysis of paths from flip-flop outputs to flip-flop inputs • Even after inputs change, output signal of circuit maintains original output for short time

  3. Understanding Sequential Circuit Timing • Two characteristics of a computer System • Processor clock speed • Size of its main memory Main memory size (the number of storage bits in the computer) Clock speed involves analysis of the timing parameters of combinational and sequential circuit components

  4. Clock Period Clock Sequential Circuits • Sequential circuits can contain both combinational logic and edge-triggered flip flops • A clock signal determines when data is stored in flip flops • Goal: How fast can the circuit operate? • Minimum clock period: Tmin • Maximum clock frequency: fmax • Maximum clock frequency is the inverse of the minimum clock period • 1/Tmin = fmax The amount of time between rising clock edges is called the clock period, Tper, of the clock

  5. Timing Parameters for Combinational Logic • Propagation delay (tpd) - This value indicates the amount of time needed for a change in a logic input to result in a permanent change at an output. • Combinational logic is guaranteed not to show any further output changes in response to an input change after tpd time units have passed. • Contamination delay (tcd) indicates the amount of time needed for a change in a logic input to result in an initial change at an output [1]. • Combinational logic is guaranteed not to show any output change in response to an input change before tcd time units have passed.

  6. Timing Parameters for Combinational Logic A A

  7. t c d t p d Combinational Logic Timing: Inverter A A Y change in Y is not instantaneous. • Combinational logic is made from electronic circuits • An input change takes time to propagate to the output • The output remains unchanged for a time period equal to the contamination delay, tcd • The new output value is guaranteed to valid after a time period equal to the propagation delay, tpd • or • After the propagation delay, tpd, the inverter output is stable and is guaranteed not to change again until another input change.

  8. t c d t p d Combinational Logic Timing: Inverter A A Y change in Y is not instantaneous. • Combinational propagation delays are additive • Combinational propagation delay,tpd is calculated by adding the propagation delays of the circuit components along the longest path

  9. Combinational Logic Timing: XNOR Gate • The output is guaranteed to be stable with old value until the contamination delay • Unknown values shown in waveforms as Xs • The output is guaranteed to be stable with the new value after the propagation delay

  10. Combinational Logic Timing: Complex Circuits Tpd = 2ns Tcd = 1ns Circuit X Tpd = 3ns Tcd = 1ns A C A Circuit X C B Tpd = 5ns Tcd = 1ns B • Propagation delays are additive • Locate the longest combination of tpd • Contamination delays may not be additive • Locate the shortest path of tcd • Find propagation and contamination delay of new, combined circuit

  11. Timing Parameters for Combinational Logic • Longest delay from a circuit input (w, x, y) to the output z is the sum of the component propagation delays through gates A and B, 3 ns + 2 ns = 5 ns • 4 ns propagation delay path through gates C and B can be ignored in determining the overall propagation delay of the circuit since it is shorter than 5 ns

  12. Timing Parameters for Combinational Logic • In contrast, the determination of the contamination delay of the combined circuit requires identifying the shortest path of contamination delays from input to output. • Contamination delay of the combined circuit is 2 ns, since the shortest sum of contamination delays from an input (y) to an output (z), is tcd(C) + tcd(B) = 1 ns + 1 ns = 2ns • this value is smaller than the contamination delay path through gates A and B (2 ns + 1ns = 3 ns)

  13. Timing Parameters for Sequential Logic • Sequential circuits, such as edge-triggered flip-flops exhibit certain timing characteristics • Unlike combinational, timing parameters for clocked devices are specified in relation to the clock input (rising edge) • Flip-Flops only change value in response to a change in the clock value, timing parameters can be specified in relation to the rising (for positive edge-triggered) or falling (for negative-edge triggered) clock edge • Propagation delay (tClk−Q) - indicates the amount of time needed for a change in the flip flop-clock input (e.g. rising edge) resulting in a permanent change at the flip-flop output (Q). • Contamination delay (tcd) - indicates the amount of time needed for a change in the flip-flop clock input to result in the initial change at the flip-flop output (Q).

  14. Clocked Device: Contamination and Propagation Delay D Clk Q t cd t Clk-Q Propagation delay (tClk−Q)– indicates the amount of time needed for a change in the flip flop-clock input (e.g. rising edge) resulting in a permanent change at the flip-flop output (Q). Contamination delay (tcd) – indicates the amount of time needed for a change in the flip-flop clock input to result in the initial change at the flip-flop output (Q).

  15. Clocked Device: Contamination and Propagation Delay • Setup time (ts) - indicates the amount of time before the clock edge that data input D must be stable. • Hold time (th) - indicates the amount of time after the clock edge that data input D must be held stable.

  16. Clocked Devices: Setup and Hold Times ts th D Clk Q • Timing parameters for clocked devices are specified in relation to the clock input (rising edge) • D input must be valid at least ts(setup time) before the rising clock edge • D input must be held steady th(hold time) after rising clock edge • Setup and hold are input restrictions • Failure to meet restrictions causes circuit to operate incorrectly

  17. Clocked Devices: Setup and Hold Times ts th D Clk • Timing parameters for clocked devices are specified in relation to the clock input (rising edge) • Setup (ts) and hold times (th) are restrictions that a flip-flop places on combinational or sequential circuitry • The circuit must be designed so that the D flip flop input signal arrives at least ‘ts‘ time units before the clock edge and does not change until at least ‘th‘ time units after the clock edge. that drives a flip-flop D input. • If either of these restrictions are violated for any of the flip-flops in the circuit, the circuit will not operate correctly • These restrictions limit the maximum clock frequency at which the circuit can operate Q

  18. D CLK th = hold time ts = setup time Edge-Triggered Flip Flop Timing • The logic driving the flip flop must ensure that setup and hold are met • Timing values (tcdtpdtClk-Q tsth)

  19. TClk-Q = 5 ns Ts = 2 ns Tpd = 5ns TClk-Q = 5ns X Y D Q D Comb. Logic Z Q D FFB FFA G CLK Analyzing Sequential Circuits • What is the minimum time between rising clock edges? • Tmin = TCLK-Q (FFA) + Tpd(G) + Ts(FFB) • Trace propagation delays from FFA to FFB • Draw the waveforms! Fmax = _______

  20. Tpd = 4ns Q D Comb. Logic F Q D X Y Comb. Logic H Z FFB FFA Tpd = 5ns CLK TClk-Q = 5ns TClk-Q = 4 ns Ts = 2 ns Analyzing Sequential Circuits • What is the minimum clock period (Tmin) of this circuit? Hint: evaluate all FF to FF paths • Maximum clock frequency is 1/Tmin

  21. Tpd = 4ns Q D Comb. Logic F Q D X Y Comb. Logic H Z FFB FFA Tpd = 5ns CLK TClk-Q = 5ns TClk-Q = 4 ns Ts = 2 ns Analyzing Sequential Circuits Fmax = _______ • Path FFA to FFB • TClk-Q(FFA) + Tpd(H) + Ts(FFB) = 5ns + 5ns + 2ns = 12ns • Path FFB to FFB • TCLK-Q(FFB) + Tpd(F) + Tpd(H) + Ts(FFB) = 4ns + 4ns + 5ns + 2ns

  22. Q D Q D Analyzing Sequential Circuits: Hold Time Violation Th = 2 ns Tcd = 2ns Tcd = 1ns X Y D Comb. Logic Z FFB FFA G CLK • One more issue: make sure Y remains stable for hold time (Th) after rising clock edge • Remember: contamination delay ensures signal doesn’t change • How long before first change arrives at Y? • Tcd(FFA) + Tcd(G) >= Th • 1ns + 2ns > 2ns

  23. Tcd = 1ns Q D Comb. Logic F Q D X Y Comb. Logic H Z FFB FFA Tcd = 2ns CLK TClD = 1ns TClD = 1 ns Th = 2 ns Analyzing Sequential Circuits: Hold Time Violations All paths must satisfy requirements • Path FFA to FFB • TCD(FFA) + TCD(H) > Th(FFB) = 1 ns + 2ns > 2ns • Path FFB to FFB • TCD(FFB) + TCD(F) + TCd(H) > Th(FFB) = 1ns + 1ns + 2ns > 2ns

  24. Determining the Max. Clock Frequency for a Sequential Circuit • Most digital circuits contain both combinational components (gates, muxes, adders, etc.) and sequential components (flip-flops). • Combinational and sequential component parameters are considered in order to determine the maximum clock frequency at which a circuit will operate and generate correct results. • Consider the flow of data in this circuit in response to a rising clock edge, starting at flip-flop A.

  25. Determining the Max. Clock Frequency for a Sequential Circuit • Following the rising clock edge on Clk, a valid output appears on signal X after tClk−Q = 10 ns. • A valid output Y appears at the output of inverter F, tpd = 5 ns after a valid X arrives at the gate. • Signal Y is clocked into flip-flop B on the next rising clock edge. This signal must arrive at least ts = 2ns before the rising clock edge.

  26. Determining the Max. Clock Frequency for a Sequential Circuit Minimum clock period, Tmin of the circuit and the maximum clock frequency of the circuit is

  27. Determining the Max. Clock Frequency for a Sequential Circuit • Clk input is attached to both flip-flops, both will change value at the same time. On each clock edge, the same three steps starting from flip flop A are repeated. • There are often millions of flip-flop to flip-flop paths that need to be considered in calculating the maximum clock frequency. • Locate the longest path among all the flip-flop paths in the circuit

  28. Validating Flip-Flop Hold Time • Designing a circuit for a specific maximum clock frequency is not enough to ensure that the circuit will work properly • Hold time, th must be satisfied for each flip-flop input, indicating that each D input cannot change until th time units after the clock edge • Contamination delays of combinational circuitry and flip-flops help prevent flip-flop inputs from changing instantaneously

  29. Validating Flip-Flop Hold Time Hold time requirement on flip-flop B indicates that the Y input to flip-flop B should not change until at least 2 ns after the rising clock edge of Clk The earliest the signal can start to change is equal to the sum of the contamination delays of flip-flop A and inverter X th, 2 ns, is less than tcd(A) + tcd(B), 4 ns, The hold time is satisfied and the circuit will work correctly

  30. Validating Flip-Flop Hold Time • Hold time requirement on flip-flop B indicates that the Y input to flip-flop B should not change until at least 2 ns after the rising clock edge of Clk • Hold time requirement on flip-flop B indicats that the Y input to flip-flop B should not change until at least 2 ns after the rising clock edge of Clk

  31. Sequential Circuit Timing • Sequential circuits rely on a clock signal to control the movement of system data • Given a set of combinational and sequential components and their associated timing parameters, it is possible to determine the maximum clock frequency that can be used with the circuit • This analysis includes the examination of every flip-flop to flip-flop path in the circuit • Moreover it includes both the propagation delays along the paths and the data setup time at the destination flip-flop. • Following the calculation of the maximum clock frequency, each flip-flop to flip-flop path can be examined to ensure that flip-flop hold times are satisfied.

  32. Summary • Maximum clock frequency is a fundamental parameter in sequential computer systems • Possible to determined clock frequency from propagation delays and setup time • The longest path determines the clock frequenct • All flip-flop to flip-flop paths must be checked • Hold time are satisfied by examining contamination delays • The shortest contamination delay path determines if hold times are met • Check handout for more details and examples.

More Related