Floorplanning
ECE6133 Physical Design Automation of VLSI Systems
- Prof. Sung Kyu Lim
Floorplanning ECE6133 Physical Design Automation of VLSI Systems - - PowerPoint PPT Presentation
Floorplanning ECE6133 Physical Design Automation of VLSI Systems Prof. Sung Kyu Lim School of Electrical and Computer Engineering Georgia Institute of Technology Floorplanning, Placement, and Pin Assignment Partitioning leads to Blocks
– Blocks with well-defined areas and shapes (fixed blocks). – Blocks with approximated areas and no particular shapes (flexible blocks). – A netlist specifying connections between the blocks.
– Find locations for all blocks. – Consider shapes of flexible block, pin locations of all the blocks.
Partitioning Routing Floorplanning/Placement (/Pin assignment)
Blocks w/ areas (shapes) netlist Block locations netlist
– A set of blocks, fixed or flexible. – Pin locations of fixed blocks. – A netlist.
imize routability, determine shapes of flexible blocks
7 5 4 2 1 6 3
A non−optimal floorplan
An optimal floorplan, in terms of area
1 6 7 5 2 4 3
x y Aspect ratio: r <= y/x <= s Rotation: Area: A=xy Modules: Module connectivity 3 2 5 3 6 5 2 1 a b c d e f
a b c d e f g
rectangles.
a rectangular dissection that can be obtained by repetitively subdividing rectangles horizontally or vertically.
cut line or horizontal cut line, and each leaf a basic rectangle.
same.
1 3 4 5 6 7 2
H V H
H V V 1 2 3
4 5 6 7
1
3 4 5 6 7
2
A slicing tree (skewed)
H V H
H V V 1 2 3
4 5
6 7
Another slicing tree (non−skewed) Non−slicing floorplan
Slicing floorplan
– Wong & Liu, “A new algorithm for floorplan design,” DAC’86. ∗ Consider slicing floorplans. – Wong & Liu, “Floorplan design for rectangular and L-shaped mod- ules,” ICCAD’87. ∗ Also consider L-shaped modules. – Wong, Leong, Liu, Simulated Annealing for VLSI Design, pp. 31–71, Kluwer academic Publishers, 1988.
nealing schedule?
Temp Time Global Minima Local Minima’s
2n − 1, is a Polish expression of length 2n − 1 iff
i ≤ 2n − 1, #operands > #operators.
1 6 H 3 5 V 2 H V 7 4 H V # of operands = 4 ....... = 7 # of operators = 2 ....... = 5
→ Postorder traversal.
7 5 4 2 1 6 3
V H H V V H
2 7 5
3 4
1 6 E = 16H2V75VH34HV E = 16+2*75*+34+* Postorder traversal of a tree!
V V
H
1 4
2 3
E = 123H4VV
V H V 3
1
2
4 E = 123HV4V
H H ....... HH ........ V V ....... VV ........
Non−skewed cases
consecutive operators of the same type (H or V ).
angular slicing structure.
V H H V V H 2 7 5 3 4 1 6
E = 16H2V75VH34HV
A normalized Polish expression
1 6 H 3 5 V 2 H V 7 4 H V chain
5 and V are adjacent operand and operator.
– M1 (Operand Swap): Swap two adjacent operands. – M2 (Chain Invert): Complement some chain (V = H, H = V ). – M3 (Operator/Operand Swap): Swap two adjacent operand and
1 2 3 4 2 4 3 1 2 4 3 1 2 4 3 1 12V4H3V M1 M2 M3 12V3H4V 12H3H4V 12H34HV
– M1 and M2 moves are OK. – Check the M3 moves! Reject “illegal” M3 moves.
Assume that the M3 move swaps the operand ei with the operator ei+1, 1 ≤ i ≤ k − 1. Then, the swap will not violate the balloting property iff 2Ni+1 < i.
– Nk: # of operators in the Polish expression E = e1e2 . . . ek, 1 ≤ k ≤ 2n − 1.
– A: area of the smallest rectangle – W: overall wiring length – λ: user-specified parameter
1 2 3 4 2 4 3 1 2 4 3 1 2 4 3 1 M1 M2 M3
A: 12H34HV
ij cijdij.
– cij: # of connections between blocks i and j. – dij: center-to-center distance between basic rectangles i and j.
{ (5,5) (9,4) } { (3,2) } { (3,5) (6,,4) } { (2,5) (3,4) } { (2,3) (3,2) } { (2,2) } { (1,3) (3,1) } { (2,3) (3,2) }
{ (1,2) (2,1) } { (2,2) }
V
H
H V 1
2 3 4
5 6
{ (6,2) (3,3) }
V
2 3 2 1 2
V
H
H
V 1 2
3
4 5
6
V
u1
u2
v w
max{u1, u2}
v+w
u1 u2 v w
u1
u2
max{v, w} u1+u2
V
H
H
V
1 2
3
4
5
6 V
V H
H
V
1
2
3
6 V
E = 12H34V56VHV
E = 12H35V46VHV
5 4
H
H
V
1 2
3 4
5
6 V
H
1 2 3
6 V
E = 12H34V56VHV
V
H
H
V
1 2
3
4
5
6 V
V H
V 6 V
1 2 3
E = 12H34V56VHV
M2 M3
V
E = 12H34V56HVH
H V
H H 5 4
E = 123H4V56VHV
4 5
1 2 3 n
– # of accepted moves < 5%, – temperature is low enough, or – run out of time.
Algorithm: Simulated Annealing Floorplanning(P, ǫ, r, k) 1 begin 2 E ← 12V 3V 4V . . . nV ; /* initial solution */ 3 Best ← E; T0 ← ∆avg
ln(P); M ← MT ← uphill ← 0; N = kn;
4 repeat 5 MT ← uphill ← reject ← 0; 6 repeat 7 SelectMove(M); 8 Case M of 9 M1: Select two adjacent operands ei and ej; NE ← Swap(E, ei, ej); 10 M2: Select a nonzero length chain C; NE ← Complement(E, C); 11 M3: done ← FALSE; 12 while not (done) do 13 Select two adjacent operand ei and operator ei+1; 14 if (ei−1 = ei+1) and (2Ni+1 < i) then done ← TRUE; 15 NE ← Swap(E, ei, ei+1); 16 MT ← MT + 1; ∆cost ← cost(NE) − cost(E); 17 if (∆cost ≤ 0) or (Random < e
−∆cost T
) 18 then 19 if (∆cost > 0) then uphill ← uphill + 1; 20 E ← NE; 21 if cost(E) < cost(best) then best ← E; 22 else reject ← reject + 1; 23 until (uphill > N) or (MT > 2N); 24 T = rT; /* reduce temperature */ 25 until (reject
MT
> 0.95) or (T < ǫ) or OutOfTime; 26 end
Practical Problems in VLSI Physical Design Polish Expression (1/8)
Draw slicing floorplan based on:
Practical Problems in VLSI Physical Design Polish Expression (2/8)
Swap module 3 and 7 in P1 = 25V1H374VH6V8VH
Practical Problems in VLSI Physical Design Polish Expression (3/8)
Practical Problems in VLSI Physical Design Polish Expression (4/8)
Complement last chain in P2 = 25V1H734VH6V8VH
Practical Problems in VLSI Physical Design Polish Expression (5/8)
Practical Problems in VLSI Physical Design Polish Expression (6/8)
Swaps 6 and V in P3 = 25V1H734VH6V8HV
Practical Problems in VLSI Physical Design Polish Expression (7/8)
Practical Problems in VLSI Physical Design Polish Expression (8/8)
What is average change on cost function? Initial temperature with acceptance probability 0.9?
minimize
n
cjxj subject to
n
aijxj ≤ bi, i = 1, . . . , m
n
cijxj = di, i = 1, . . . , p variables: xj; problem data: cj, aij, bi, cij, di properties
with respect to changes in data
Introduction and overview 1–2
integer linear program minimize n
j=1 cjxj
subject to n
j=1 aijxj ≤ bi,
i = 1, . . . , m n
j=1 cijxj = di,
i = 1, . . . , p xj ∈ Z Boolean linear program minimize n
j=1 cjxj
subject to n
j=1 aijxj ≤ bi,
i = 1, . . . , m n
j=1 cijxj = di,
i = 1, . . . , p xj ∈ {0, 1}
Introduction and overview 1–8
plan design and optimization,” 27th DAC, 1990.
– wi, hi: width and height of module Mi. – (xi, yi): coordinate of the lower left corner of module Mi. – ai ≤ wi/hi ≤ bi: aspect ratio wi/hi of module Mi. (Note: We defined aspect ratio as hi/wi before.)
the floorplan design. – Linear constraints? Objective function?
is satisfied (cases encoded by pij and qij): pij qij Mi to the left of Mj: xi + wi ≤ xj Mi below Mj: yi + hi ≤ yj 1 Mi to the right of Mj: xi − wj ≥ xj 1 Mi above Mj: yi − hj ≥ yj 1 1
enforced; e.g., pij = 0, qij = 1 ⇒ yi + hi ≤ yj is satisfied. xi + wi ≤ xj + W(pij + qij) yi + hi ≤ yj + H(1 + pij − qij) xi − wj ≥ xj − W(1 − pij + qij) yi − hj ≥ yj − H(2 − pij − qij)
(xi, yi) (xj, yj) wi xi + wi <= xj (xi, yi) (xj, yj) wi xi + wi > xj hi wj hj
floorplan)
– Fix the width W and minimize the height y!
(xi + wi ≤ W, yi + hi ≤ H, 1 ≤ i ≤ n);
Mixed ILP for the floorplanning problem with rigid, fixed modules. min y subject to xi + wi ≤ W, 1 ≤ i ≤ n (1) yi + hi ≤ y, 1 ≤ i ≤ n (2) xi + wi ≤ xj + W(pij + qij), 1 ≤ i < j ≤ n (3) yi + hi ≤ yj + H(1 + pij − qij), 1 ≤ i < j ≤ n (4) xi − wj ≥ xj − W(1 − pij + qij), 1 ≤ i < j ≤ n (5) yi − hj ≥ yj − H(2 − pij − qij), 1 ≤ i < j ≤ n (6) xi, yi ≥ 0, 1 ≤ i ≤ n (7) pij, qij ∈ {0, 1}, 1 ≤ i < j ≤ n (8)
– # continuous variables: O(n); # integer variables: O(n2); # linear constraints: O(n2). – Unacceptably huge program for a large n! (How to cope with it?)
Mixed ILP for the floorplanning problem: rigid, freely oriented modules. min y subject to xi + rihi + (1 − ri)wi ≤ W, 1 ≤ i ≤ n (9) yi + riwi + (1 − ri)hi ≤ y, 1 ≤ i ≤ n (10) xi + rihi + (1 − ri)wi ≤ xj + M(pij + qij), 1 ≤ i < j ≤ n (11) yi + riwi − (1 − ri)hi ≤ yj + M(1 + pij − qij), 1 ≤ i < j ≤ n (12) xi − rjhj + (1 − rj)wj ≥ xj − M(1 − pij + qij), 1 ≤ i < j ≤ n (13) yi − rjwj − (1 − rj)hj ≥ yj − M(2 − pij − qij), 1 ≤ i < j ≤ n (14) xi, yi ≥ 0, 1 ≤ i ≤ n (15) pij, qij ∈ {0, 1}, 1 ≤ i < j ≤ n (16)
– ri = 0: 0◦ rotation for module i. – ri = 1: 90◦ rotation for module i.
note: typo in (12) and (13). can you fix?
hi ≤ bi.
bi , hmax =
ai .
– Can apply a first-order approximation of the equation: a line passing through (wmin, hmax) and (wmax, hmin). hi = ∆iwi + ci / ∗ y = mx + c ∗ / ∆i = hmax − hmin wmin − wmax / ∗ slope ∗ / ci = hmax − ∆iwmin / ∗ c = y0 − mx0 ∗ / – Substitute ∆iwi +ci for hi to form linear constraints (xi, yi, wi are unknown; ∆i, ci, can be computed as above).
– Timing analysis, power analysis, etc
– Half perimeter of bounding box of each net is bounded – Overhead is not significant: time dependence on # of continuous variable is at most linear
n n n n n n n n n i n i n i n i n
L y x y y y x x x n i y y n i y y n i x x n i x x ≤ + − ≥ − ≥ ∈ ∀ = ∈ ∀ = ∈ ∀ = ∈ ∀ = , ˆ , ˆ min ˆ , max min ˆ , max
– How to fix it?
– How to select next subgroup of modules? ⇒ linear ordering based on connectivity. – How to minimize the # of required variables?
W
Partial floorplan
Next group
“size” of the partially constructed floorplan.
– Minimize the problem size of the partial floorplan. – Replace the already placed modules by a set of covering rectangles. – # rectangles is usually much smaller than # placed modules.
Dead space
(a) (b) (c)
Horizontal cut edges
C3 C4 C2 C1 (d) R4 R5 R3 R2 R1
Practical Problems in VLSI Physical Design ILP Floorplanning (1/22)
Fixed modules only, no rotation allowed
Practical Problems in VLSI Physical Design ILP Floorplanning (2/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (3/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (4/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (5/22)
Using GLPK we get the following solutions:
Practical Problems in VLSI Physical Design ILP Floorplanning (6/22)
Why the non-optimality?
Practical Problems in VLSI Physical Design ILP Floorplanning (7/22)
Fixed modules, rotation allowed
Practical Problems in VLSI Physical Design ILP Floorplanning (8/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (9/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (10/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (11/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (12/22)
Using GLPK we get the following solutions:
Practical Problems in VLSI Physical Design ILP Floorplanning (13/22)
2 Fixed modules:
2 Flexible modules:
Practical Problems in VLSI Physical Design ILP Floorplanning (14/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (15/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (16/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (17/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (18/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (19/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (20/22)
Practical Problems in VLSI Physical Design ILP Floorplanning (21/22)
Fixed modules only = 12 × 12 Rotation allowed = 11 × 11 Flexible modules used = 10.46 × 10.32
Practical Problems in VLSI Physical Design ILP Floorplanning (22/22)
Due to linear approximation
so is the implementation of the corresponding configuration, and
space coincides with an optimal solution of P.
ISPD-97; Murata and Kuh, ISPD-98; Xu, et al, ISPD-98; Kang and Dai, ISPD-98, ICCAD-98.
ing).
b c d e f a b c d e f a c d e f a b Loci of module b A floorplan
hit the sides of rooms.
b d e f c a b d e f c a
Positive loci: abdecf Negative loci: cbfade
c d e f a b
Loci of module b
the order of positive loci. (Exp: (Γ+, Γ−) = (abdecf, cbfade))
⇒ x′ is right (left) to x.
⇒ x′ is below (above) x.
b d e f c a b d e f c a
Positive loci: abdecf Negative loci: cbfade
c d e f a b
Loci of module b
– V : source s, sink t, m vertices for modules. – E: (s, x) and (x, t) for each module x, and (x, x′) iff x must be left-to x′. – Vertex weight: 0 for s and t, width of module x for the other vertices.
b d e f c a b d e f c a
Horizontal constraint graph (Transitive edges are not shown)
b d e f c a
Vertical constraint graph (Transitive edges are not shown) Packing for sequence pair: (abdecf, cbfade) s
t s
t
a longest path algorithm on a vertex-weighted directed acyclic graph. – GH and GV are independent. – The X and Y coordinates of each module are determined as the minimum by assigning the longest path length between s and the vertex of the module in GH and GV , respectively.
b d e f c a b d e f c a
Horizontal constraint graph (Transitive edges are not shown)
b d e f c a
Vertical constraint graph (Transitive edges are not shown) Packing for sequence pair: (abdecf, cbfade) s
t s
t
– Without rotation vs with rotation
– Initial solution: Γ+ = Γ- – Swap two modules in Γ+ – Swap two modules both in Γ+ and Γ- – Rotate
(c) temperature: 20 area: 7260120 3549 2696 3111 4174 (a) temperature: 2000 area: 12985314 (b) temperature: 1000 area: 9568104 2814 2580
m0 m1 m2 m3 m4 m5 m6 m7 m10 m13 m8 m11 m12 m9 m8 m8 m3 m3 m9 m9 m13 m13 m2 m2 m1 m1 m6 m6 m7 m5 m11 m4
Practical Problems in VLSI Physical Design Sequence Pair Method (1/13)
Initial SP: SP1 = (17452638, 84725361)
Practical Problems in VLSI Physical Design Sequence Pair Method (2/13)
Horizontal constraint graph (HCG)
Practical Problems in VLSI Physical Design Sequence Pair Method (3/13)
Vertical constraint graph (VCG)
Practical Problems in VLSI Physical Design Sequence Pair Method (4/13)
Longest source-sink path length in:
Practical Problems in VLSI Physical Design Sequence Pair Method (5/13)
Use longest source-module path length in HCG/VCG
Practical Problems in VLSI Physical Design Sequence Pair Method (6/13)
Dimension: 11 × 15
Practical Problems in VLSI Physical Design Sequence Pair Method (7/13)
Swap 1 and 3 in positive sequence of SP1
Practical Problems in VLSI Physical Design Sequence Pair Method (8/13)
Practical Problems in VLSI Physical Design Sequence Pair Method (9/13)
Dimension: 13 × 14
Practical Problems in VLSI Physical Design Sequence Pair Method (10/13)
Swap 4 and 6 in both sequences of SP2
Practical Problems in VLSI Physical Design Sequence Pair Method (11/13)
Practical Problems in VLSI Physical Design Sequence Pair Method (12/13)
Dimension: 13 × 12
Practical Problems in VLSI Physical Design Sequence Pair Method (13/13)
Impact of the moves: