Title: Engineering Details of a Stable ForceDirected Placer
1Engineering Details of a Stable Force-Directed
Placer
- Kristofer Vorwerk
- Andrew Kennings
- Anthony Vannelli
- Electrical and Computer Engineering
- University of Waterloo
2Outline
- Introduction
- Implementation Details
- Force Computation
- Assessment of Cell Spreading
- Stability Problems
- Improving Quality
- Median Improvement
- Dynamic Force Weighting
- Numerical Results
- Conclusion
3Introduction
- Force-directed placement is a placement
methodology with two main thrusts - Quadratic optimization to pull connected cells
together. - Addition of separating forces (like Coulomb
forces) to push cells apart. - Force-directed placement is of interest because
... - It is generic (mixed-size blocks are handled
seamlessly). - It can be augmented to handle interesting
problems, like physical re-synthesis. - From an academic standpoint, it remains a
relatively untapped means of placement.
4Background (1 of 3)
- Assuming cell overlap is allowed, we can keep
connected cells together via the solution of a
quadratic program (x-direction only)
- Matrix Q (the Hessian) is a result of connections
between pairs of movable cells. - The cost vector, c, is a result of connections
between movable cells and fixed cells (e.g., I/O
cells). The constant, d, is simply discarded.
5Background (2 of 3)
- The benefit of the QP formulation is that its
solution is simple and fast, obtained by solving
a single linear system - Its disadvantage is that the resultant placement
is highly overlapping.
6Background (3 of 3)
- Cells must be encouraged to spread throughout the
placement area. - We can perturb the optimality conditions by
adding spreading forces. - That is, we solve a sequence of optimization
problems where each has a solution given by
solving a single system of equations
- Continue until cells are distributed throughout
the placement area.
7Force-Directed Placement Caveats
- Some aspects of force-directed placement have not
been well discussed in the literature - How to efficiently compute spreading forces?
- How to know when to stop placement?
- How to deal with potential instability issues?
- How to achieve high-quality results on-par with
other modern approaches (like simulated annealing
or min-cut partitioning)?
8Implementation Force Computation (1 of 3)
- How do we compute forces on individual cells to
achieve a uniform distribution of cells
throughout the placement area? - Use ideas from n-body simulation (Barnes-Hut Quad
Tree). - We begin by building a Quad Tree over the
placement area
9Implementation Force Computation (2 of 3)
- Prior to each placement iteration, we do the
following - Given the current placement of cells, insert cell
area into the Quad Tree. - Using Barnes-Hut computation (interaction lists,
near neighbors, etc.) compute the force on each
bin in the lowest level of the Quad Tree. - Compute the force on each cell by summing the
forces on the bins with which the cell overlaps. - This provides a force on each cell.
- The Quad Tree also tracks the distribution of
cell area throughout the placement region in
different granularities. This is useful later
10ImplementationForce Computation (3 of 3)
- It is necessary to somehow scale the forces on
cells. - Large cells overlap with more bins in the lowest
level of the Quad Tree and therefore tend to
receive larger forces. - Large cells can (potentially) get pushed too
much, too soon. - We employ the simple scaling scheme of dividing
the force on each cell by roughly the number of
bins it overlaps. - Finally, we normalize so that the largest force
is equal to unity.
Scaling forces results in more uniform force
magnitudes on individual cells.
11ImplementationOverlap Assessment
- It is important to assess the distribution of
cells throughout the placement area as the
algorithm progresses - Need to know when to stop.
- Need to know if any problems arise (e.g., a
re-collapsing of cells onto each other). - Two metrics developed for overlap assessment
- Capacity vs. occupancy.
- Measurement of overlap.
12ImplementationCapacity/Occupancy Metric
- First metric measures capacity violations using
the Quad Tree employed earlier to compute
spreading forces. - Scans each bin (i,j) in each level l of the Quad
Tree and computes
- Found to provide a good global assessment of
overlap, but poor measure near the end of the
algorithm.
13ImplementationKlees Measure
- Second metric uses a O(n log n) plane-sweep
algorithm to assess overlap. - Divides area of the union of cells by total cell
area. - Found to be poor early in placement (simply too
much overlap), but very accurate toward the end
of placement. - We combine the two metrics to accurately monitor
cell distribution.
- Area of cells individually is 188 units, and the
area of their union is 170 units. - 170/188 0.90, or 10 overlap
14ImplementationStability (1 of 3)
- Placements would occasionally collapse back onto
itself indicating some sort of problem. - The algorithm would recover, but required
additional iterations. - The problem, it turns out, has to do with the
conditioning of the Hessian. - I.e., placement de-stabilization only occurred on
some benchmarks that proved to have poorly
conditioned matrices.
15ImplementationStability (2 of 3)
- Comparing optimality conditions for two
consecutive placement iterations implies changes
in node positions are given by
- Conditioning can be improved by adding positive
entries along the diagonals of Q i.e.,
- The diagonal entries correspond to zero-area
fixed cells that move along with their associated
real cell. - These zero area cells cause the real cells to
favor following their spreading force and are
like friction.
16ImplementationStability (3 of 3)
- Empirically, it has been found that friction
need only be applied to 5 of the least
diagonally dominant rows (columns) of Q. - Does not appear to inversely impact the quality
of results, while helping to stabilize the
placement. - Side benefit of improving the convergence of the
iterative solver. - We were only able to implement this stabilization
method because of the reliability of assessing
cell overlap via previously described heuristics. - It is the assessment of overlap via the metrics
that allow for the detection of the instability
problem in the first place.
17Improvements
- The aforementioned ideas were implemented, and
placements were obtained reliably. - Results, however, were not comparable with other
state-of-the-art placement methods based on
Simulated Annealing and/or Min-Cut Partitioning
(off by about 7 to 10). - Results were, however, comparable to other
force-directed methods (e.g., Kraftwerk). - Our force-directed placement method needed some
updating in order to be considered
state-of-the-art.
18ImprovementsBoxPlace (1 of 3)
- Hypothesis was that there was a left/right
problem with cells. - Solving the global QP provides only approximate
information regarding cell positions. - Furthermore, due to spreading forces, it can be
hard for cells to cross paths.
B
C
A
Cells A and B connected attractive force pulling
A towards B. Cell C creates an obstacle causing
a force keeping A and B apart.
19ImprovementsBoxPlace (2 of 3)
- Idea of median improvement is
- Pick a candidate cell and its connected edges.
- Compute the min/max position of each edge,
ignoring the current cell. - Find the median location.
- Move the candidate cell into the box.
- Overcomes blocking cells improves final
results by several percent. - In doing these movements, need to carefully
monitor overlap to avoid re-introducing too much
overlap.
20ImprovementsBoxPlace (3 of 3)
- Another method to improve wire length is to
modify the spreading forces directly using the
target location from a hypothetical application
of median improvement. - Re-orient the forces (somewhat) so that they
point not only in the direction of overlap
removal, but also in the direction of wire length
minimization. - We combine the forces in a 60/40 mix (in favor
of spreading). - More iterations are required, however, for the
placement to converge.
21ImprovementsDynamic Force Weighting
- Recall the perturbed optimality conditionsforces
are added in each iteration with a weight a
- Other force-directed placers appear to use a
constant weighting we have found that this does
not work too well. - We have found that dynamically adapting weights
is important. - Weighting starts off very low, increases as cells
spread, and decreases if instability is detected. - In effect, we implement a state-machine (FSM)
that adapts weights according to the assessment
of cell spreading.
22Numerical Results (1 of 4)
Mixed-size IBM benchmark statistics (from Adya
Markov)
23Numerical Results (2 of 4)
- We compare to Kraftwerk, another force-directed
placer, using the ISPD2002 mixed-size benchmarks. - HPWL results show a fairly uniform improvement
across designs. - Prior to enhancements using median improvement,
we were about 1.0 with Kraftwerk. - Runtimes are comparable (but are on machines of
slightly different speeds).
Note FDP results presented here are legalized
(i.e., no overlap). Kraftwerk results are not
legal.
24Numerical Results (3 of 4)
- We also compare to Capo 8.0 flows and mPG on
mixed-size circuits. - Note that placements from Capo Flow 2-A contain
some overlap. - Our quality is on-par with Capo 8.0 Dragon for
standard cells.
25Numerical Results (4 of 4)
- We have since improved our tools handling of
mixed-size designs. - These results are obtained using recent
modifications. - Quality of results comparable to Capo 9.0 (though
runtime is higher).
26Conclusions
- Presented numerous details regarding the
implementation of force-directed placement. - Numerical results of the first generation tool
were comparable to state-of-the-art. - Some additional work has since taken place which
now yields 13 better HPWL on mixed-size
designs. This is comparable to the latest Capo
9.0 flow. - Work is continually being done to improve quality
and performance. - Source code is freely available for academic use,
and can be downloaded at http//gibbon.uwaterloo.
ca