Sequential & Combinational Timing Analysis
Sequential & Combinational Timing Analysis
Fall 2003
Prof. Russell Tessier
Clk
When implemented physically, combinational circuits, such as AND and OR gates, exhibit certain
timing characteristics. When a binary value (0 or 1) is applied at the input to a combinational
circuit, the change at the circuit output is not instantaneous due to electrical constraints. Circuit
input-to-output delay in combinational circuits can be expressed with two parameters, tpd and tcd ,
defined as follows:
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.
1
t cd
t cd
t pd
t pd
cd = 2 ns
t pd = 3 ns
t cd = 1 ns
t pd = 2 ns
C
t
cd = 1 ns
t pd = 2 ns
Like combinational circuits, when sequential circuits, such as edge-triggered flip-flops, are physically implemented, they exhibit certain timing characteristics. Unlike combinational circuits,
these characteristics are specified in relation to the clock input. Since 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. The following parameters specify sequential circuit behavior. Unless otherwise specified, the following
descriptions pertain to positive edge-triggered circuits. Similar definitions can be made for negative edge-triggered circuits.
Propagation delay (tClkQ ) - This value indicates the amount of time needed for a change
in the flip flop-clock input (e.g. rising edge) to result in a permanent change at the flip-flop
output (Q). When the clock edge arrives, the D input value is transfered to output Q. Note
from Figure 4, that the output of the flip-flop may be at an intermediate value for a while
(indicated by the cross-hatched area) before the final output value is created. After tClkQ ,
the output is guaranteed not to change value again until another clock edge trigger (e.g.
rising edge) arrives.
Contamination delay (tcd ) - This value 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). Note
from Figure 4, that the output of the flip-flop maintains its initial value until time tcd has
passed. The flip-flop is guaranteed not to show any output change in response to an input
change until after tcd has passed.
Setup time (ts ) - This value indicates the amount of time before the clock edge that data
input D must be stable. As shown in Figure 4, D is stable ts time units before the rising
3
D Q
Clk
ts
th
Clk
Q
t cd
t clkQ
Most digital circuits contain both combinational components (gates, muxes, adders, etc.) and
sequential components (flip-flops). These components can be combined to form sequential circuits
that perform computation and store results. By using combinational and sequential component
parameters, it is possible to determine the maximum clock frequency at which a circuit will operate
and generate correct results. This analysis can best be examined through use of an example. A
sample sequential cicuit is shown in Figure 5.
Before starting timing analysis, consider the flow of data in this circuit in response to a rising clock
4
t clkQ = 10 ns
t cd = 2 ns
t clkQ = 10 ns
t cd = 2 ns
t s = 2 ns
t h = 2 ns
t cd = 2 ns
t pd = 5 ns
D Q
D Q
Out
Clk
Figure 5: An Example Sequential Circuit
edge, starting at flip-flop A.
1. Following the rising clock edge on Clk, a valid output appears on signal X after tClkQ =
10 ns.
2. A valid output Y appears at the output of inverter F , tpd = 5 ns after a valid X arrives at the
gate.
3. 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.
As a result, the minimum clock period, Tmin of the circuit is:
Tmin = tClkQ (A) + tpd (F ) + ts (B) = 10ns + 5ns + 2ns = 17ns
(1)
1
1
and the maximum clock frequency of the circuit is Tmin
= 17ns
= 58.8 MHz. Waveforms that
show the determination of the minimum clock period are show in Figure 6.
Since the 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. On the next edge, a
new value is clocked into flip-flop B that is a result of the previous clock edge on flip-flop A.
In a typical sequential circuit design there are often millions of flip-flop to flip-flop paths that need
to be considered in calculating the maximum clock frequency. This frequency must be determined
by locating the longest path among all the flip-flop paths in the circuit. For example, consider the
circuit shown in Figure 7. In this example, there are three flip-flop to flip-flop paths (flop A to flop
5
t clkQ
t pd
ts
Clk
Out
Unfortunately, simply designing a circuit for a specific maximum clock frequency is not enough to
ensure that the circuit will work properly. As mentioned earlier, the 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. Fortunately, the contamination delays of combinational circuitry and flip-flops help
prevent flip-flop inputs from changing instantaneously. This observation can be illustrated by
re-examining Figure 5.
The 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. By examining the circuit, it can be
seen that the earliest the signal can start to change is equal to the sum of the contamination delays
of flip-flop A and inverter X. Therefore, if
6
t clkQ = 9 ns
t clkQ = 9 ns
t cd = 2 ns
t cd = 2 ns
t s = 2 ns
t h = 1 ns
t pd= 4 ns
t cd = 2 ns
1111
0000
0000
1111
0000
1111
0000
1111
Comb.
0000
1111
Logic
0000
1111
0000
1111
0000
1111
0000
1111
t s = 2 ns
t h = 1 ns
B
t clkQ = 10 ns
t cd = 2 ns
t s = 2 ns
t h = 1 ns
(2)
the circuit is guaranteed to work correctly. Since th , 2 ns, is less than tcd (A) + tcd (B), 4 ns, the
hold time is satisifed and the circuit will work correctly. A similar analysis can be performed along
each flip-flop to flip-flop path in Figure 7. These three paths lead to the following relationships for
the A to B, A to C, and B to C paths, respectively:
(3)
(4)
(5)
(6)
(7)
(8)
It is apparent that even the fastest flip-flop to flip-flop path (2 ns) is slower that the required
hold time (1 ns). None of the flip flop input values will change until at least 2 ns following the
clock edge due to the contamination delays along the paths. For each circuit in the path, the
contamination delay guarantees that a change in the circuit input will not be shown at the circuit
output until tcd time units.
7
Conclusion
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. The examination 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. If the contamination delays along each path are
greater than or equal to the destination flip flop hold time, the circuit will operate as designed.
References
[1] S. Ward and R. Halstead. Computation Structures. McGraw-Hill, Boston, Ma, 1991.