You are on page 1of 17

Iteration bound MCM

algorithm

Minimum Cycle Mean


The cycle mean m(c) of a cycle c is the average length of the edges
in c, which can be found by simply taking the sum of the edge
lengths and dividing by the number of edges in the cycle.
Minimum cycle mean is the min{m(c)} for all c.
The cycle means of a new graph Gd are used to compute the
iteration bound.
Gd is obtained from the original DFG for which iteration bound is
being computed.
This is done as follows:
Number of nodes in Gd is equal to the number of delay elements in G.
The weight w(i,j) of the edge from node i to j in Gd is the longest path
among all paths in G from delay di to dj that do not pass through any
delay elements.
The construction of Gd is thus the construction of matrix L(1) in LPM.

Minimum Cycle Mean


The cycle mean of Gd is obtained by the usual definition of cycle
mean and this gives the maximum cycle bound of the cycles in G
that contain the delays in c.
The maximum cycle mean of Gd is the max cycle bound of all
cycles in G, which is the iteration bound.
To compute the maximum cycle mean of Gd the MCM of Gd is
computed and multiplied with 1.
Gd is similar to Gd except that its weights negative of that of Gd.

MCM Algorithm
Construct a series of d+1 vectors, f(m), m=0, 1, , d, which are each of
dimension d1.
An arbitrary reference node s is chosen and f(0) is formed by setting
f(0)(s)=0 and remaining entries of f(0) to .
The remaining vectors f(m), m=0, 1, , d are recursively computed
according to:

f m j min f m1 i w' i, j for i I ,

where, I is the set of nodes in Gd such that there exists an edge from node i
to node j.
The iteration bound is given by :

f d i f m i

T min max

d m
i1, 2, 3,...,d m0,1, 2,...,d 1

Example

f m j min f m1 i w' i, j for i I

0
f 0

Step 2

f m j min f m1 i w' i, j for i I

f 1 1 min f 0 1 w' 1,1 , f 0 2 w' 2,1 , f 0 3 w' 3,1


f 1 1 min 0 4, 5, 5

0
f 0

f 1 2 min f 0 1 w' 1,2 , f 0 2 w' 2,2 , f 0 3 w' 3,2


f 1 2 min 0 0, ,

f 1 3 min f 0 1 w' 1,3 , f 0 2 w' 2,3 , f 0 3 w' 3,3


f 1 3 min 0 , 0,

4
f 1 0

Step 3

f m j min f m1 i w' i, j for i I

f 2 1 min f 1 1 w' 1,1 , f 1 2 w' 2,1 , f 1 3 w' 3,1


f 2 1 min 4 4, 0 5, 5

4
f 1 0

f 2 2 min f 1 1 w' 1,2 , f 1 2 w' 2,2 , f 1 3 w' 3,2


f 2 2 min 4 0, 0 ,

f 2 3 min f 1 1 w' 1,3 , f 1 2 w' 2,3 , f 1 3 w' 3,3


f 2 3 min 4 , 0 0,

8
f 2 4
0

Step 4

f m j min f m1 i w' i, j for i I

f 3 1 min f 2 1 w' 1,1 , f 2 2 w' 2,1 , f 2 3 w' 3,1


f 3 1 min 8 4, 4 5, 0 5

8
f 2 4
0

12

f 3 2 min f 2 1 w' 1,2 , f 2 2 w' 2,2 , f 2 3 w' 3,2


f 3 2 min 8 0, 4 , 0

f 3 3 min f 2 1 w' 1,3 , f 2 2 w' 2,3 , f 2 3 w' 3,3


f 2 3 min 8 , 4 0, 0

12
f 3 8
4

Final Step
4
0
8
12
f 0 f 1 0 f 2 4 f 3 8



0
4
f 3 i f m i

F i, m
3

f 3 1 f 2 1 12 8

F 1,2
4
3 1

3 2

Max F i, m

m=1

m=2

i=1

-4

-4

-4

-4

i=2

-4

-4

-4

i=3

-4

-4

i1, 2 , 3

f 3 1 f 1 1 12 4

F 1,1
4
3

1
3

Max F i, m max 4,4,4 4

m=0

T min max F i, m

f 3 1 f 0 1 12 0

F 1,0
4
30

30

m0,1, 2

T min 4,4,4 4 u.t


i1, 2 , 3

Try this problem


For the DFG (G) shown, The computation times of the nodes are
shown in parentheses. Compute the iteration bound of G using:
a) The LPM algorithm.
b) The MCM algorithm.

Try this problem


For the DFG (G) shown, The computation times of the nodes are
shown in parentheses. Compute the iteration bound of G using:
a) The LPM algorithm.
b) The MCM algorithm.

Time complexity of LPM & MCM


LPM

MCM

Time complexity is

O d 4 de

Time complexity is

d - number of delays in the DFG (G).


e - number of edges in the DFG (G).

Ode ded
d - number of delays in the DFG (G).
e - number of edges in the DFG (G).
ed - number of edges in the delay
graph (GD).

Iteration bound of Multi-rate DFGs


Construct a SR DFG that is equivalent to the MR DFG.
Compute the iteration bound of the equivalent SRDFG using LPM or MCM
algorithm.

OUV number of samples produced on the edge by an invocation node U.


IUV number of samples consumed from the edge by a destination node V.
iUV number of delays on the edge.
To avoid a buildup of deficiency of samples on the edge: OUV kU I UV kV
kU , kV number of times invoked in an iteration. (should be a co-prime)
14 and 15 are co-prime, both are divided only by 1.
14 and 21 are not co-prime, both are divided by 1 and 7.

Example

4k a 3kb

k b 2k c

3 and 4 are co primes


kb 4, kc 2

kc kc
3kc 2ka

ka 3 , kb 4, kc 2

ka 3 and kb 4

Next Class

RE-TIMING

Step -2
0
f 0

f m j min f m1 i w' i, j for i I

i, j f i w' i, j
0

f 1 j
min f 1 i, j

i=1

i=2

i=3

j=1

(0-4)=-4

(0-5)=5

(0+)=

-4

j=2

(0+0)=0

(+)=

(+)=

j=3

(0+)=

(+0)=

(+)=

4
f 1 0

Step -3
4 m
f j min f m1 i w' i, j for i I

1
f 0

f

i, j f i w' i, j
1

f 2 j
min f 2 i, j

i=1

i=2

i=3

j=1

(-4-4)=-8

(0-5)=-5

(-5)=

-8

j=2

(0+0)=0

(0+)=

(0+)=

j=3

(0+)=

(+0)=

(+)=

8
f 2 0

You might also like