longest path matrix algorithm
-
Upload
ganesan-kandasamy -
Category
Documents
-
view
289 -
download
3
Transcript of longest path matrix algorithm
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 1
Chapter 2 Iteration Bound
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 2
Iteration Bound
&Introduction&Critical path&Loop Boundt Important Definitions and Examples
&Iteration Boundt Important Definitions and Examplest Techniques to Compute Iteration Bound
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 3
Critical Path&The path with longest computation time and zero delay.& the minimal computation time required for one iteration of
DFG&Speed of the DSP system:t depends on the “critical path comp. time”
&The loop with the maximum loop bound
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 4
Loop Bound&The lower bound on the loop computation time
loop)ofdelaysofnumber(n time)computatioloop(
BoundLoop==
=l
l
wt
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 5
Loop Bound (cont’d)
& If no delay element in the loop, thent Delay-free loops are non-computable, see the example
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 6
Iteration Bound&The critical loop is the loop with maximum loop bound which
is the bound for the DSP program
& Iteration bound= Max { 6/2 , 11/1 }=11
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 7
Recursive&A non-recursive DFG contains no loops&A recursive DFG at least one loop T∞
&A recursive DFG has a fundamental limit on the speed =Iteration Bound
& Iteration bound= Max { 4/2 , 5/3, 5/4 }=2
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 8
Iteration Bound (cont’d)
&Algorithms to compute iteration boundt Longest Path Matrix (LPM)tMinimum Cycle Mean (MCM)
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 9
Algorithms to Compute Iteration Bound
& Longest Path Matrix Algorithm (LPM)t d: # of delays (=4 here )t Compute L(1)~L(4)
t l, i, j: The longest computation time of all paths from delay element dito delay element dj that pass through exactly m-1 delays
t K: int in [1~d]t
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 10
Examples for LPM1
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 11
Examples for LPM (cont’d)
•Example 2:
}2
16,
212
,18
,14
max{
16161212
8844
2
)2()1(
=
=
=
=
∞T
LL
d
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 12
Algorithms to Compute Iteration Bound
&Minimum Cycle Mean Method (MCM)1. Construct the new graph Gd and Gd
’
Ø transform from DFGØ decide the weight of each edge
2. Compute the maximum cycle meanØ construct the series of d+1 vectors f(m)
Ø find the max cycle mean
3. find the min cycle mean between each cycle
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 13
& delay ⇒ node& longest path length (computation time) ⇒ weight w(i,j)
Example to MCM
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 14
Example to MCM (cont’d)
& longest path lengtht path which pass through no delayst longest : two loops that contain Da and DB
Ø max { 6,4 } = 6
t cycle mean = 6/2=3
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 15
Example to MCM (cont’d)
&Cycle mean= average length of the edge in c (cycle = loop )
&We need the maximum one
Gincyclesin thesedelaysofnumberthecindelaysecontain thG thatincyclesallofn timecomputatiomax
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 16
Example to MCM (cont’d)
&Compute the cycle meant weights of the edges x-1
& hence called MCM
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 17
Example to MCM (cont’d)
&We will find d+1 vectors , f(m) m=0, 1,~, d ( dimension = d×1 )
&s=1
⇒
∞∞∞
=
0
)0(f
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 18
Example to MCM (cont’d)
&
& I ={ i : path from node i to j exists }
∞∞∞
=
0
)0(f
∞∞
∞
=0)1(f
∞
∞−
=0
4
)2(f
∞−−
=
0
45
)3(f
∞−−−
=458
)4(f
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 19
Example to MCM (cont’d)
&The iteration bound is given by:
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 20
Example to MCM (cont’d)
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 21
Multirate DFGs& Iteration bound of Multirate Data-flow Graphst Construct a SRDFG that is equivalent to the MRDFGt Compute the iteration Bound of the equivalent SRDFG using the LPM
algorithm
Ø OUV ,IUV : # of samples I/O of the node per invocationØ iUV : delayØ kU,kV : # of invocation per iteration
vUVUUV klkO =
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 22
Transformation of Multi Rate DFG
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 23
Multi Rate DFG to Single Rate DFG
NCU EE -- DSP VLSI Design. Chap. 2 Tsung-Han Tsai 24
Conclusion&When the DFG is recursive, the iteration bound is the
fundamental limit on the minimum sample period of ahardware implementation of the DSP program.
&Two algorithms to compute iteration bound, LPM and MCM,were introduced.
&The iteration bound of a multirate DFG can also be determined.