4 - 1 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
Hardware-Software Codesign
- 4. System Partitioning
Hardware-Software Codesign 4. System Partitioning Lothar Thiele - - PowerPoint PPT Presentation
Hardware-Software Codesign 4. System Partitioning Lothar Thiele Swiss Federal Computer Engineering 4 - 1 Institute of Technology and Networks Laboratory System Design specification system synthesis estimation SW-compilation instruction
4 - 1 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 2 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 3 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 4 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
several devices (FPGAs, ASICs)
relatively easy to determine
difficult to determine to be estimated via analysis, simulation, (rapid) prototyping
… OR ?
CPU0 CPU1 CPU2 CPU3 bus p0 p1 p2 p3 CPU0 CPU1 CPU2 CPU3 bus p0 p1 p2 p3
4 - 5 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
CPU0 CPU1 CPU2 CPU3 bus p0 p1 p2 p3
4 - 6 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
CPU0 CPU1 CPU2 CPU3 bus p0 p1 p2 p3 CPU0 CPU1 CPU2 CPU3 bus p0 p1 p2 p3
4 - 7 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 8 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
p1p2... pm=O (all objects are assigned –mapped) pipj={ } i,j:i j (an object is not assigned or “mapped” twice) and costs c(P) are minimized
note: in system synthesis (simple model)
blocks = architecture graph nodes cost = measured/estimated with dedicated cost functions (e.g., latency, power, hardware cost) CPU0 CPU1 bus p0 p1 p2 p3
4 - 9 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 10 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
note: if all xi are constrained to be either 0 or 1, the IP problem is said to be a 0/1 integer programming problem
i X x i i i
i
constraints
, ,
X x j j i j i j i
i
4 - 11 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
3 2 1 3 2 1
4 - 12 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
m k n i k i k i m k k i k i
1 1 , , 1 , ,
4 - 13 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
exe. time t0 t1 t2 t3 PE0 5 15 10 30 PE1 10 20 10 10 PE0 PE1 bus t0 t1 t2 t3
t0 t1 t2 t3 PE0 1 1 PE1 1 1 task PE
4 - 14 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
n i k k i
1 ,
4 - 15 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 16 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 17 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 18 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 19 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
closeness function: arithmetic mean of weights
4 - 20 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 21 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 22 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
v7 = v6v4
v6 = v2v5 v5 = v1v3
step 1: step 2: step 3: cut lines (partitions)
step 0:
4 - 23 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 24 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 25 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 26 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 27 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 28 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
example: cost = number of edges crossing the partitions before re-group: 5 ; after re-group: 4 ; gain = 1
4 - 29 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 30 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
cost matrix c(x,y)
c(x,y) a b c d e f g h a .5 .5 b .5 .5 c .5 .5 .5 1 .5 d .5 .5 1 e .5 1 .5 1 f .5 1 .5 .5 .5 g 1 .5 .5 h .5 .5
communication cost from node x to node y
4 - 31 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 32 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 33 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 34 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 35 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 36 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
4 - 37 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
T k e e i i
B i i
1
1
4 - 38 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
neighbors
selecting solutions is almost random when T is large … but increasingly selects the better cost solution as T goes to zero
4 - 39 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
temp = temp_start; cost = c(P); while (Frozen() == FALSE) { while (Equilibrium() == FALSE) { P’ = RandomMove(P); cost’ = c(P’); deltacost = cost’ - cost; if (Accept(deltacost, temp) > random[0,1)) { P = P’; cost = cost’; } } temp = DecreaseTemp(temp); }
temp deltacost
initial solution neighbor solution
4 - 40 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
temp:=1.0; in any iteration: temp := *temp (typ.: 0.8 0.99)
Equilibrium(), DecreaseTemp(), and Frozen()