A Genetic Algorithm For VLSI Floorplanning
A Genetic Algorithm For VLSI Floorplanning
A Genetic Algorithm For VLSI Floorplanning
net/publication/220701789
CITATIONS READS
15 5,987
2 authors, including:
Christine Mumford
Cardiff University
67 PUBLICATIONS 1,944 CITATIONS
SEE PROFILE
All content following this page was uploaded by Christine Mumford on 04 June 2014.
1 Introduction
One of the most important stages in the physical design of VLSI circuits is floor-
plan design: the placement of a set of rectangular circuit modules on a chip so
as to minimize the total area and the total interconnecting wire length. When
placing circuit modules (or macro cells) many of the modules are themselves
not yet fully designed and frequently have some flexibility in their shape. For
example a circuit module made up from 12 identical components may have them
placed in one row of 12 components, 2 rows of 6 components, 3 rows of 4 com-
ponents etc., offering the floorplan designer a range of possible shapes for that
module. Using a technique based on a slicing floorplan, which can be obtained
by recursively dividing a rectangle into two parts with either a vertical or a hor-
izontal line, it is possible to fully exploit the available flexibility in the circuit
modules and efficiently combine module placement and area optimization into
a single algorithm. The purpose of our paper is to present a genetic algorithm
(GA) which appears to be very effective at breeding good (often optimal) slicing
floorplans. We believe that with our GA we have overcome most of the represen-
tational problems usually associated with encoding floorplans, and claim that
our solution is elegant as well as effective.
We now summarize some important definitions based on [13]. Let a given
rectangle, R, have height h(R), width w(R) and area A(R). The aspect ratio of
R is the ratio h(R)/w(R). A soft rectangle is one that can have different shapes
as long as the area remains the same. The shape flexibility of a soft rectangle
?
This work was partially supported by NASA grant NAG-5-4868.
specifies the range of its aspect ratio. A soft rectangle of area A(R) is said to
have a shape flexibility r if its aspect ration can take on any value between 1/r
and r. The shape flexibility of modules provides a continuous range of candidate
aspect ratios for our soft modules.
An alternative to the slicing floorplan, which is favoured by many researchers,
is the non-slicing floorplan. In the non-slicing floorplan there is no requirement
for recursive construction, and tighter packings are often possible using this
approach. Our main motivation for using a slicing floorplan approach is that
by considering only slicing floorplans, we are able to massively reduce the size
of the search space. Stockmeyer [9], examining cases where each subcircuit may
have different layout alternatives in a floorplan, showed that there is an efficient
polynomial time area optimization algorithm for slicing floorplans whereas the
area optimization problem for non-slicing floorplans is NP-Hard.
A recent non-slicing placement technique, called the sequence-pair method
[5], has been extended to handle soft modules and area optimization [4]. However
the sequence-pair method has to solve expensive convex programming problems
in order to determine the exact shape of each module, and this results in a very
long runtime. Another relatively new technique, called the Bounded Sliceline
Grid (BSG) packing algorithm [6], has proved successful in the placement of hard
rectangles (i.e. rectangles with no flexibility in their shape). On the downside,
though, a single application of BSG packing algorithm scales at T (n) = O(n2 ) for
hard modules, given the n x n grid size suggested by the authors. This compares
with T (n) = O(n) for hard modules using a slicing floorplan approach. It is our
belief that the average case run time scaling of the combined placement and
area optimization algorithm for slicing floorplans with soft modules at T (n) =
O(n lg n) will be hard to beat.
To the best of our knowledge the slicing structure representation used in our
GA is novel. Although there are several other examples of genetic algorithms
applied to slicing tree structures in the literature, it would appear that none of
them uses a GA to manipulate encoded normalized postfix strings. Schnecke and
Vornberger, for example, used a GA to manipulate the slicing tree directly [8].
However, to facilitate their crossover involves complex repair mechanisms simply
to ensure that the final product (or offspring) represents a legal slicing floorplan,
with no duplications or deletions of modules. Another approach [2], in what is
probably the best known study of its type, used a collection of four different
crossovers and applied them to postfix expressions that were not normalized
(using non-normalized expressions greatly increases the search space).
We view our main contribution to the field of slicing tree optimization as
the extension of the ideas of Wong, Leong and Lui [12]: they used a normalized
postfix representation for simulated annealing, and, through the addition of a
novel encoding, we have adapted the approach to produce a simple but effective
genetic algorithm. We test our GA on soft modules from the benchmark MCNC
data sets, ami33 and ami49. The objective of our present study is a ‘proof of
concept’ and we limit our objective function to the construction a floorplan of
minimum area. Other elements, such as the minimization of the total wire length,
will be included in the cost function at a later date.
In section 2 we begin with a review of slicing floorplans and their postfix
representations, and then we briefly describe our approach to the addition of
shape-curves for the combination of soft modules. Section 3 describes the rep-
resentation we use to encode our slicing floorplans, and also the decoder which
interprets these structures as normalized postfix expressions. In section 4 we de-
scribe our genetic algorithm and section 5 presents our results. We conclude in
section 6 with a summary of our achievements and an outline of our plans for
future work.
Fig. 1. Slicing floorplan, skewed slicing tree and corresponding normalized postfix ex-
pression
Fig. 3. Shape curve addition for vertical combination. Shape flexibility for A is 2 and
B is 3.
Our representation is order based and consists of an array of records, with one
record for each of the basic rectangles of the data set. Each record contains three
fields:
– a rectangle ID field : this identifies one of the rectangles from the set {1, 2,
3,..., n}
– an op-type flag: this boolean flag distinguishes two types of normalized post-
fix chains, T = + * + * + * +...., and F = * + * + * + *.....
– a chain length field : this field specifies the maximum length of the operator
chain consecutive with the rectangle identified in the first field.
Our decoder converts a given instantiation of the array of records into a legal
normalized postfix expression by writing down the rectangle IDs in the order
given, and inserting the type of normalized chain of operators indicated by the
op-type flag immediately following each rectangle number. The maximum length
of each chain of operators given in the chain length field is allocated provided
that the balloting property is not violated by doing so (i.e. if we are currently
processing the ith rectangle in the list the total number of operators in the
postfix expression constructed so far must be less than or equal to (i − 1)). If
the decoder reaches the end of the sequence of records and the resulting postfix
string has insufficient operators (less than n−1), extra operators are added on to
the end of the string maintaining the normalized pattern of ..+ * + *... etc. The
decoder algorithm is presented in Algorithm 1. Below is an example showing
an encoded string and its normalized postfix interpretation:
The simple genetic algorithm (GA) used here is derived from the model of [3]
and is an example of a ‘steady state’ GA (based on the classification of [10]. It
is It uses the ‘weaker parent replacement strategy’ first described in [1]. The GA
applies the genetic operators to permutations of rectangle records. The fitness
values are based on the amount of dead space produced in each floorplan defined
by the individual normalized postfix expressions encoded in the population. The
first parent is selected deterministically in sequence, but the second parent is
selected in a roulette wheel fashion, the selection probabilities for each genotype
being calculated using the following formula:
P
selection probability = (Rank)/ Ranks
where the genotypes are ranked according to the values of the dead space that
they have produced, with the worst ranked 1, the second worst 2 etc. and the best
ranked highest. The GA breeds permutations of records from which our decoder
produces normalized postfix strings. These strings are, in turn, processed by
a stack to generate a floorplan. For each horizontal or vertical combination,
the shape curves are added as described in section 2. As each floorplan design
is generated, the dead space is calculated and recorded. The initial population
consists of random permutations of records with each basic rectangle represented
exactly once in each list. The op-type flag for each record is set to ‘+’ or ‘*’ with
equal probability, and the value in the length field is generated in two stages:
We use three different mutation operators, one for each of the fields in our
encoding structure (rectangle ID, op-type, and op length):
5 Results
Table 1. Means of 5 replicate runs for % dead space of the genetic algorithm
Shape
Problem flexiblity Genetic algorithm
Mean Mean run time Best
% dead space # evaluations mins:secs % dead space
ami33 2 0 66734 2:33 0
ami33 3 0 39183 1:33 0
ami33 4 0 28919 1:11 0
ami49 2 0.07 197934 11:42 0
ami49 3 0 101405 6:08 0
ami49 4 0 72913 4:31 0
The results for our GA are summarized in Table 1. We use the modules from
the benchmark data sets ami33 and ami49 with 33 and 49 modules respectively.
Column 2 gives the shape flexibility of the basic rectangles for the experiments
in the rows and columns 3 to 6 summarize the dead space obtained by the GA.
The percentage of dead space for the best floorplan is recorded over five replicate
runs of the GA in column 3, and the overall best for from the five runs is shown
in column 6. The total number of postfix expression evaluations averaged over
the five replicate runs is noted in column 4, and the average run time appears
in column 5. (The individuals rejected because of illegal chip aspect ratios are
counted amongst the evaluations.) As we mentioned earlier, we have not as yet
incorporated any approximations to reduce the number of ‘corners’ accumulated
during the floorplan construction process. Thus we could surely improve our run
times. Because we have used precise calculation we observe vastly inflated run
times due to the large number of ‘corners’ accumulating during the construction
process. From Table 1 it is clear that the GA frequently produces optimal results.
Figure 4 shows a GA frequently produces optimal results. Figure 4 shows a
typical floorplan found by our GA for ami49.
References