18.3.1 FIXED POINTS AND BIN SHIFTING Fixed points are an alternative approach to remove cell overlap and can be used both to stabilize and to perturb a placement.. The first fixed point
Trang 1Given that forces tend to zero at infinity, a closed form solution for f (x, y) exists and is given by
∞
−∞
∞
−∞
d(x, y) r(x, y) − r(x, y)
|r(x, y) − r(x, y)|2dxdy (18.8)
wherer(x, y) is the vector representation of position (x, y) Clearly, there is an analogy to
electrostas-tics where cell area is interpreted as electric charge,φ(x, y) is electric potential, and f (x, y) represents
an electric force field In practice, the force computation is accomplished using a set of discrete bins superimposed over the placement region The Poisson equation is solved using discretization and finite differences to determine the values ofφ(x, y) at the centers of bins in the grid Finally, forces
are computed approximately using the difference ofφ(x, y) between adjacent bins.
An alternative approach for force computation was proposed in Ref [16], where the force
com-putation was based on an analogy with the n-body problem In this method, the continuous integral
in Equation 18.8 is replaced with a bin structure based on a Barnes–Hut quad-tree [17] and the forces are computed using a particle–mesh–particle approach
The magnitudes (or strength) of the constant forces at each iteration must be determined in rela-tionship to the spring forces representing the quadratic wirelength The spreading of cells should not be too fast, otherwise the quality of the placement will be compromised Conversely, the forces should not be weighted too small, otherwise their impact will be negligible and many placement iterations will be required for convergence Hence, proper force weighting is a significant implemen-tation decision InKraftwerk, it is advocated that the maximum strength of all constant forces
should be equivalent (normalized) to the force of a net with wirelength K (W + H) where W and H
are the width and height of the placement region, respectively The constant K is a user parameter
that can be used to trade-off speed of convergence and the quality of results However, in Ref [16],
a dynamic weighting is advocated to obtain better placements Empirically, it was observed that weighting should be (1) small in the early iterations of placement; (2) gradually increased as place-ment proceeds, but reduced if too much reduction in overlap occurs in any given placeplace-ment iteration; and (3) large near the end of placement when the final cell positions are effectively determined In Ref [16], it was discovered that, at least in the context of mixed-size placement, a further weighting
of forces on cells was useful and required due to a large distribution of force weights that depended
on the area of the cell This particular observation is interesting, and also a consequence of how forces were computed Ref [16]
18.3 ALTERNATIVE TECHNIQUES FOR SPREADING CELLS
KraftwerkandFDPare examples of force-directed placers that use additional constant forces
at each placement iteration to reduce cell overlap The forces are constant because their calculated magnitudes and directions remain unchanged during a placement iteration, while cell positions are updated through the solution of Equation 18.5 Notwithstanding, constant forces are not the only means by which cells can be spread evenly throughout the placement area In this section, we consider several proposed alternatives to the use of constant forces
18.3.1 FIXED POINTS AND BIN SHIFTING
Fixed points are an alternative approach to remove cell overlap and can be used both to stabilize and to perturb a placement To understand fixed points and their similarities and differences with constant forces, we begin by defining a pseudocell and a pseudonet in terms of a circuit netlist
Definition 1 A pseudocell f is a dimensionless cell fixed at a position (x f , y f ) that does not exist in the circuit netlist.
Trang 2Definition 2 A pseudonet c(f,i) is a weighted two-pin connection between a pseudocell f and a
netlist.
A fixed point f is defined as a pseudocell connected to exactly one cell H (f ) in the netlist through
the use of a pseudonet c (f , H(f )) The connection is weighted by w f ,H (f ) Fixed points are used by the placersARP[18],mFAR[19] andFastPlace[8,9]
18.3.1.1 Fixed Points in mFAR
The relationship between fixed points and constant forces was best explained inmFAR[19], where two fixed points are introduced for each cell in the netlist at each placement iteration The first fixed point for each cell is used to stabilize the position of each cell in force equilibrium, while the second fixed point is used to perturb the cell toward a specific direction aimed at reducing cell overlap Any placement with fixed and movable cells (including I/Os) can be transformed into a force-equilibrium state by adding one fixed point to each movable cell Figure 18.3 illustrates the use of a fixed point versus a constant force to stabilize one cell in a placement The cell positioned at (0, 0) is connected to two other cells in the netlist These two connections exert quadratic spring forces on the cell positioned at (0, 0) resulting in a net force of−−−−→
(−3, 0) To stabilize the placement, a constant force
c shows two alternatives for achieving force equilibrium using a single fixed point with a weighted
connection Through a combination of the selection for the position of each fixed point f and the weight of the pseudonet connecting the fixed point to its associated cell H (f ), the fixed point in
Figure 18.3 can be placed anywhere along the x-axis Any placement can be transformed into force
equilibrium in an infinite number of ways using one fixed point for each cell [18]
One additional fixed point per cell can be used to perturb a placement Figure 18.4 illustrates the use of a fixed point to perturb a placement; in Figure 18.4a, the cell at position (0, 0) is in force equilibrium because of the addition of one fixed point positioned at (3, 0) A perturbing fixed point is added at position (2, 2) as shown in Figure 18.4b and serves to pull the cell in the direction of (2, 2) Finally, Figure 18.4c shows the resulting position of the cell because of the perturbing fixed point This particular perturbation assumes that the other cells are fixed
With the addition of fixed points, the objective function for quadratic placement becomes
i,j
w i,j (x i − x j )2+
f
w f ,H(f ) [x H (f ) − x f]2 (18.9)
where each fixed point f introduces an additional quadratic term, namely w f,H (f ) [x H (f ) −x f]2 (A similar
term is introduced in the y-direction) Each fixed point f is indistinguishable from fixed cells and
I/Os in the original netlist and there remains a trade-off in quadratic wirelength versus the spreading
of cells throughout the placement area—the selection of the positions of fixed points and the weight
of the pseudonets requires careful consideration
It is clear that fixed points serve the same purpose as constant forces However, fixed points stabilize and perturb the placement using spring forces In Ref [19], it is claimed that fixed points
are a generalization of constant forces, which follows from the observation that a fixed point f is able to mimic a constant force applied to cell H (f ) by using a combination of an infinitely large
distance between the fixed point f and the cell H (f ) and an infinitely small weight on the pseudonet
w f ,H(f ) Specifically, we can let the spring force introduced by the fixed point—w f ,H(f ) [x H(f ) − x f]—be equal to some constant force applied to the cell As the fixed point moves to a distance of infinity, we simply adjust the weight of the pseudonet As the fixed point approaches infinity, the angle between
the fixed point f and the cell H (f ) becomes negligible and any movement of cell H(f ) has no effect
on the spring force Hence, the spring force remains constant in both its magnitude and direction
Trang 3( − 2, 2)
1
(0, 0)
2 ( − 0.5, − 1)
(a)
(0, 0) 1
f (3, 0) 1
H(f) ( − 0.5, − 1) 2 ( − 2, 2)
(c)
( − 2, 2)
(0, 0) f
(1.5, 0)
( − 0.5, − 1)
H(f) 2 2
1
(b)
FIGURE 18.3 Illustration of a stabilizing constant force versus stabilizing fixed points In (a), a constant
force is calculated to stabilize the shown cell by countering the spring forces In (b) and (c), two alternatives for stabilizing the cell with a fixed point are shown In fact, a fixed point can be positioned anywhere along the
x-axis to stabilize the placement given an appropriate choice for the weight of the pseudonet The direction of
the spring force exerted by the fixed point on the cell is not constant, but varies as the cell changes position
Trang 4( − 2, 2)
(0, 0) 1
2 ( − 0.5, − 1)
(3, 0) 1
(a)
( − 2, 2)
(2, 2)
f
1 (3, 0)
( − 0.5, − 1)
(0, 0)
2
H(f)
(b)
( − 2, 2)
1
1 2
( − 0.5, − 1)
(3, 0)
(2, 2)
(0.4, 0.4)
f
1
(c)
FIGURE 18.4 Illustration of how a placement can be perturbed by the introduction of a perturbing fixed
point The placement in (a) is in equilibrium through the use of a fixed point In (b), a perturbing fixed point is added at position (2, 2) to pull the cell in this direction Finally, (c) shows the resulting placement because of the perturbing fixed point
Fixed points offer other potential benefits compared to constant forces if consideration is given
to the overall controllability and stability of each placement iteration Specifically, using only fixed points, the position of cells at each placement iteration are guaranteed to be within the convex hull
of the fixed points, fixed cells, and I/O pads Hence, it is guaranteed that cells will remain within the
Trang 5placement area if the position of the fixed points are placed within the placement area This same controllability does not exist for constant forces that can push cells outside the placement region Finally, the linear system of equations used to determine cell positions becomes better conditioned and the stability problems observed in Ref [16] are less likely to be observed
The means by which the position and weighting of the fixed points is determined is key to the success ofmFAR The direction of the stabilizing fixed point is easily determined according to the quadratic spring forces Perturbing fixed points must be positioned in locations that reduce cell overlap and are computed as follows
Given a placement, mFARimposes a Hg × Wg grid bin structure on the placement area such
that each grid bin contains a small number of cells Here, Hgand Wgare the number of grid bins in the vertical and horizontal directions, respectively Cells are inserted into bins in the grid based on
their current positions A grid bin is indexed as b r,c where r and c are its row and column indices, respectively Let C (b) denote the capacity of a grid bin b and let A(b) denote the total cell area assigned
to bin b Any bin b has an overflow if its utilization U (b) = A(b)/C(b) is > 1 A well-distributed
placement requires that no bins overflow Hence, perturbing fixed points should be selected such that cells are pulled away from those bins with overflow to those bins without
Let us consider the vertical boundary between two adjacent grid bins b r,c and b r,c+1 Further, let
C r (0,c) and C r (x+1,Wg)be the total row capacity on the left and right sides of the vertical boundary in
row r, respectively Finally, let A r (0,c) and A r (x+1,Wg)be the total cell area assigned to the bins to the left
and right of the vertical boundary in row r, respectively The amount of cell area x r, (c,c+1)that must
migrate across the vertical boundary between the grid bins b r,c and b r,c+1can be computed by
A r (0,c) − x r, (c,c+1)
C r (0,c) =A r (c+1,Wg) + x r, (c,c+1)
C r (c+1,Wg)
(18.10)
where x r, (c,c+1) > 0 indicates that cells should migrate from left to right across the boundary, while a
negative value indicates the reverse Cells are not shifted across boundaries, but rather the position
of the vertical boundary is shifted and the distance moved by the boundary is decided upon by the
magnitude of x r (c,c+1)as
s r, (c,c+1)= x r, (c,c+1)
where
s r, (c,c+1)indicates the amount of the shift
h (b r,c ) is the height of the grid bin b r,c
After the shifts for all grid boundaries are calculated, the new position of any cell i is given by
the linear mapping
xnew
i = xnew min+ x iold− xold
min
xold max− xold min
×xnew max− xnew min
(18.12)
A similar operation is performed in the y-direction The values xold
min and xold
maxare the left and right
coordinates of the grid bin before boundary shifting, while values xnew
minand xneware the left and right boundaries after the shifting
The perturbing fixed points should be positioned such that cells are pulled toward their new
target positions meaning that the perturbing fixed point f for a cell H (f ) is in the direction of αd
where d is the vector−−−−−−−−−−−−−−−−−→
(xnew
H (f ) − xold
H (f ) , ynew
H (f ) − yold
the overall strength of the perturbation Note that only the direction of the perturbing force and its
strength are determined The actual position of the fixed point f and the weight of the pseudonet
such thatαd = w (−→f −−−→H (f )) are not yet determined.
Trang 6Fixed points and perturbing points may either be placed on-chip (located within the placement area) or off-chip (located outside the placement area) [20] As previously mentioned, when the quadratic program is solved, cells will always remain within the convex hull defined by the fixed points Thus, as long as the fixed points are placed within the placement area, the cells will not escape from the placement area Numerical studies presented in Ref [20] demonstrated that stabilizing fixed points should be kept off-chip to minimize their impact on wirelength, while perturbing fixed points
should be kept along the boundary of the placement area with their edge weights w ijkept as small
as possible Hence, initially all fixed points are positioned along the boundary of the placement area and, as placement progresses, the strength of the stabilizing fixed points are reduced, while their lengths (and positions) are increases such that they are placed off-chip
18.3.1.2 Fixed Points in FastPlace
The description of fixed points thus far has focused on the implementation used by mFAR
FastPlacealso uses fixed points and a bin shifting strategy to reduce cell overlap However, unlikemFARthat used two fixed points per cell to stabilize and perturb a placement at any given iteration,FastPlaceuses only one fixed point per cell
In any placement iteration,FastPlaceskips the calculation of stabilizing fixed points and
immediately imposes a Hg× Wgregular grid structure on the placement area For each grid bin b, the bin utilization U (b) is calculated Subsequently, cells are shifted first in the x-direction and then in
the y-direction Similar tomFAR, the shifting in each direction is a two-step process Grid boundaries are first shifted based on the current utilization of the bins, which yields an uneven bin structure Subsequently, cells are linearly mapped from their positions in the regular bin structure to a target position in the uneven bin structure thereby yielding a target position for each cell The shifting of bin boundaries inFastPlaceis illustrated in Figure 18.5 The positions of the bin boundaries in
Utilization
Bini Bini+1
NBi
OBi− 1 OBi OBi+1
FIGURE 18.5 Illustration of the shifting of bin boundaries used inFastPlacein either the x- or y-direction.
The utilization of each bin is calculated based on the current placement and is then used to shift bound-aries converting a regular bin structure into an uneven bin structure in which cell overlap is removed (From
Viswanathan, N and Chu, C.C.-N., IEEE Trans CAD 24, 5, 722, 2005 Copyright IEEE 2005 With permission.)
Trang 7the x-direction (a similar operation can occur in the y-direction) are computed as follows Let OB i
be the x-position of the boundary for bin i in the original regular bin structure Similarly, let NB ibe
the x-position of the boundary for bin i in the uneven bin structure The position of NB iis calculated via the equation
NBi= OBi−1 [U(i + 1) + δ] + OB i+1 [U(i) + δ]
The idea is that the bin shifting should average out the utilization of adjacent bins Hence, the intuition
behind Equation 18.13 is that it averages the utilization of bins i and i +1 The parameter δ is required
for the following reasons Letδ = 0 and U(i + 1) = 0 From Equation 18.13, it can be seen that
NBi = OBi+1and NBi+1 = OBi and is a crossover of adjacent bin boundaries that results in an improper mapping of cell positions from the regular to the uneven grid structure The inclusion of
δ = 1.5 prevents this crossover from occurring.
The bin shifting yields a target position for each cell, but it is possible that the displacement
of each cell is too large—the cell should not be positioned exactly at its target position, although it should move toward its target position.FastPlaceattempts to pull each cell H (f ) in the direction
of d=−−−−−−−−−−−−−−−−−→xnew
H(f ) − xold
H(f ) , ynew
H(f ) − yold
H(f )
, which is similar tomFAR However, inFastPlace, movement
in this direction is controlled separately in the x- and y-directions using movement control parameters
functions that are inversely proportional to the maximum bin utilization Consequently, during early placement iterations where there is a large amount of cell overlap (and the maximum bin utilization
is large), the movement control parameters are small and cells are shifted very small distances toward their target positions In later iterations, as cells are well distributed throughout the placement area,
α xandα ytake on larger values to accelerate convergence In Refs [8,9], the values for the movement control parameters are given by
α y= 0.02 + 0.5
maxb U (b)
α x= 0.02 + 0.5
maxb U (b)
Average cell width Cell height
which, once again, represent a trade-off in the spreading of cells and the wirelength as measured by
the quadratic objective Finally, the target position for a cell H (f ) is taken to be a displacement of
α x |xnew
H (f ) − xold
H (f ) | and α y |ynew
H (f ) − yold
H (f ) | in the x- and y-directions from its original position, respectively.
The bin shifting, linear mapping, and scaling according to the movement control parameters
yields a target position for each cell H (f ) It is necessary to calculate a position for each fixed point
approach taken by FastPlaceis illustrated in Figure 18.6 Each fixed point f is placed on the boundary of the placement area with its position calculated as follows Each cell H (f ) is moved to
its target position as calculated above, while other movable cells are considered fixed Spring forces
will be exerted on cell H (f ) because of connections to other cells and will result in a nonzero spring
force, because cell H (f ) is out of force equilibrium The constant force that would put cell H(f ) back
into force equilibrium is calculated, and its ray is intersected with the boundary of the placement
area Fixed point f for cell H (f ) is then placed at the intersection of the ray and the boundary of the
placement area By combining bin shifting and force calculations,FastPlaceuses a single fixed point per cell placed on the boundary of the placement area to both stabilize and perturb the current placement
Trang 8Fixed point position
Spreading force
Placement area boundary Resultant
spring force
Target cell position
pF y
pF x
FIGURE 18.6 Illustration of fixed points inFastPlace Given a target location for each cell after the bin stretching, the spring force because of other cells (which are assumed to be fixed) is computed The perturbing force is in the opposite direction and serves to pull the cell toward its target location The fixed point is positioned
on the boundary of the chip and the weight of the pseudonet is computed according to Equation 18.15
Finally, the weight of the pseudonet connecting the fixed point f to cell H (f ) must be computed.
The weight of the pseudonet is computed from the following equation:
w f ,H (f )=
where
target position for cell H (f )
18.3.2 FREQUENCY-BASED METHODS
An alternative frequency-based approach to spreading cells was described in Ref [21] and employed
inUPlace [13] In this method, the spreading forces are computed by minimizing the uneven
density distribution of cells in the placement area A regular N × N grid structure is imposed on the placement area The density of each bin b i,j in the grid is associated with a matrix element d ij = D(i, j)
computed as
d ij = U(b i,j ) = A (b i,j )
where
A (b i,j ) is the cell area in the bin b i,j
C (b i,j ) is the capacity of bin b i,j
Thus, matrix D represents the density distribution of cell area The frequency domain
represen-tation of this matrix allows the cell distribution to be viewed as the rate at which the magnitudes of the densities change
Trang 9The matrix D can be converted into its frequency-domain representation F for all elements i, j
using a discrete cosine transform, DCT [22], whose formula is given by
f ij= 2
N e (i)e(j)
N−1
x=0
N−1
y=0
d xycos
(2x + 1)iπ
2N
cos
(2y + 1)jπ
2N
(18.17)
where
x and y are coordinates in the spatial domain
i and j are coordinates in the frequency domain
and
The distribution of all frequencies can then be defined as
Dist=
i,j
u ij · f2
where u ij is the weight of the distribution at the frequency(i, j).∗When the placement of cells is
totally even, all frequencies f ijbecome 0, and Dist is minimized
InUPlace, the quadratic objective (x) is used to minimize wirelength during placement.
Because Dist is complicated and difficult to minimize directly, it is approximated by a quadratic form taken as a function of the cell positions such that Dist=iDisti , where for each cell i, we have
Disti = 1
2a i x
2
To determine the coefficients a i and b i, the current solution of the placement is disturbed one cell at a
time, and the changes in the values of Dist are observed For a given cell i (considering the x-direction only), the value of Dist is computed for the current placement The cell i is then shifted left by a
distanceδ, and Dist i−δ is recomputed The cell i is then shifted right by δ, and Dist i+δis computed This testing yields three sampled tuple values{(i, Dist i ), (i − δ, Dist i−δ ), (i + δ, Dist i+δ} for each cell,
which allows the values of a i , b i in Equation 18.20 to be interpolated for each i The coefficients
from the quadratic approximation to Dist can be reexpressed in matrix form, added together with the quadratic wirelength(x), differentiated and set to zero to yield the system of equations given by
Here, Axis a diagonal matrix defined as Ax = diag(a1, a2, , a n ), and b x = [b1, b2, , b n]T Note
that the constant term in Equation 18.20 disappears as a result of the differentiation Neither Qxnor cx are affected by changes to the distribution function Dist; only matrix Axand vector bxare modified
A similar equation is established for the y-direction.
Equation 18.21 can be likened to the force equation used inKraftwerkin the following manner
By determining the distribution function Dist, the technique finds an additional force formulation
fx = Axx + bx, which equals the first-order derivative of the quadratic approximation to the cell distribution, Dist Thus, the equilibrium state of the system corresponds to the optimum solution to the combined objective function of both wirelength and cell distribution components [13]
eliminate.
Trang 1018.4 ENHANCEMENTS
Quadratic force-directed placers are generally not as competitive with methods based on simulated annealing or minimum-cut partitioning This is a consequence of the use of a quadratic wirelength objective In particular, quadratic wirelength does a poor job of approximating routed wirelength, which is better approximated by a linear objective such as HPWL Consequently, it is common to interleave the placement iterations with other heuristic strategies to improve the overall quality of the placements In this section, we review the strategies used in several tools, includingFDP,mFAR, andFastPlace
18.4.1 INTERLEAVED OPTIMIZATIONS
In Ref [23], Goto proposed an algorithm that can be used to move a cell at (or near) the position that minimizes the wirelength of its connected nets, while assuming other cells are fixed The algorithm can be applied iteratively to each cell to obtain an improved placement Central to Goto’s idea is the concept of the median of a cell Goto defines the median of a cell as the position of the cell at which the HPWL of its connected nets is minimum
The median of cell C is computed as follows Let E C denote the set of nets connected to cell C For each e ∈ E C , compute the enclosing rectangle of all pins on e, while excluding those connections
to cell C; the dimensions of this rectangle can be denoted by coordinates (xmin
e , ymin
e , ymax
e ),
where xmin
e and xmax
e are the minimum and maximum values in the x-direction, respectively The same definitions hold for ymin
e and ymax
e in the y-direction Given these definitions, the total wirelength for all nets connected to cell C at position (x, y) is given by
e ∈EC
where
f e (x) =
⎧
⎨
⎩
xmin
e − x, x < xmin
e
e ≤ x ≤ xmax
e
x − xmax
e , x > xmin
e
(18.23)
f e (y) =
⎧
⎨
⎩
ymin
e − y, y < ymin
e
e ≤ y ≤ ymax
e
y − ymax
e , y > ymin
e
(18.24)
The optimal position(x, y) for cell C can be calculated separately in both the x- and y-directions.
Goto showed that Equation 18.22 can be written (x-direction only) as
e ∈EC
|x − xmin
e | + |x − xmax
with the optimal solution given by a median computation In practice, medians are computed simply
by inserting xmin
e and xmax
e for all e ∈ E Cinto a vector and sorting the entries of the vector For a vector
of length n indexed 1 to n, a suitable minimizing value for x is any value within the range of values
stored at the indices
the median rectangle for a cell connected to three nets
Goto observed that the total cost of placing cell C in any position outside of the median is piecewise strictly convex This fact helps to identify alternative positions for cell C that are perhaps
outside of the optimal positions Goto encapsulates these alternative positions through the use of the
-neighborhood, which is defined as the set of positions for the cell where the wirelength is one of