Professional Documents
Culture Documents
Chap2 Book
Chap2 Book
Chap2 Book
(1)
dl
d2
(1)
d3
(1)
Fig. 2.2 A DFG with three loops that have loop bounds of 4/2 u.t., 5/3 u.t., and 5/4
u.t. The iteration bound for this DFG is Too ;::: 2 u.t.
The critical path of a DFG is defined to be the path with the longest
computation time among all paths that contain zero delays. The critical path
in the DFG in Fig. 2.1(b) is the path A -+ B, which requires 6 u.t. The DFG
in Fig. 2.2 contains several paths with no delays. The maximum computation
time among these paths is 5 u.t. (the two paths 6 -+ 3 -+ 2 -+ 1 and
5 -+ 3 -+ 2 -+ 1 are both critical paths), so the critical path computation
requires 5 u. t. The critical path is the longest path for combinational rippling
in the DFG, so the computation time of the critical path is the minimum
computation time for one iteration of the DFG.
A DFG can be classified as nonrecursive or recursive. A nonrecursive DFG
contains no loops, while a recursive DFG contains at least one loop. For ex~
ample, an FIR filter is nonrecursive, while the DFG in Fig. 2.1(b) is recursive
because it contains the loop A -+ B -+ A. A recursive DFG has a funda-
mental limit on how fast the underlying DSP program can be implemented in
hardware. This limit, called the iteration bound, Too [1],[2], holds regardless of
the computing power available for the implementation of the DSP program.
A loop is a directed path that begins and ends at the same node, such as the
path A -+ B -+ A in Fig. 2.1(b). The terms "loop" and "cycle" are used
interchangeably to describe a directed cycle in a directed graph. The amount
of time required to execute a loop can be determined from the precedence
relations described by the edges of the DFG. For the DFG in Fig. 2.1(b), the
46 ITERATION BOUND
2D 2D
(a) (b)
Fig. 2.3 (a) A DFG with one loop that has a loop bound of 6/2 = 3 u. t. The iteration
bound for this DFG is 3 u.t. (b) A DFG with iteration bound Too = max{6/2, 11/1} =
11 u.t.
This shows two independent sets of precedence constraints, one set for the
even iterations and one set for the odd iterations. In this case, two iterations
can be computed in 6 u.t., resulting in a loop bound of 6/2 = 3.
The DFG in Fig. 2.3(b) contains two loops, namely, the loops II = A -+
B -+ A and lz = A -+ B -+ C -+ A. The loop bounds for hand lz are
6/2 = 3 u.t. and 11/1 = 11 u.t., respectively. The critical loop is the loop
with the maximum loop bound, so the loop lz is the critical loop in this
example. The loop bound of the critical loop is the iteration bound of the
DSP program, which is the lower bound on the iteration or sample period of
the DSP program regardless of the amount of computing resources available.
ALGORITHMS FOR COMPUTING ITERATION BOUND 47
where L is the set ofloops in the DFG, tl is the computation time of the loop t,
and WI is the number of delays in the loop t. For the DFG in Fig. 2.3(b) we
have
6 T
Too = max { 2' 11} = 11 U.t.
Too = max { ;, ~, ~} = 2 u. t.
In the longest path matrix (LPM) algorithm [3], a series of matrices is con-
structed, and the iteration bound is found by examining the diagonal elements
of the matrices. Let d be the number of delays in the DFG. These matrices,
L(m), m = 1,2, ... , d, are constructed such that the value of the element
l~J) is the longest computation time of all paths from delay element di to
delay element dj that pass through exactly m - 1 delays (not including di and
dj). If no such path exists, then l~J) = -1. Note that longest path between
any two nodes can be computed using any path algorithm in Appendix A.
For example, to determine l~l~ for the DFG in Fig. 2.2, all paths from the
delay element d3 to the delay' element d1 that pass through exactly zero de-
lay elements must be considered. There is one such path, namely, the path
CONCLUSIONS 57
2.6 CONCLUSIONS
DSP programs have the property that they are executed from n = 0 to n = 00.
These programs are often represented using DFGs, which can be recursive or
nonrecursive. When the DFG is recursive, the iteration bound is the fund a-
mental limit on the minimum sample period of a hardware implementation of
the DSP program. Two algorithms for computing the iteration bound were