Chapter 3: Floorplanning
Sadiq M. Sait & Habib Youssef King Fahd University of Petroleum & Minerals College of Computer Sciences & Engineering Department of Computer Engineering September 2003
Chapter 3: Floorplanning – p.1
Chapter 3: Floorplanning Sadiq M. Sait & Habib Youssef King - - PowerPoint PPT Presentation
Chapter 3: Floorplanning Sadiq M. Sait & Habib Youssef King Fahd University of Petroleum & Minerals College of Computer Sciences & Engineering Department of Computer Engineering September 2003 Chapter 3: Floorplanning p.1
Sadiq M. Sait & Habib Youssef King Fahd University of Petroleum & Minerals College of Computer Sciences & Engineering Department of Computer Engineering September 2003
Chapter 3: Floorplanning – p.1
Chapter 3: Floorplanning – p.2
Chapter 3: Floorplanning – p.3
Module Width Height 1 1 1 2 1 1 3 2 1 4 1 2 5 1 3
1 2 3 4 5 3 4 5 1 2 4 1 2 3 5
Chapter 3: Floorplanning – p.4
Chapter 3: Floorplanning – p.5
wi ≤ si for modules with fixed orientation;
wi ≤ si or 1 si ≤ hi wi ≤ 1 ri for modules with free
W ≤ q, where H and W are the height and width of
Chapter 3: Floorplanning – p.6
Chapter 3: Floorplanning – p.7
Chapter 3: Floorplanning – p.8
Chapter 3: Floorplanning – p.9
Chapter 3: Floorplanning – p.10
Chapter 3: Floorplanning – p.11
Chapter 3: Floorplanning – p.12
Algorithm Linear_Ordering S : Set of all modules; Order: Sequence of ordered modules; (*initially empty*) Begin Seed:= Select Seed module; Order:=[Seed]; S:=S−{Seed}; Repeat ForEach module m ∈ S Do Compute the gain for selecting module m; gainm:= number of nets terminated by m− number of new nets started by m; End ForEach ; Select the module m∗ with maximum gain; If there is a tie Then Select the module that terminates the largest number of nets; ElseIf there is a tie Then Select the module that has the largest number of continuing nets; ElseIf there is a tie Then Select the module with the least number of connections; Else break remaining ties as desired; (*append m∗ to the ordered sequence*) Order:= [!Order,m∗]; S:= S − {m∗} Until S = ∅ End.
Chapter 3: Floorplanning – p.13
Chapter 3: Floorplanning – p.14
Chapter 3: Floorplanning – p.15
Chapter 3: Floorplanning – p.16
(a) (b) 1 2 3 4 5 6 7 8 9 10 11 12 13
1 2 3 4 5 6 7 8 9 10 11 12 13
Chapter 3: Floorplanning – p.17
Chapter 3: Floorplanning – p.18
Chapter 3: Floorplanning – p.19
Chapter 3: Floorplanning – p.20
Algorithm Simulated_annealing(S0, T0, α, β, M, Maxtime); (*S0 is the initial solution *) (*T0 is the initial temperature *) (*alpha is the cooling rate *) (*beta a constant *) begin T = T0; S = S0; Time = 0; repeat Call Metropolis(S, T, M); Time = Time + M; T = α × T; M = β × M until (Time ≥ MaxTime); Output Best solution found
Chapter 3: Floorplanning – p.21
Algorithm Metropolis(S, T, M); begin repeat NewS=neighbor(S); ∆h=(Cost(NewS) − Cost(S)); if ((∆h< 0) or (random < e−∆h/T )) then S = NewS; {accept the solution} M = M − 1 until (M = 0)
Chapter 3: Floorplanning – p.22
Chapter 3: Floorplanning – p.23
Chapter 3: Floorplanning – p.24
Chapter 3: Floorplanning – p.25
1 2 3 4 5 6 7 V H V H V 1 2 3 4 5 7 6 H E = 16H2V75VH34HV
(a) (b)
Chapter 3: Floorplanning – p.26
Chapter 3: Floorplanning – p.27
Chapter 3: Floorplanning – p.28
1 2 3 4 5 6 7 V H H V H 1 2 3 4 5 7 6 H 21H43H765HHVV V H H V H 1 2 3 4 5 7 6 H 21H43H76H5HVV V H H V 1 2 3 4 5 7 6 H H 21H43HV765HHV
Chapter 3: Floorplanning – p.29
Chapter 3: Floorplanning – p.30
Chapter 3: Floorplanning – p.31
Chapter 3: Floorplanning – p.32
Chapter 3: Floorplanning – p.33
Chapter 3: Floorplanning – p.34
Chapter 3: Floorplanning – p.35
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 4 1 2 1 3 5 4 2 1 3 5 M1 M3 M2 M2 M3 M3 12V3H4V5H 12V4H3V5H 12V4H35VH 12V43H5VH 12H435VHV 12H435HVH 12V435HVH
Chapter 3: Floorplanning – p.36
Chapter 3: Floorplanning – p.37
Chapter 3: Floorplanning – p.38
Chapter 3: Floorplanning – p.39
Chapter 3: Floorplanning – p.40
wi ≤ si, if module i has fixed orientation;
wi ≤ si or 1 si ≤ hi wi ≤ 1 ri, if module i has free
Chapter 3: Floorplanning – p.41
y=s x
i i
x y y=r x wi wi hi hi y=s x
i
x y
i
y=r x (c) x y wi hi y=s x
i
(b) (a) y=s x
i
x y y= (d)
i
y=r x 1 y= 1
i
i
Bounding area x x
Chapter 3: Floorplanning – p.42
expression E.
DE be the set of all possible dimensions of RE.
to the rectangular dissection RE. Computation of ΓE:
curve Γi consistent with the shape, size, flexibility, and orientation of the corresponding module i.
computing on the way the bounding curves Γv corresponding to each internal node v.
Chapter 3: Floorplanning – p.43
W ≤ q);
Chapter 3: Floorplanning – p.44
Chapter 3: Floorplanning – p.45
Chapter 3: Floorplanning – p.46
Chapter 3: Floorplanning – p.47
Module Width Height 1 2 3 2 2 2 3 1 3 4 2 3 5 1 2 6 2 2
Chapter 3: Floorplanning – p.48
V H H V { (5,5) (9,4 ) } { (2,5) (3,4) } { (2,3) (3,2) } { (2,3) (3,2) } { (2,2) } { (3,5) (6,4) } { (6,2) (3,3) } 1 2 { (1,3) (3,1) } V { (2,2) } { (1,2) (2,1) } 3 4 5 6 { (3,2) }
(a) (b)
1 2 3 4 5 6
Chapter 3: Floorplanning – p.49
Chapter 3: Floorplanning – p.50
Algorithm Simulated_Annealing_Floorplanning Best = E = E0 = 12V3V4V....nV; T0 = ∆avg
ln(P )
uphill = 0; MT = 0; M = 0; Repeat MT = uphill = Reject = 0; Repeat Select_Move(M); Case M of M1 : Select two adjacent operands ei and ej; NewE = Swap(E, ei, ej); M2 : Select a nonzero length chain C of operators; NewE = Complement(E, C); M3 : Done = False While NOT(Done) Do Select two adjacent opd ei and opr ei+1; If (ei−1 = ei+1) and (2Ni+1 < i ) Then Done = TRUE; EndWhile; NewE = Swap(E, ei, ei+1); EndCase
Chapter 3: Floorplanning – p.51
MT = MT + 1; ∆Cost = Cost(NewE) − Cost(E); If (∆Cost < 0) OR (RANDOM< e−∆Cost/T ) Then Begin If (∆Cost > 0) Then uphill = uphill+1; E = NewE; (*Accept NewE*); If Cost(E) < Cost(Best) Then Best = E; End Else Reject = Reject + 1; (*reject the move*) EndIf Until (uphill > N) OR (MT > 2N) T = λT Until (Reject/MT < .05) OR (T ≤ ǫ ) OR Out_of_Time; End.
Chapter 3: Floorplanning – p.52
∆avg T0
Chapter 3: Floorplanning – p.53
Chapter 3: Floorplanning – p.54
Chapter 3: Floorplanning – p.55
Chapter 3: Floorplanning – p.56
Chapter 3: Floorplanning – p.57
Chapter 3: Floorplanning – p.58
i wi and H = i hi.
Chapter 3: Floorplanning – p.59
Chapter 3: Floorplanning – p.60
Y ← minimize Subject to : xi + wi ≤ W, 1 ≤ i ≤ n yi + hi ≤ Y, 1 ≤ i ≤ n xi + wi ≤ xj + W(xij + yij), 1 ≤ i < j ≤ n xi − wj ≥ xj − W(1 − xij + yij), 1 ≤ i < j ≤ n yi + hi ≤ yj + H(1 + xij − yij), 1 ≤ i < j ≤ n yi − hj ≤ yj − H(2 − xij − yij), 1 ≤ i < j ≤ n xi ≥ 0, yi ≥ 0, 1 ≤ i ≤ n
Size of the linear program: 2 × n continuous variables, n(n − 1) integer variables, and 2n2 linear
Chapter 3: Floorplanning – p.61
For each free-orientation module i, one 0-1 integer variable is introduced zi. zi = 0 → module i is not rotated; zi = 1 → module i is rotated. Y ← minimize Subject to : xi + zihi + (1 − zi)wi ≤ W, 1 ≤ i ≤ n yi + ziwi + (1 − zi)hi ≤ Y, 1 ≤ i ≤ n xi + zihi + (1 − zi)wi ≤ xj + M(xij + yij), 1 ≤ i < j ≤ n xi − zjhj + (1 − zj)wj ≥ xj − M(1 − xij + yij), 1 ≤ i < j ≤ n yi + ziwi − (1 − zi)hi ≤ yj + M(1 + xij − yij), 1 ≤ i < j ≤ n yi − zjwj − (1 − zj)hj ≤ yj − M(2 − xij − yij), 1 ≤ i < j ≤ n xi ≥ 0, yi ≥ 0, 1 ≤ i ≤ n
equal to the number of modules.
Chapter 3: Floorplanning – p.62
Chapter 3: Floorplanning – p.63
∞
wi = f(wi) and x0 = wi,max, and taking the first two
Chapter 3: Floorplanning – p.64
Ai wi,max, ∆i = wi,max − wi
Ai
Chapter 3: Floorplanning – p.65
io
imax h = h i = hio + wi i
i A W i i
Chapter 3: Floorplanning – p.66
Chapter 3: Floorplanning – p.67
Chapter 3: Floorplanning – p.68
Chapter 3: Floorplanning – p.69
Chapter 3: Floorplanning – p.70
i=1 ni = n.
Chapter 3: Floorplanning – p.71
Next group of modules Partial floorplan W
Chapter 3: Floorplanning – p.72
minimizing the number of required integer variables.
modules into a linear list based on their connectivity.
the cardinality of the next group of modules as well as the partially constructed floorplan. We must describe the partial floorplan using the smallest possible number of constraints and variables.
guaranteed to be always less than the number of original modules (usually much less).
Chapter 3: Floorplanning – p.73
R4 R5 R3 R2 R1 C3 C4 C2 C1 Horizontal cut edges Dead space
(a) (b) (c) (d)
Chapter 3: Floorplanning – p.74
ALGORITHM Greedy_Floorplanning; BEGIN Order the n modules; Select a first subset S1 of n1 modules; Formulate a first mixed integer linear program; Solve this first problem; k = n1; i = 1; WHILE k < n DO BEGIN Select the next subset Si of ni modules; Find a set of di covering rectangles of partial floorplan; Formulate a mixed integer program with ni free modules and di fixed basic rectangles; Solve this ith problem; k = k + ni; END; Perform Global routing and adjust floorplan accordingly; END.
Chapter 3: Floorplanning – p.75
the modules which is consistent with the overall topological relations of the blocks, as well as the sizes and shapes of these blocks.
vertices V model the modules and the set of edges E model module interconnections.
interfaces between the modules (module adjacencies). The edges
will be routed.
rectangular area assigned to each module is large enough to accommodate the module.
Chapter 3: Floorplanning – p.76
A B C D
(a) (b)
E
(c)
A B C D E A B D E C
Chapter 3: Floorplanning – p.77
Chapter 3: Floorplanning – p.78
A B C D
(a) (b)
E
(c)
A B D E C Inner faces (rooms) A B D E C
Chapter 3: Floorplanning – p.79
Chapter 3: Floorplanning – p.80