Professional Documents
Culture Documents
Es Marw 6.4 Cool
Es Marw 6.4 Cool
Peter Marwedel
TU Dortmund, Informatik 12
Germany
© Springer, 2010
2012 年 12 月 18 日 These slides use Microsoft clip arts. Microsoft copyright restrictions apply.
Structure of this course
Modeling repository
3: 8:
ES-hardware 6: Application Test
mapping
4: system 7: Optimization
software (RTOS,
5: Evaluation &
middleware, …) validation (energy, cost,
performance, …)
%
100
Software
Hardware
Decision
based on
hardware/
software
partitioning,
a special
case of
hardware/
software
codesign.
p. marwedel,
informatik 12, 2012 - 4-
Codesign Tool (COOL)
as an example of HW/SW partitioning
Inputs to COOL:
1.Target technology
2.Design constraints
3.Required behavior
p. marwedel,
informatik 12, 2012 - 5-
Hardware/software codesign: approach
Specification
Mapping
Processor Processor
P1 P2 Hardware
p. marwedel,
informatik 12, 2012 - 6-
Steps of the COOL partitioning algorithm (1)
p. marwedel,
informatik 12, 2012 - 8-
Steps of the COOL partitioning algorithm (3)
7. Iterative improvements:
Adjacent nodes mapped to the same hardware
component are now merged.
p. marwedel,
informatik 12, 2012 - 9-
Steps of the COOL partitioning algorithm (4)
8. Interface synthesis:
After partitioning, the glue logic required for interfacing
processors, application-specific hardware and memories is
created.
p. marwedel,
informatik 12, 2012 - 10 -
An integer linear programming model
for HW/SW partitioning
Notation:
Index set V denotes task graph nodes.
Index set L denotes task graph node types
e.g. square root, DCT or FFT
Index set M denotes hardware component types.
e.g. hardware components for the DCT or the FFT.
Index set J of hardware component instances
Index set KP denotes processors.
All processors are assumed to be of the same type
p. marwedel,
informatik 12, 2012 - 11 -
An ILP model for HW/SW partitioning
v V : X
mM
v ,m Y
kKP
v ,k 1
v V : m M : X v ,m 1
v V : k KP : Yv ,k 1
p. marwedel,
informatik 12, 2012 - 13 -
Operation assignment constraints (2)
For all types l of operations and for all nodes v of this type:
if v is mapped to some processor k, then that processor
must implement the functionality of l.
p. marwedel,
informatik 12, 2012 - 14 -
Resource & design constraints
v1 v2 v3 v4
Processor FIR1 FIR2
e3 e4 p1
ASIC h1
v5 v6 v7 v8
Communication channel c1
v9 v10
FIR2 on h1 p1 c1
or or or
... v ... v ... v ... v ... e ... e
4 3 t 8 7 t 4 3 t
p. marwedel,
informatik 12, 2012 - 16 -
Scheduling / precedence constraints
Timing constraints
These constraints can be used to
guarantee that certain time constraints are
met.
Some less important constraints omitted ..
p. marwedel,
informatik 12, 2012 - 18 -
Example
T H1 H2 H3 P
1 20 100
2 20 100
3 12 10
4 12 10
5 20 100
p. marwedel,
informatik 12, 2012 - 19 -
Operation assignment constraints (1)
T H1 H2 H3 P
1 20 100
2 20 100
3
4
12
12
10
10
v V :
mKM
X v ,m Y
kKP
v ,k 1
5 20 100
p. marwedel,
informatik 12, 2012 - 20 -
Operation assignment constraints (2)
Functionality 3 to be
implemented on
processor if node 4 is
mapped to it.
p. marwedel,
informatik 12, 2012 - 21 -
Other equations
T H1 H2 H3 P
1 20 100
2 20 100
3 12 10
4 12 10
5 20 100
Cost function:
C=20 #(H1) + 25 #(H2) + 30 # (H3) + cost(processor)
+ cost(memory)
p. marwedel,
informatik 12, 2012 - 22 -
Result
T H1 H2 H3 P
1 20 100
2 20 100
3 12 10
4 12 10
5 20 100
t t
Actual execution time
specification
Actual execution time
approx. execution time
New specification
approx. execution time
1st Iteration 2nd Iteration
p. marwedel,
informatik 12, 2012 - 24 -
Application example
ASIC External
SPARC (Compass, memory
processor 1 µ)
p. marwedel,
informatik 12, 2012 - 25 -
Running time for COOL optimization
p. marwedel,
informatik 12, 2012 - 28 -
Design space for audio lab
COOL approach:
shows that a formal model of hardware/SW codesign is
beneficial; IP modeling can lead to useful implementation
even if optimal result is available only for small designs.
Other approaches for HW/SW partitioning:
starting with everything mapped to hardware; gradually
moving to software as long as timing constraint is met.
starting with everything mapped to software; gradually
moving to hardware until timing constraint is met.
Binary search.
p. marwedel,
informatik 12, 2012 - 30 -
HW/SW partitioning in the context of mapping
applications to processors
p. marwedel,
informatik 12, 2012 - 31 -