Placement Constraints in Floorplan Design: Evangeline F.Y. Young, Chris C.N. Chu, and M.L. Ho
Placement Constraints in Floorplan Design: Evangeline F.Y. Young, Chris C.N. Chu, and M.L. Ho
Placement Constraints in Floorplan Design: Evangeline F.Y. Young, Chris C.N. Chu, and M.L. Ho
Abstract— In floorplan design, it is common that a designer handle range constraint in which some modules are restricted
will want to control the positions of some modules in the final to be placed within some rectangular ranges. The floorplanner
packing for various purposes like data path alignment and I/O in [10] can handle alignment constraint which may arise in
connection. There are several previous works [3], [5], [7], [8],
[10], [12]–[14] focusing on some particular kinds of placement bus-based routing. Different approaches are used to handle
constraints. In this paper, we will present a unified method to different kinds of constraints and there is no unified method
handle all of them simultaneously, including preplace constraint, that can handle all of them simultaneously.
range constraint, boundary constraint, alignment, abutment and In this paper, we will present a unified method that can
clustering, etc., in general non-slicing floorplans. We have used handle different kinds of placement constraints simultaneously,
incremental updates and an interesting idea of reduced graph to
improve the runtime of the method. We tested our method using including preplace constraint, range constraint, boundary con-
some benchmark data with about one eighth of the modules straint, alignment, abutment and clustering, etc., in general
having placement constraints and the results are very promising. non-slicing floorplans. Users can input a mixed set of con-
Good packings with all the constraints satisfied can be obtained straints and our floorplanner will be able to address all of
efficiently. them simultaneously. (It is reasonable to assume that the input
Index Terms— VLSI CAD, Physical design, Floorplanning, constraints are not contradictory to each other. However, we
Placement constraints, Optimization can also handle inconsistent user requirements by generating
a packing that satisfies the requirements as much as possible.)
I. I NTRODUCTION We make use of constraint graphs to handle the constraints and
can thus be used with any kind of floorplan representation
Floorplan design is an important step in physical design of
that computes the module positions by constraint graphs,
VLSI circuits to plan the positions of a set of circuit modules
e.g., sequence pair, BSG, O-Tree, CBL, Q-seq, TBS, etc..
on a chip in order to optimize the circuit performance. In this
In a constraint graph, every module is represented by a
floorplanning step, it is common that a designer will want to
vertex and the weighted directed edges represent the minimum
control the positions of some modules in the final packing
for various reasons. For example, a designer may want to
displacement between two modules. We can find the and
positions of a module by computing the longest path from
restrict the separation between two modules if there are many
a source to that module in the constraint graphs. In our
interconnections between them, or he may want to align them
approach, we modify the constraint graphs to enforce the
vertically in the middle of the chip for bus-based routing. This
required constraints in the resultant packing. This is done by
will also happen in design re-use in which a designer may want
augmenting the graphs with positive, negative or zero weighted
to keep the positions of some modules unchanged in the new
edges. These augmented edges will restrict the modules to be
floorplan. The analog designers will also be interested in a
placed correctly according to the requirements. This technique
particular kind of placement constraint called symmetry, and
of adding edges to constraint graphs has been used before for
some recent literature on this problem can be found from [1],
layout compaction [6] and packing of rectilinear blocks [4].
[2]. However, an effective method to control the absolute or
In this paper, we apply and generalize this method to handle
relative positions of the modules in floorplanning is non-trivial
different kinds of placement constraints in floorplan design. In
and this inadequacy has limited the application and usefulness
addition, we have devised an interesting idea of reduced graph
of many floorplanning algorithms in practice.
to improve the runtime of the algorithm. A direct implemen-
Several previous works have been done to handle some tation of the method is very expensive computationally and is
particular kinds of placement constraints. The floorplanners thus impractical. It will take
time for each iteration of
in [3], [8], [12] can handle preplace constraint in which some
modules are fixed in position. The paper [5], [7], [14] work on
the annealing process where is the number of modules. We
improved this runtime by reducing the size of the constraint
boundary constraint in which some modules are constrained graphs and by updating the constraint graphs incrementally.
to be placed along one of the four sides of the chip for I/O
connection. The paper [13] generalizes the approach in [12] to
The time complexity of our algorithm is now on
average for each iteration of the annealing process where
The work described in this paper was substantially supported by a grant is the number of modules having placement constraints.
from the Direct Grant for Research of the Chinese University of Hong Kong We tested our method with some MCNC benchmarks
(Project No. 2050219). (ami33, ami49 and playout) and a randomly generated data
Evangeline Young is with the Department of Computer Science and
Engineering, the Chinese University of Hong Kong, Shatin, N.T., Hong Kong set with 100 modules. Sequence pair representation [9] is
(email: [email protected]). used in our implementation. The results are promising and a
Chris Chu is with the Department of Electrical and Computer Engineering, tight packing with all the constraints satisfied can be obtained
Iowa State University, Ames, IA 50011 (email: [email protected]).
M.L. Ho is with ThizLinux Laboratory Limited, Kowloon Bay, Hong Kong efficiently. In the following sections, we will first describe
(email: [email protected]). the problem and have a brief review of the sequence pair
IEEE TRANSACTIONS ON VLSI SYSTEMS, 2004 2
v(A,TT)
update them incrementally. Experimental results will be shown
in Section 6. A
v(BB,A)
final packing
In floorplanning, we are given the information of a set of
modules, including their areas and interconnection and our
goal is to plan their positions on a chip to minimize the total h(LL,A)
chip area and interconnect cost. In this paper, we address this
Fig. 2. Notations &('*9:9;+.)</ , &('*),+>=?=@/ , 0A'*-,-B+>)</ and 0A'2)+CC</ .
floorplanning problem with placement constraint, i.e., besides
the module information, we are also given some constraints in
placement between the modules and our goal is to plan their Therefore notations 448 and 5"5
denote the hor-
positions on a chip such that all the placement constraints can izontal distances of the lower left corner of from the left
be satisfied and the area and interconnect cost are minimized. and the right boundary of the chip respectively. Similarly, we
We consider two general kinds of placement constraints,
use 7D7 and 6E
to denote the vertical distances
absolute and relative. For relative placement constraint, users of the lower left corner of from the top and the bottom
can restrict the horizontal or vertical distance between two boundary of the chip respectively. Figure 2 illustrates these
modules to a certain value, or to a certain range of values. We
definitions. An absolute placement constraint of a module
use the notation to denote the horizontal displacement can be written as:
from ’s lower left corner to ’s. Note that this value is
positive if ’s lower left corner is on the right hand side 44D F G
these definitions. A relative placement constraint between two where KL and MN . If OP , we are restricting
modules and can be written as: the distance between the module and the boundary to a
certain value and we will simply write it as 44D "Q ,
5H5 ,R , 6E ! or 7D7 SR respectively.
These two types of specifications are general enough to
express all common types of placement constraints. For ex-
where and . When ! , we are restricting ample, if we want to restrict the placement of module ,
the distance between the two modules to a single value and
we will write them simply as "# or $% and T such that they all align horizontally, we can specify the
following relative placement constraints:
respectively.
U
J T U
y(A)
B 5H5 I VXW
y(B) h(A,B)
where V W is the width of . We can now define our floorplan-
x(A) ning problem with placement constraint, FP/PC, as follows:
x(B)
h(A,B) = x(B) - x(A) Problem FP/PC: Given the information of a set of modules
v(A,B) = y(B) - y(A) including their areas and interconnection, a set YSZ of relative
Fig. 1. Notations &('*),+.-/ and 01'2)+3-,/ .
placement constraints and a set Y of absolute placement
constraints, the goal is to pack the modules in a rectangular
region such that all the given placement constraints are
Absolute placement constraint is specified similarly except satisfied and the area and interconnect costs are minimized.
that one of the two modules in the relationship is a boundary
of the chip. We use 44 , 5"5 , 6 and 787 to denote the We assume that the input set of placement constraints will
left, right, bottom and top boundary of the chip respectively. not be contradictory to each other, i.e., there exists a feasible
IEEE TRANSACTIONS ON VLSI SYSTEMS, 2004 3
Horizontal Vertical
The minimum area packing can thus be obtained by putting
constraint constraint
graph graph the -coordinate and -coordinate of a module 0 as the length
B C A of the longest path from a source to 0 in the horizontal and
A C vertical constraint graph respectively.
D
B A D B IV. H ANDLING P LACEMENT C ONSTRAINTS IN
(a) (b) C ONSTRAINT G RAPHS
Fig. 3. An example of sequence pair abcd, bacd . There are two kinds of placement constraints, relative and
absolute. A relative placement constraint describes the rela-
tionship between two modules, while an absolute placement
packing in which all the constraints can be satisfied simul- constraint describes the relationship between a module and
taneously. However if the input requirements are inherently the chip. We will first discuss the approach to handle relative
inconsistent, our floorplanner will still generate a packing that placement constraint and will later discuss how this approach
satisfies the requirements as much as possible. can be used to handle absolute placement constraint by making
a simple modification to the constraint graphs.
III. P RELIMINARIES
A. Sequence-Pair [9] A. Relative Placement Constraint
We use sequence-pair in our implementation to represent In relative placement constraint, users can restrict the hor-
a general non-slicing floorplan. A sequence-pair of a set of izontal or vertical distance between two modules to a certain
modules is a pair of combinations of the module names. For range of values. For example, users can specify that ,
example, E is a sequence-pair of the module G (or G ) where and
set AA . We can derive the relative positions between meaning that is at a distance of to on the right hand
the modules from a sequence-pair by the following rules: side of ( is at a distance of to above ). When R ,
If $ 2 , then module is on the we are restricting the distance to a certain value. Notice that
both and can be zero, positive, negative, 1"2 or 342 . (It is
right of module .
If $ !2"# , then module is below trivial to have 5342 and 61"2 , so we assume that this
will not happen.) In order to realize the required constraints in
module .
the final packing, we will add a single edge or a pair of edges
Figure 3(a) shows a packing for the sequence pair
to the corresponding constraint graph $ as described below.
: .
We use V /7 to denote the weight of an edge 7 .
Case 1) If %8342 , insert an edge 7 E into $
B. Constraint Graph
with V 7 93X .
We can use a pair of constraint graphs to represent the hori- Case 2) If %:1"2 , insert an edge 7 into $
zontal and vertical relationships between the module positions with V 7 R .
imposed by a sequence pair. A horizontal (vertical) constraint Case 3) Otherwise, insert two edges 7ZX and 7
graph $% ( $"& ) for a set of
modules is a directed graph E
into $ s.t. V 7Z R and V 7 ,;3X .
with vertices, and the vertices represent the modules and the The correctness of the above steps follows from Theorem 1
edges represent the horizontal (vertical) relationships between which is proved by making use of Lemma 1 and Lemma 2.
the module positions. We will have an edge from to labeled Lemma 1: If there is an edge from to labeled in $ % ,
V(' in $% where V)' is the width of if and only if module
is on the right hand side of module . Similarly, we will have
B
<1= 1"2 .
Proof: According to the definition of horizontal con-
an edge from to labeled *' in $"& where ' is the height straint graph, if there is an edge from to labeled in the
of if and only if module is above module . We can build graph, the lower left corner of is at a distance of at least
these graphs directly from a sequence-pair representation as from that of horizontally to the right, i.e., (> ?1@
follows: which is equivalent to X
<1= 1"2 .
Insert an edge from to in $ % labeled V ' if and only Lemma 2: The conditions
1A 1"2
and
if $ )+*,2+*, . B 342
B3C are equivalent.
Insert an edge from to in $& labeled - if and only Proof: The condition
D1E 1"2 is
if $ )+*,2,+ . equivalent to >
F1G . We can then write >
Figure 3(b) shows the constraint graphs without edge labels 1H as K
I3J , which is equivalent to
for the sequence pair . . B 342 B3C .
We can compute the minimum area packing corresponding Theorem 1: The relative placement constraint
to a sequence pair efficiently by using the constraint graphs.
G (or # G ) can be achieved in the final pack-
In a horizontal constraint graph, a weight on an edge /: ing by inserting edges into the horizontal (vertical) constraint
means that “ should be at least units to the right of ”. graph as described in the above cases if the packing is feasible.
Similarly, in a vertical constraint graph, a weight on an Proof: Without loss of generality, we only prove the
edge means that “ should be at least units above ”. correctness for the horizontal direction. The proof for the
IEEE TRANSACTIONS ON VLSI SYSTEMS, 2004 4
vertical direction follows similarly. To prove the correctness In the following, we use and to denote the two
of these steps, we need to show that if the packing is feasible additional nodes in the horizontal constraint graph: repre-
after inserting these edges, the constraint ,# will sents the left boundary and represents the right boundary.
be satisfied in the packing. In the following, $ % denotes the Similarly, we use and - to denote the two additional nodes
horizontal constraint graph and denotes the -coordinate in the vertical constraint graph: represents the top boundary
of the lower left corner of module . Assume that the packing and - represents the bottom boundary. After adding these
is feasible, i.e., both constraint graphs have no positive cycles nodes, we can handle absolute placement constraint easily
(a positive cycle in a weighted directed graph is a directed as described below. Notice that there is no such cases as
cycle in the graph with positive total weight) and the position 44
, 5H56 , 6 or 7D7D in the following
of each module can be found by computing the longest path and and are non-negative numbers because we will not
from a source to its corresponding vertex in the two constraint consider packing modules outside the boundary of the chip:
graphs.
G :
44D
Consider the three different cases for the constraint
– If 1"2 , insert an edge 7ZX in $% with
G :
V /7AZ ,! ;
Case 1) 9342 , i.e., we want to lie in 342 1 – else, insert edges 7Z and 7
in
G . According to Lemma 2, this condition is equiva-
$ % with V 7 Z ,R and V 7 53X .
lent to " 3 ,1"2 , which, by Lemma
5H5 G :
1, can be achieved by inserting an edge from to
– If 1"2 , insert an edge 7ZX in $% with
labeled 3X .
Case 2) 1"2 , i.e., we want
to lie in 1 1"2 . V /7AZ ,! ;
According to Lemma 1, this can be achieved by – else, insert edges 7 Z
$ % with V 7 Z ,R
and 7
and V 7 53X .
in
inserting an edge from to labeled .
Case 3) 342
FI
1"2 , i.e., we want to
6E B :
lie in the range 1! 1RG . Notice that – If 1"2 , insert an edge 7ZX - in $"& with
the range 1 B1 G is equivalent to the V /7 Z ,! ;
range 1 1"2 342R 1G . The first – else, insert edges 7 Z - and 7 - in
condition can be achieved by inserting an edge from
$ & with V /7 Z ,! and V 7 ,;3X .
to labeled . The second condition
342 1!G is equivalent to
)3 7D7
– If
G :
nodes. The source represents the left boundary and the sink
represents the right boundary of the final packing. Similarly, U
A C D B
A
p
q
v(A,B) = 0 v(B,C) = 0 v(C,D) = 0
h(LL,A)=p v(BB,A)=q
Fig. 4. Examples of alignment constraint.
h(LL,A)=[x1, x2 ] v(BB,A)=[y1, y2 ]
7
8 Fig. 7. Examples of range constraint.
B 10
A C 5) Boundary Constraint: To place module at the upper
right corner of the final packing, and place along the top
boundary (Figure 8), we can impose the following constraints:
h(A,B)=8 h(B,C)=7 v(A,B)=0 v(B,C)=0
5"5 I VXW
lower left corner at ? (Figure 6), we can impose the In this formulation, we restrict the horizontal distance between
following constraints: and the right boundary to be the width of and the vertical
448 I distance between and the top boundary to be the height
6E
of , so module will be placed at the upper right corner
in the final packing. Besides, is restricted to be units
We restrict to be units from the left boundary and from the top boundary, so will abut with the top boundary
to be units from the bottom boundary, so will be preplaced as required. We need to insert two edges into the horizontal
with its lower left corner at ; in the final packing. Two constraint graph and four edges into the vertical constraint
additional edges will be inserted into each constraint graph. graph.
4) Range Constraint: To restrict the position of to within 6) Clustering: To cluster module , and T around at
the range Z6 Z (Figure 7), we
a distance of at most units away vertically or horizontally
can impose the following constraints: (Figure 9), we can impose the following constraints:
448 F Z
I 3 ;1
6E Z I 3 ;1
IEEE TRANSACTIONS ON VLSI SYSTEMS, 2004 6
20
7 B A
C
20
20 20
v(B,C) = 0
v(A,B) = [-20,20] v(A,C) = [-20,20]
h(A,RR)=15 v(A,TT)=6 v(B,TT)=9
h(A,B) = [-20,20] h(A,C) = [-20,20]
Fig. 8. Examples of boundary constraint.
Fig. 10. An example of an arbitrarily set of mixed constraints.
T 3 ; 1
V. A LGORITHM AND I MPLEMENTATION
3 ; 1
We use simulated annealing with sequence pair repre-
3 ; 1 sentation. In each step of the annealing process, we will
T 3 ; 1 generate a new packing and compute its area and interconnect
cost. We use the vertical and horizontal constraint graphs to
In this formulation, we restrict the horizontal and vertical
to be at most units in
compute the position of each module. In order to satisfy the
distances of , and T from
given placement constraints, we will augment the graphs with
both directions, so they will cluster around at a distance
of at most units away. Six additional edges will be inserted
edges as described in the above section. We call these edges
constraining edges. If the packing is feasible after adding
into each constraint graph.
these edges, i.e., no positive cycle exists in the constraint
graphs, we will compute the position of each module as
usual and all the constrained modules will be placed at the
correct positions. However it is possible that some constraints
cannot be satisfied after adding those constraining edges,
5 5
the packing is then infeasible (note that a packing can be
B infeasible because the input set of placement constraints are
D Range in which the
5
lower left corners of inherently contradictory to each other or the relative positions
A, B and C can lie. implied by the sequence pair are contradictory to the input
A C
5
for ami33, ami49 and playout. (Notice that the origin U U is
at the upper right corner in all these packings.)
21
We have also compared our results with [13] that focuses 19 22
1 Width: 104.13
on handling range constraint in slicing floorplan. We repeated 3
26
the same experiments on range constraint using our new 28
Height: 116.624
unified method and the results are shown in Table II. The 30 Area: 12144
result reported in each row is an average obtained by running 16 24
Mini. Area: 11563.3
27 0
the experiment five times using the benchmark data, ami33, 25 Iterations: 66243
ami49 and playout. The scaled runtimes in the fourth column 14 DeadSpace: 4.78183%
were obtained by dividing the original runtimes from [13] 20 29
User Time: 28.79 sec
by a factor of 2.46, the ratio between the speeds of floating 23 12
17 2 Volate No: 0/14
point computation of the two machines used. We can see 4 18
that the performance of the two methods are very similar in 6
both runtime and deadspace. The floorplanner in [13] was a 5 32
11
little bit faster because it considered slicing floorplans only. 10 31
Our floorplanner could give smaller deadspace although the
floorplanner in [13] have actually allowed the modules to 8 9 7 15 13
be very flexible in shape (with aspect ratio in the range of
R EFERENCES Fig. 13. Modules 10, 12, 13, 14 and 15 cluster around module 11.
[1] F. Balasa and K. Lampert. Symmetry within the Sequence-Pair Rep-
resentation in the Context of Placement for Analog Design. IEEE
IEEE TRANSACTIONS ON VLSI SYSTEMS, 2004 10
TABLE II
C OMPARISONS WITH THE R ESULTS IN [13].
Fig. 15. Module 24 is placed at and modules 24, 25, 31, 33, 39,
40, 46 and 51 align horizontally.
Transactions on Computer-Aided Design of Integrated Circuits and
Systems, 19(7):712–731, 2000.
[2] F. Balasa, S. C. Maruvada, and K. Krishnamoorthy. Efficient Solution
Space Exploration Based on Segment Trees in Analog Placement with Based on Corner Block List. IEEE Asia and South Pacific Design
Symmetry Constraints. Proceedings of the International Conference on Automation Conference, pages 509–514, 2001.
Computer-Aided Design, pages 497–502, 2002. [8] H. Murata, K. Fujiyoushi, and M. Kaneko. VLSI/PCB Placement
[3] Y. C. Chang, Y. W. Chang, G. M. Wu, and S. W. Wu. B*-Trees: A with Obstacles Based on Sequence-Pair. International Symposium on
New Representation for Non-Slicing Floorplans. Proceedings of the Physical Design, pages 26–31, 1997.
37th ACM/IEEE Design Automation Conference, 2000. [9] H. Murata, K. Fujiyoushi, S. Nakatake, and Y. Kajitani. Rectangle-
[4] K. Fujiyoshi and H. Murata. Arbitrary Convex and Concave Rectilinear Packing-Based Module Placement. Proceedings IEEE International
Block Packing Using Sequence-Pair. International Symposium on Conference on Computer-Aided Design, pages 472–479, 1995.
Physical Design, pages 103–110, 1999. [10] Xiaoping Tang and D. F. Wong. Floorplanning with Alignment and
[5] Jianbang Lai, Ming-Shiun Lin, Ting-Chi Wong, and Li-C. Wang. Performance Constraints. Proceedings of the 39th ACM/IEEE Design
Module Placement with Boundary Constraints Using the Sequence- Automation Conference, pages 848–853, 2002.
Pair Representation. IEEE Asia and South Pacific Design Automation [11] Thomas H. Cormen and Charles E. Leiserson and Ronald L. Rivest.
Conference, pages 515–520, 2001. Introduction to Algorithms. McGraw Hill, eighth edition, 1992.
[6] Y-Z. Liao and C. K. Wong. An Algorithm to Compact a VLSI Symbolic [12] F. Y. Young and D. F. Wong. Slicing Floorplans with Pre-placed
Layout with Mixed Constraints. IEEE Transactions on Computer-Aided Modules. Proceedings IEEE International Conference on Computer-
Design of Integrated Circuits and Systems, 2(2):62–69, 1983. Aided Design, pages 252–258, 1998.
[7] Yuchun Ma, Sheqin Dong, Xianlong Hong, Yici Cai, Chung-Kuan [13] F. Y. Young and D. F. Wong. Slicing Floorplans with Range Constraints.
Cheng, and Jun Gu. VLSI Floorplanning with Boundary Constraints International Symposium on Physical Design, pages 97–102, 1999.
IEEE TRANSACTIONS ON VLSI SYSTEMS, 2004 11
5 26 46 Runtime (sec)
8 47
4 0 Width: 192.188
ami33
15 36 400
43 ami49
14 28 Height: 196.244
24 playout
40 380
Area: 37715.7 random100
39 48 360
23 41 27 37
Mini. Area: 35443
340
Iterations: 66243 320
1 11 32 42 7 38
DeadSpace: 6.02585% 300
6
25 User Time: 48.1 sec 280
12 260
31 Volate No: 0/16
29 13 45 240
16 3
22 220
33 44 19
17 200
18
34 180
2 160
20 21 35
10 30 9
140
120
Fig. 16. A resultant packing of the data set ami49-bc1 from [14] in which 100
module 6, 18, 20 and 23 are required to be on the left, module 17, 36, 45 80
and 48 on the right, module 0, 4, 8 and 47 at the top, and module 2, 9, 10 60
and 30 at the bottom. The deadspace obtained in [14] was 1.51%.
40
20
21 26
22 32 9 0
16 No. of
Width: 125.586 Constraints
Height: 102.638
0 5 10 15 20 25 30
15
25 13 10
20 8 Area: 12889.9
Fig. 18. The relationship between runtime and the number of placement
Mini. Area: 11563.3 constraints.
14 19
23 12 11
Iterations: 66242
24
17 Deadspace: 10.2917%
4 18 7 6 27 User Time: 14.6 sec Chris Chu received the B.S. degree in computer
28
5
30 Violate No: 1/2
science from the University of Hong Kong, Hong
29 Kong, in 1993. He received the M.S. degree and
the Ph.D. degree in computer science from the
PLACE University of Texas at Austin in 1994 and 1999,
0 1 31 2 3
PHOTO respectively.
HERE Dr. Chu is currently an Assistant Professor in the
Electrical and Computer Engineering Department at
Iowa State University. His research interests include
Fig. 17. An input set of infeasible constraints that requires module 5 to be
design and analysis of algorithms, CAD of VLSI
placed along the left boundary, and on the right hand side module 4 at the
physical design, and performance-driven intercon-
same time.
nect optimization. He received the IEEE TCAD best paper award at 1999 for
his work in performance-driven interconnect optimization. He also received
the Bert Kay Best Dissertation Award for 1998-1999 from the Department of
[14] F. Y. Young, D. F. Wong, and Hannah H. Yang. Slicing Floorplans with Computer Sciences in the University of Texas at Austin.
Boundary Constraints. IEEE Transactions on Computer-Aided Design of
Integrated Circuits and Systems, 18(9):1385–1389, 1999. Also appeared
in ASP-DAC 1999.