Exercise8 - Introduction For Embedded Systems
Exercise8 - Introduction For Embedded Systems
Pipeline-resources process data in time intervals that are smaller than the actual execution time w. As soon as
after the start of a task v1 the so-called pipeline-interval P I has elapsed, the next task v2 can be started on
the same resource (see Figure 1). Non-pipeline-resources are a special case of pipeline-resources with P I = w.
v2
v1
t
w
PI
NOP 0
1 2 3
4 5
n
NOP
a) Modify the LIST algorithm given in the lecture notes so that pipeline-resources are considered. Which
step has to be reformulated and how? (Explain your answer!)
b) Perform the scheduling for the sequence graph given in Figure 2 using the modified algorithm. You can
use Table 1. The multiplication (r2 ) lasts 4 time units and the length of the pipeline-interval is 2 time
1
units. The addition (r1 ) lasts 2 time units and cannot be executed as pipeline-operation. 1 adder and 1
multiplier are available. Use the number of successor nodes as priority criterion. What is the resulting
latency?
NOP 0
1 2 6 8 10
3 7 9 11
n
NOP
For the execution times of the operations assume: A multiplication operation (MULT) takes 2 time units and
all other (ALU) operations take 1 time unit each. Two units of the resource type r1 (multiplier) and two units
of the resource type r2 (ALU) are allocated.
(a) Apply the ASAP and ALAP algorithms to compute the earliest (li ) and the latest (hi ) starting time of
all operations vi ∈ Vs , i ∈ {1, . . . , 11}. For ALAP, assume the maximum latency L = 7. Fill in the
starting times in Table 2.
(b) Formulate the problem of latency minimization with restricted resources as an integer linear program
(ILP). For this, you should introduce the binary variables xi,t ∈ {0, 1} ∀vi ∈ VS and ∀t ∈ {t ∈
Z | li ≤ t ≤ hi }. τ (vi ) is used to denote the starting time of operation vi ∈ VS and α(ri ) with
ri ∈ VR = {MULT, ALU} denotes the number of allocated resource instances. Given the above
P
notations, write down the following equations/inequations without using the symbol.
(i) Express the objective function of the ILP
(ii) Define τ (vi ) ∀i ∈ {1, . . . , 11} as a function of xi,t , where l1 ≤ t ≤ h1
(iii) Express all data dependencies
(iv) Express all resource limitations
(c) In an analogous manner try to formulate an ILP that solves the problem of cost minimization with
latency limitation. Hint: We assume that the cost of a realization is the sum of the costs c of the
multipliers with c(r1 ) = 2 per allocated unit, and of the ALUs with c(r2 ) = 1 per allocated unit. For
the latency bound, we choose L̄ = 6.
2
t k
r1
0
r2
r1
1
r2
r1
2
r2
r1
3
r2
r1
4
r2
r1
5
r2
r1
6
r2
r1
7
r2
r1
8
r2
r1
9
r2
r1
10
r2
r1
11
r2
r1
12
r2
r1
13
r2
Table 1: Table for Task 1
Please answer the following questions considering the given video codec application specified as a marked
graph in Figure 4. 3
li (ASAP) hi (ALAP)
v1
v2
v3
v4
v5
v6
v7
v8
v9
v10
v11
ν1 ν2 ν3 ν4 ν5
w(νi ) 10 10 10 5 5
Figure 4: Video codec marked graph representation Table 3: Execution time of each function
where P is the minimum iteration interval. The execution time of each function is listed in Table 3.
(b) Assuming unlimited resources and only one token on the edge between ν5 and ν1 , determine the minimum
iteration interval P and the latency L. To justify your answer, draw the scheduling on the timeline given
in Figure 5 with the dependency from ν5 to ν1 highlighted.
(c) The motion estimation function (ν1 ) uses the result of the previous frame (See the dependency between
ν1 and ν5 ). Let us now suppose that any arbitrary number of tokens can be inserted to reduce P using
functional pipelining. Then, determine the minimum number of tokens that should be added on the
4
edge ν5 → ν1 to achieve P = 10? To justify your answer, draw the pipelined scheduling on the timeline
given in Figure 6 with the dependency from ν5 to ν1 highlighted and calculate the latency L of the
schedule.