In this work, we implement two quadratic placers using partition based and gradient based cell spreading algorithms. Both are implemented to a comparable quality compared to original works [1,2]. By analyzing our implementation based on the two cell spreading algorithms, we found cell spreading algorithms have their strength and weakness in terms of moving cells across and around fixed macros. The ability on dealing with macro blocks
Chapter 1. Introduction 5 significantly affects placer’s global view and local view of the placement. Based on the analysis, we generalize the key elements of the two frameworks and propose a new two stage global placement framework by combining the strengths of the two cell spreading algorithms. To obtain smooth transition between the two stages, our second stage global placer is capable of handling incremental placement.
Fig. 1.3 is the flow chart of the proposed placement framework. The framework begins by obtaining an initial placement that focuses on better relative order of cells and fewer modules overlaps. The first stage of global placement applies partition based cell spreading algorithm, which focuses on white space allocation by moving cells across macro blocks. The second stage of global placement applies gradient based cell spreading algorithm, which focuses on relative order of cells and move cells around fixed macro blocks. In brief, our contributions can be summarized as follows.
• A two stage global placement framework is proposed to address both global view and local view of the placement. The global view of the placement is addressed using partition based cell spreading algorithm that allocates large portion of cells.
The local view of the placement is addressed using gradient based cell spreading algorithm that focus on determining accurate relative order of cells.
• A surface model using Gaussian Blurring is proposed for gradient based cell spread-ing algorithm. The dimension of Gaussian Blurrspread-ing can be easily adjusted to allow global placer to have global view and local view during placement iteration. To achieve faster run time for large Gaussian Matrix at finest grid, Gaussian Blurring is calculated in frequency domain through Fast Fourier Transform (FFT).
• A dynamic step size control methodology and weight adjustment scheme are pro-posed to handle incremental placement.
In the remainder of this thesis, Section II introduces the force directed system for quadratic placers. Section III describes the white space allocation at global scale us-ing partition based cell spreadus-ing algorithm. Section IV compares partition based cell spreading algorithm, gradient cell spreading algorithm and our proposed two stage global placement framework. Section V presents the experimental result. Finally, Section VI concludes this work.
YES
Construct and solve star net model Construct and solve Bound2Bound model
Iteration Criteria Met
Total displacement < α
Initial Placement
Partition Based Cell Spreading (First Stage)
Gradient Based Cell Spreading (Second Stage)
YES
NO
Add pseudo anchors at each target location x’
Adjust weight of pseudo anchor
Determine Initial Step Size
Total overlap area < β
Detailed Placement
Obtain surface model Φ using Gaussian Blurring Construct and solve Bound2Bound model
Legalization
Global Swapping & Local Reordering NO
Determine matrix Ċ and calculate step size Solve (Cx+ Ċx )(x-x‵) = ĊxΦx in Eq. (2.7)
NO
YES
Figure 1.3: The flow chart of the proposed placement algorithm.
Chapter 2
Force Directed System for Quadratic Placers
The main objective for wirelength driven placer is to minimize the total half perimeter wirelength (HPWL). Since HPWL is non-differentiable, quadratic wirelength model in Eq. (2.1) is proposed to optimize the HPWL.
Γ = Γx+ Γy
= 1
2wi,j(xi− xj)2+1
2wi,j(yi− yj)2
= 1
2xTCx+ dTx +1
2yTCy + dTy (2.1)
Eq. (2.1) optimizes the quadratic wirelength rather than the linear wirelength, Kraftwerk2 proposed the bound to bound wirelength model (B2B) to linearize the quadratic wire-length objective. The B2B model neglects interconnect of inner pins and set the net weight wi,j to (P −1)`2 in which P stands for number of pins in a given net and ` is the distance between pin i and pin j. The term 2/(P − 1) adjusts number of connections in a give net and ` linearize the quadratic objective.
Fxnet = Cxx + dx (2.2)
Minimal wirelength can be obtained by minimizing Eq. (2.2) which can be solved efficiently using iterative method. Eq. (2.2) is generally referred as the net force. To remove the overlaps among cells, a surface model Φ can be obtained given with a density function. Target location x0 can be calculated by taking derivative of Φ. Eq. (2.3) defines how to obtain the target location x0 given with a surface model Φ.
x0i= xi− ∂
∂xΦ(x, y) xi,yi
= xi− Φx (2.3)
Kraftwerk2: Fxmove = ˚Cx(x − x0) = ˚Cx· Φx (2.4)
SimPL/ComPLx: Fxmove = ˚Cx(x − x0) (2.5)
Fxhold = −(Cxx0 + dx) (2.6)
The magnitude of step size affects the quality of the placement and execution time.
Thus, implementation of a competitive placer requires precise control of step size on each iteration. Eq. (2.4) or Fmove controls the cell spreading force by adjusting the matrix ˚Cx
which defines the weight of step size.
To maintain stability on each iteration, Fhold in Eq. 2.6 is introduced to neutralize Fnet to prevent placement collapsing to previous state. Thus, Fmove is the only force that spreads out cells in each iteration. Eq. (2.7) defines the force directed system of Kraftwerk2 in which all three forces Fnet, Fhold and Fmove are taken into account.
Kraftwerk2: Fxnet+ Fxhold+ Fxmove = 0
⇒ (Cx+ ˚Cx)(x − x0) = ˚CxΦx (2.7)
Chapter 2. Force Directed System for Quadratic Placers 9
SimPL/ComPLx: Fxnet+ Fxmove= 0
⇒ Cxx + dx+ ˚Cx(x − x0) = 0
⇒ (Cx+ ˚Cx)x = −(dx+C˚xx0) (2.8)
In SimPL, rather than relying on the gradient based method to obtain target location x0, SimPL obtains x0 using partition based method. In addition, SimPL removes hold force in Eq. (2.6) and entire system relies on the balance between Fnetand Fmove. Eq. (2.8) defines the force directed system used in SimPL and ComPLx.
The matrix ˚Cx in SimPL defines the weight of target location x0 and is set uniformly for every cell. Since hold force is removed from the equation, the magnitude ˚Cx needs to be no less than the previous iteration in order to prevent placement collapsing to previous state. Note that the SimPL framework does NOT guarantee each cell has a corresponding target location x0, if a cell is not included during rough legalization, it will not have a target location. In ComPLx [3], an adjust scheme based on the concept total displacement is proposed to derive the matrix ˚Cx.
Regarding to Eq. (2.7) and Eq. (2.8), Kraftwerk2 and SimPL demonstrate the balance of the force directed system can be achieved using three and two forces. The stability of Kraftwerk2 relies on the balance between hold force, net force and move force. In SimPL, hold force is incorporated within the move force and stability of the system is achieved by overpowering the net weight of pseudo anchors on each iteration. The additional force in Kraftwerk2 offers better controllability of the placement structure. When move force is removed from Kraftwerk2, placement maintains its original position. However, when move force is removed in SimPL, placement collapse back to minimal wirelength solution.
Chapter 3
White Space Allocation At Global Scale
One of the key concept for cell spreading algorithm in SimPL is that relative order of cells remains unchanged. This indicates that the relative order of cells obtained during initial placement affects every subsequent placement iterations. The work done in [5, 13] also suggests that choose an intermediate wirelength model between quadratic and linear produces better wirelength result than focusing on the linear HPWL as placement objective. This is because although linear wirelength model produces better wirelength, it also has higher cell overlaps. Thus, unlike SimPL that obtains a lower bound initial placement, our initial placement is obtained by applying star net model which has less module overlaps and better relative order of cells compared to B2B wirelength model.
The strength of partition based cell spreading algorithm lies in its precise allocation of white space. The ability to search for white space across large macros is relatively inefficient for placers using local gradient information. Gradient based placers rely on the balance between density function and wirelength function to control the quality of placement. Thus, when encountering large macro blocks, the weight on density function must outweighs the weight of wirelength function for placer to overlook the presence of macro blocks.
In this work, partition based cell spreading algorithm based on SimPL [1] is adopted to allocate white space at global scale. Compared to SimPL, our partition based cell spreading algorithm does not require to generate stripes to align cells. There is no evidence that generating stripes to align cells increases precision of cell spreading. The work done
Chapter 3. White Space Allocation At Global Scale 11 in [3] also have shown that precision during rough legalization does not undermine solution quality.
During early stage of global placement, the primary focus is on white space allocation.
Thus, our placer begins by searching for regions with precise amount of white space to allocate congested cells. These regions are recursively partitioned based on cell area and white space of partitioned region. Partitioning of regions stops when the white space of partitioned region is less than 4 average node area.
Different from SimPL in which cells are constantly aligned to stripes at each iteration of recursive partition, cells are assigned to each partitioned region after recursive partition is complete. Our approach removes the redundancy of cell alignment in SimPL since only final position of cells matters.
Chapter 4
Cell Spreading Algorithm
After white space allocation at global scale is complete, the cell spreading algorithm switch from partition based to gradient based. At this stage, the target location x0 is obtained using gradient based method instead of using partition based method. Given with a density function of cell area h(x, y), each unit cell area is regarded as an impulse.
Kraftwerk2 regard each impulse as unit charge and surface model Φ(x, y) is obtained by solving the Poisson equation. However, since the primary objective is not on the accuracy of electrical potential, any distribution function is suffice to meet the supply-demand constraint.
In this work, the surface model is obtained using Gaussian Blurring. Each unit cell area has an amplitude of 1 unit Gaussian distribution. In terms of image processing, Gaussian blurring is equivalent to the convolution of a Gaussian function to a density function h(x, y). Eq. (4.1) is the Gaussian function for two dimensional space. The term
Chapter 4. Cell Spreading Algorithm 13
Partition Based Cell Spreading
Early Stage
1 Cluster 1 Expansion Region
3 Clusters 3 Expansion Regions Larger Bin Size
Figure 4.1: Illustration of the bin size adjustment scheme between rough legalization and gradient based cell spreading. (a) Cell distribution in early stage. (f) Cell distri-bution in latter stage. (b) Lower cluster number. (c) Larger expansion region for each cluster. (g) Higher cluster number. (h) Smaller expansion region for each cluster. (d) Lager dimension of Gaussian matrix (e) Cell spreading in larger step size. (i) Smaller
dimension of Gaussian matrix (j) Cell spreading in smaller step size.
σ defines the affected range for each unit cell area. Larger value σ translates to larger dimension of Gaussian matrix. Eq. (4.2) is the derivative or the gradient function of the surface model. The discrete surface model Φ[m, n] can be obtained by solving Eq. (4.3).
In Eq. (4.3), g[m, n] and h[m, n] are the discrete representation to g(x, y) and h(x, y) respectively. According to convolution property: ∂x∂ (f ∗ g) = f ∗ ∂x∂ g the gradient of the surface model Φx and Φy can be obtained by solving Eq. (4.4).
Φ[m, n] =
4.1 Bin Size Adjustment
A given design is generally partitioned in to set of bins. The size of bin significantly af-fects the quality of placement. Fig.4.1 illustrates the bin size adjustment scheme between rough legalization and gradient based cell spreading adopted in this work. Fig. 4.1(a) represents a cell distribution that is highly congested which typically is at the early stage of placement iterations. Fig.4.1(f) represents a cell distribution that is more spread out which typically is at the latter stage of placement iterations.
During rough legalization in the SimPL framework, bin size is decreased by a factor of 0.97 on each iteration of rough legalization. Decrease in bin size has several implicit benefits. Larger bin size illustrated in Fig.4.1(b) and Fig.4.1(c) has lower cluster number and larger expansion region for each cluster. Vice versa for smaller bin size illustrated in Fig. 4.1(g) and Fig. 4.1(h) which produces higher cluster number and smaller expansion region for each cluster. Larger bin size at the beginning allows placer to have a global view of the placement, which can effectively allocate cells to regions with precise amount of white space. As bin size decreases, more local congestion spots can be identified and less perturbation of cells can be expected since size of expansion region decreases.
In this work, since dimension of Gaussian Blurring can be arbitrary adjusted, such characteristic can be achieved by using larger value of σ and larger bin size to capture global view of the placement at the beginning. In Fig. 4.1(d), larger bin size is used and larger dimension of Gaussian matrix is used to blur local white space region. Local congestion at the latter stage can be revealed by decreasing the value of σ and bin size as illustrated in Fig.4.1(i). Note that in both Fig. 4.1(d) and Fig.4.1(i), the summation on dimension of density matrix and Gaussian matrix is a constant in which M + N = 17.
The execution time of two dimensional convolution in spatial domain increases quadrat-ically with the dimension of Gaussian matrix and density matrix. Suppose a M × M Gaussian matrix is convolved with a N × N density matrix, the complexity in spatial domain is O(M2N2). The complexity can be reduced to O(N2logN ) by convolving two functions in frequency domain.
Since larger value of σ implies larger dimension of Gaussian matrix and larger bin size implies smaller dimension of density matrix, the summation on dimension of Gaussian matrix and dimension of density matrix can be set to equal to a constant. To fully exploit the efficiency of convolution at frequency domain, we use Eq. (4.5) to determine the dimension of a M × M Gaussian matrix and a N × N density matrix. Thus, if we set the
Chapter 4. Cell Spreading Algorithm 15 constant to 1025 and initialize the dimension of Gaussian matrix to a quarter of density matrix, then M equals to 205 and N equals to 820.
M + N = 2n+ 1 (4.5)