0% found this document useful (0 votes)
38 views

Exercise8 - Introduction For Embedded Systems

The document discusses three tasks related to scheduling and optimization of embedded systems: 1. Scheduling tasks on pipeline resources, where the modified LIST algorithm considers pipeline intervals allowing overlapping execution. 2. Formulating an integer linear program to minimize latency with restricted resources by introducing variables for start times and resource usage. 3. Formulating dependencies in a marked graph for a video codec application and determining the minimum iteration interval and latency with and without pipelining between functions.

Uploaded by

quoctrung244
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Exercise8 - Introduction For Embedded Systems

The document discusses three tasks related to scheduling and optimization of embedded systems: 1. Scheduling tasks on pipeline resources, where the modified LIST algorithm considers pipeline intervals allowing overlapping execution. 2. Formulating an integer linear program to minimize latency with restricted resources by introducing variables for start times and resource usage. 3. Formulating dependencies in a marked graph for a video codec application and determining the minimum iteration interval and latency with and without pipelining between functions.

Uploaded by

quoctrung244
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Networked Embedded Systems Lab

Prof. Marco Zimmerling

Introduction to Embedded Systems – WS 2022/23


Exercise 8: Architecture Synthesis II

Task 1: Scheduling with Pipeline Resources

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

Figure 1: Tasks on pipeline-resource

NOP 0

1 2 3

4 5

n
NOP

Figure 2: Sequence graph for Pipelining

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?

Task 2: Integer Linear Programming

Given the sequence graph GS = (VS , ES ) in Fig. 3.

NOP 0

1 2 6 8 10

3 7 9 11

n
NOP

Figure 3: Sequence graph.

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

Task 3: Iterative Algorithms

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

Table 2: Earliest and latest starting times (Task 2a)

ν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

(a) Formulate all existing dependencies in Figure 4 from νi to νj in the form of

τ (νj ) − τ (νi ) ≥ w(νi ) − dij · P,

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.

Figure 5: Scheduling result of the video codec

(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.

Figure 6: Pipelined scheduling result of the video codec

You might also like