04.01.2013 Views

Linear Programming in Embedded Systems

Linear Programming in Embedded Systems

Linear Programming in Embedded Systems

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SoC<br />

Architecture<br />

Mapp<strong>in</strong>g<br />

Performance<br />

Figures<br />

Applications<br />

Figure 2: Illustration of the Y-Chart approach<br />

set of applications, this leads to nested optimization<br />

problems. The outer loop iterates over architectures,<br />

the <strong>in</strong>ner loop optimizes the temporal and<br />

spatial mapp<strong>in</strong>g for each architecture.<br />

When optimiz<strong>in</strong>g the architecture, several aspects<br />

have to be considered. For example not only<br />

the number and k<strong>in</strong>ds of processors have to be chosen.<br />

Also memory hierarchy (local, shared, global<br />

memories) and the <strong>in</strong>terconnection network have to<br />

be selected.<br />

Optimization of the mapp<strong>in</strong>g <strong>in</strong>cludes the spatial<br />

and temporal assignment of the sub-functions of<br />

the application to processors of the given system<br />

(resource allocation and schedul<strong>in</strong>g) as well as the<br />

allocation of data <strong>in</strong> memories and the schedul<strong>in</strong>g<br />

of data transfers between memories and processors.<br />

Thus, the whole mapp<strong>in</strong>g process can be considered<br />

aga<strong>in</strong> as a set of nested optimization problems.<br />

An example for a formulation as mixed-<strong>in</strong>teger<br />

l<strong>in</strong>ear programs (MILP) for both aspects can be<br />

found <strong>in</strong> [4].<br />

3 Us<strong>in</strong>g Pack<strong>in</strong>g for Optimiz<strong>in</strong>g<br />

Mapp<strong>in</strong>gs of Applications<br />

to Architectures<br />

Mapp<strong>in</strong>g of applications to architectures deals with<br />

resource constra<strong>in</strong>ts. Thus, pack<strong>in</strong>g problems are<br />

very related to the subproblems aris<strong>in</strong>g. As an example,<br />

we want to <strong>in</strong>troduce <strong>in</strong> this section, how<br />

allocation of data <strong>in</strong> memory is related to a pack<strong>in</strong>g<br />

problem. We will show, that solutions for this<br />

special k<strong>in</strong>d of pack<strong>in</strong>g problem can be retrieved<br />

2<br />

fast by exist<strong>in</strong>g solvers. This subproblem can be<br />

expanded by <strong>in</strong>clud<strong>in</strong>g other aspects of the mapp<strong>in</strong>g<br />

process and is described <strong>in</strong> [5]. For apply<strong>in</strong>g<br />

it to other aspects of the mapp<strong>in</strong>g process, see [4].<br />

If a temporal and spatial mapp<strong>in</strong>g of tasks to processors<br />

is selected and the data is assigned to memories,<br />

the rema<strong>in</strong><strong>in</strong>g question is, how much memory<br />

resources are needed. M<strong>in</strong>imiz<strong>in</strong>g these needed resources<br />

can be formulated as strip-pack<strong>in</strong>g problem<br />

[6].<br />

In strip-pack<strong>in</strong>g, boxes of fixed length and width<br />

have to be arranged <strong>in</strong>to a strip of fixed width <strong>in</strong><br />

such a manner, that total height is m<strong>in</strong>imized. Apply<strong>in</strong>g<br />

this to the problem of m<strong>in</strong>imiz<strong>in</strong>g total memory<br />

requirements, we face a set of pack<strong>in</strong>g problems<br />

(one for each memory <strong>in</strong> the system), which can be<br />

solved simultaneously. The width of all strips is the<br />

total execution time determ<strong>in</strong>ed by the mapp<strong>in</strong>g of<br />

tasks and transfers. The heights are the amount of<br />

resources needed for the respective memory. The<br />

boxes to be packed are the data. The width of<br />

such a box is def<strong>in</strong>ed by the time the data is alive.<br />

The height is given by the required size of the data<br />

<strong>in</strong> the selected memories.<br />

Note, that due to the given temporal mapp<strong>in</strong>g,<br />

the horizontal positions of the boxes are fixed. Another<br />

important property is, that some boxes can<br />

overlap. S<strong>in</strong>ce the application can take different<br />

branches dur<strong>in</strong>g execution caused by switch/case<br />

of if/then statements, there are some data, that<br />

cannot exist simultaneously. Thus, these data can<br />

overlap <strong>in</strong> pack<strong>in</strong>g terms.<br />

Let yk i be the start<strong>in</strong>g address of variables i <strong>in</strong><br />

memory k and hk i its storage requirements. For<br />

non-overlapp<strong>in</strong>g we <strong>in</strong>troduce uk i,j := 1, if variable<br />

i is placed below variable j (0 otherwise).<br />

Memory usually is available <strong>in</strong> discrete sizes, e.g.<br />

64K, 128K, etc. Therefore, not total height but<br />

memory capacity steps have to be optimized. Let<br />

z k l ∈ {0, 1} be the memory capacity step and Ck l<br />

the respective capacity of this capacity step.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!