Professional Documents
Culture Documents
Homework #3 Solution
This homework consists of questions taken from the notes and open-ended questions. You are
assigned as groups to do the homework. All problems are graded on CC scale (Completion only).
3D
2D
Assume that the addition and multiplication require 1 and 2 units of time respectively.
(a) (3 points, CC) What is the iteration bound T∞?
Answer: T∞ = Max. {4/3, 4/5} = 4/3 units of time.
(b) (7 points, CC) Find the minimum unfolding factor J such that the J-unfolded DFG can be
retimed so that the critical path of this unfolded and retimed DFT is JT∞.
Answer: Problem 5.13 of textbook.
2. (15 points, CC) Consider the DFG shown below where the computation time of each node is
labeled in parentheses:
(10) A E (8)
(2)
3D B
D
D (4)
(6) D C
Page 1 of 7
PDF created with pdfFactory Pro trial version www.pdffactory.com
April 9, 2006 Yu Hen Hu
D
(10) A E (8)
D
(2) D
D B
D
D
D (4)
(6) D C
The iteration period = 10 u. t. which is that node computation time of node A. Note
that retiming does not yield an iteration period that is equal to T∞.
(c) (7 points, CC) Determine the minimum unfolding factor J such that the J-unfolded DFG
(unfold from the original DFG) can be retimed so that the critical path of this unfolded
and retimed DFG is JT∞ where T∞ is determined in part (a). Also plot the unfolded and
retimed DFG and identify its critical path whose delay is JT∞
Answer: Problem 5.16 text book.
3. (10 points, CC) Consider the iteration DG given below:
For each pair of scheduling vector s and projection (assignment) vector d, (i) determine if
they are permissible, (ii) if they are permissible, compute the processor space P, and perform
the node mapping, arc mapping, and I/O mapping.
1 0 1
Answer: Note that the dependence matrix is: D = .
0 1 1
Page 2 of 7
PDF created with pdfFactory Pro trial version www.pdffactory.com
April 9, 2006 Yu Hen Hu
1 1
(a) (6 points, CC) s = ; d =
0 0
Answer: (i) s D = [1 0 1], and sTd = 1. permissible. (ii) P = [0 1]T.
T
i i
Node mapping: PT = [0 1] = j .
j j
sT 1 0 1 0 1 1 0 1
Arc mapping: T D = =
P 0 1 0 1 1 0 1 1
I/O mapping: Three inputs, one along [i, 1]T, one is [1, j]T, and the third one appear in
both of them.
s T i 1 1 0 i 1 i 1
Input: T = =
P 1 j 0 1 1 j 1 j
sT i N 1 0 i N i N
Output: T = =
P N j 0 1 N j N j
1 1
(b) (4 points, CC) s = ; d =
−1 0
Answer: (i) s D = [1 −1 0], and sTd = 1. NOT permissible.
T
4. (20 points, CC) Consider the correlation of two 1-dimensional sequences {x(n)} and {y(n)}
with 0 ≤ n ≤ N−1.
N − n −1
r ( n) = ∑
k =0
x ( k ) y ( k + n)
(a) (5 points, CC) Write a C program (or use any high level language) source code that
compute {r(n)} for N =5, and n = 0, 1, 2.
Answer: any HLL will be acceptable.
For n = 0:2,
r(n) = 0;
For k = 0:5-n-1,
r(n) = r(n) + x(k)*y(k+n);
end
end
(b) (5 points) Convert this program into single assignment format.
Answer:
For n = 0:2,
r1(n,0) = 0;
For k = 0:5-n-1,
r1(n,k) = r1(n,k-1) + x(k)*y(k+n);
end
r(n) = r1(n,5-n-1)
end
(c) (5 points) Convert this program so that it has local data communications.
Answer:
x1(0,k)=x(k), x1(n,k)=x(n-1,k), 0≤k≤5, 0≤n≤2
y1(n,0)=y(n), y1(n,k)=y1(n+1,k-1), 0≤k≤5, 0≤n≤2
Page 3 of 7
PDF created with pdfFactory Pro trial version www.pdffactory.com
April 9, 2006 Yu Hen Hu
n −1 n −1 2 n− 2
A × B = ∑∑ ( Ai ⋅ B j ) 2i + j = ∑ c% 2 k
k
. By comparison of coefficients, we have
i =0 j = 0 k =0
k
min{ k , n −1} ∑ Ai Bk −i k ≤ n − 1;
i =0
c%k = ∑ Ai Bk −i = n −1
i =∑
i = max{0, k − n +1}
Ai Bk −i n ≤ k ≤ 2n − 2
k − n +1
However, the range of c%k may be greater than 1. Thus, a final evaluation of
2 n− 2 2 n −2
C = ∑ c%k 2k = ∑C 2 k
k
with Ck ∈ {0, 1}
k =0 k =0
Page 4 of 7
PDF created with pdfFactory Pro trial version www.pdffactory.com
April 9, 2006 Yu Hen Hu
Page 5 of 7
PDF created with pdfFactory Pro trial version www.pdffactory.com
April 9, 2006 Yu Hen Hu
y(2)
h(3)
h(2) y(1)
h(1) y(0)
h(0)
n
Page 6 of 7
PDF created with pdfFactory Pro trial version www.pdffactory.com
April 9, 2006 Yu Hen Hu
Page 7 of 7
PDF created with pdfFactory Pro trial version www.pdffactory.com