The remainder of this thesis is organized as follows. Section 2 formulates the blockage terminal propagation problem. Section 3 details our algorithm. Section 4 shows the experimental results. Section 5 concludes this thesis.
: movable module
Figure 1.3: An illustration for our work. The region below the preplaced blocks is not placeable. (a) Result of traditional placement flow. The traditional placement result falls short of routed wirelength of preplaced blocks terminals. (b) Result of terminal propagated placement flow. The revised flow fuse traditional placement flow with terminal propagation algorithms. Thus, a detour-minimized solution is obtained while the well-developed HPWL minimization algorithms can still be utilized.
Preliminaries
In this section, we give the motivation of this thesis first, and then we introduce the routing resources of a placement problem. Finally, we define blockage terminal propagation placement problem.
2.1 Motivation
As design complexity grows exponentially, detecting and solving nets with possible routing detours during the placement stage is considered intricate. For example, some placers adopt weighted Half-Perimeter WireLength (wHPWL) as their goal for wirelength minimization. Unlike HPWL, wHPWL calculates each net wirelength by the product of its HPWL and a weight. Intuitively, placers with wHPWL as objective function can assign nets crossing preplaced blocks with low weights to prevent cells from spreading onto the preplaced blocks. However, as the instance illustrated in Figure 1.2, the spreading directions of the green cells are still dominated by their HPWL functions regardless of their weights. In other words, no matter how low the weights are assigned to these green cells, their spreading directions will not change because their individual optimization objectives are still half-perimeter wirelength. Furthermore, lowering weights of certain nets inhibits them from spreading toward their target locations, which is basically undermining
the objective of placement algorithm. Figure 2.1 shows the downside of lowering weights of nets crossing blockages. In Figure 2.1 (a), movable cells can be easily spread through preplaced blocks. Placement algorithms can find placement results with minimized wirelength in terms of HPWL between movable cells and preplaced terminals. In Figure 2.1 (b), the costs of nets crossing the blockages are raised.
This change compromises the spreading force on these movable cells. As a result, the movable cells are inhibited from spreading to desired locations with minimized wirelength, despite that the spreading directions for these movable cells might be very promising. Thus, minimizing weights of nets crossing preplaced blocks can hardly solve routing detours from preplaced blocks.
In a traditional placement flow, placement algorithms can easily place mov-able cells onto preplaced blocks to minimize HPWL of nets of preplaced terminals.
Despite that numerous techniques hinder cells from being placed onto preplaced blocks, a placement result produced by traditional placement flow has significantly larger routed wirelength than its HPWL. Therefore, we need an effective algorithm that can prevent placement algorithms from placing movable cells onto preplaced blocks. Adjusting the weight of nets crossing preplaced blocks is a way to make problems disappear. However, just because movable cells are not placed onto pre-placed blocks does not mean that these movable cells are pre-placed to better locations.
The problem of cells being placed onto preplaced blocks is resulted from an improb-able minimization of HPWL of nets connecting terminals of preplaced blocks. To solve this problem without changing the HPWL minimization objective, the prob-lem should be focused on the terminals, instead of the nets connecting the terminals.
Thus, a terminal propagation algorithm is needed to be developed to find feasible optimization directions for cell spreadings.
Adding cost to blockage could prevent modules from spreading onto preplaced blocks, but such handling also inhibits modules from passing through blockage
: blockage with normal cost : blockage with raised cost
: movable module
(a) (b)
: preplaced terminal
Figure 2.1: Adding cost to blockages (nets crossing blockages) can possibly pre-vent modules from spreading onto preplaced blocks, but such handling also inhibits modules from passing through blockages. The grey rectangles represent blockages with normal costs. The red rectangles represent blockages with raised costs. The green rectangles represent movable cells. The yellow circles represent terminals of preplaced blocks. The arrows represent placement cell spreading. (a) Movable cells can be spread through blockages in order for placement algorithms to find preferred placement results with minimized wirelength. (b) If the costs of blockages are raised, the movable cells cannot be spread effectively, thus qualities of placement results are compromised.
2.2 Routing Resources
Global routing resources are available routing tracks that can be used to solve global routing problems. The objective of a global routing problem is to obtain minimized routed wirelength with a given placement result and global routing resources. To model global routing resources, grid graph models are often applied to formulate global routing problems. Figure 2.2 shows that the routing regions are divided into uniform and non-overlapping routing tiles called G-cells. The routing resources of a G-cell can be divided into four parts by their direction toward its adjacent G-cells. A routed wire crossing through a G-cell t1 vertically occupies a portion of its vertical routing resources. The vertical routing resources between t1 and t1u as well as the resources between t1 and t1d are occupied by this wire. A routed wire crossing a G-cell t2 horizontally occupies a portion of its horizontal routing resources. The horizontal routing resources between t2 and t2l as well as t2 and t2r are occupied by this wire. A routed wire crossing a G-cell t3 from t3r to t3u. This wire occupies the horizontal routing resources between t3 and t3r as well as vertical routing resources between t3 and t3u.
To solve blockage terminal propagation placement problems, we consider routing resources with G-cells in our algorithm. Our terminal propagation algo-rithm utilizes the information of G-cells to perform approximations on global routed wirelength and routability.
: G-cell
(b) Use horizontal routing resources (a) Use vertical routing resources
(c) Use horizontal and vertical routing resources
t
1t
1ut
1bt
2t
2rt
2lt
3t
3rt
3uFigure 2.2: With given routing architecture, we can allocate the routing resources of each routing tile according to net connections. (a) A routed wire crossing through a G-cell t1 vertically occupies a portion of its vertical routing resources. The vertical routing resources between t1 and t1u as well as the resources between t1 and t1d are occupied by this wire. (b) A routed wire crossing a G-cell t2 horizontally occupies a portion of its horizontal routing resources. The horizontal routing resources between t2 and t2l as well as t2 and t2r are occupied by this wire. (c) A routed wire crossing a G-cell t3 from t3r to t3u. This wire occupies the horizontal routing resources between t3 and t3r as well as vertical routing resources between t3 and t3u.
2.3 Problem Formulation
H the given circuit
V the set of all modules of H E the set of all nets of H
B the set of all preplaced blocks in V C the set of all movable modules in V P the set of all terminals of B
P0 the set of all propagated terminals bi the i-th preplaced block in B pi,j the j-th terminal of bi
N the number of elements in B Mi the number of terminals of bi
Figure 2.3: Notations in this thesis.
The blockage terminal propagation placement problem can be formulated as a graph minimization problem. Given a circuit represented as a hypergraph H = (V, E). Let vertices V = {B ∪ C} be all fixed and movable modules, where B = {b1, b2, b3, ..., bN} represents preplaced blocks and C represents movable cells.
Let E be the nets. Let the terminals of preplaced blocks be P = {p1,1, p1,2, ..., p1,M1, p2,1, ..., p2,M2, ..., pN,1, ..., pN,MN}, where pi,j represents the j-th terminal of preplaced block bi. Let xpi,j and ypi,j be the x and y coordinates of pi,j. The blockage terminal propagation placement problem is to find a set of propagated terminals P0 = {p01,1, p01,2, ..., p0N,M
N} such that by determining the desired position of C with respect to P0, the routed wirelength of the placement result is minimized while technology constraints are satisfied.
Terminal Propagation Algorithm
Figure 3.1 gives a simple comparison between a traditional placement flow and our proposed algorithm. Our proposed flow features a terminal propagation technique applied at the preplacement stage. By integrating our terminal propagation algo-rithm to a traditional placement algoalgo-rithm, placement results with minimized global routed wirelength can be obtained without compromising the polished minimization mechanisms of the original placers. In this chapter, we would first show an overview of our algorithm, and then explain our terminal propagation algorithm step by step.
3.1 Algorithm Overview
Figure 3.2 summarizes the overall flow of our proposed algorithm. The ter-minal space allocation algorithm is conducted for each terter-minal of preplaced blocks to ensure the propagated spaces have the capacity of containing all the cells that would spread toward them. A routed wirelength approximation is then applied to derive a cost for each possible propagation location. With the cost calculated, an obstacle-aware propagation algorithm is performed to find a propagation result with minimum cost. If the routing detours are still large, a min-cost maximum flow network algorithm is applied to ensure the optimality of the solution quality. The techniques of our algorithm are detailed in the following sections.
Traditional Placement
(with terminal detours) Placement Result
(Minimum Terminal Detour)
Figure 3.1: A comparison between the traditional placement flow and our terminal propagation placement flow. (a) Traditional placement flow produces results with minimized HPWL, which may incur routing detours around preplaced blocks. (b) Our blockage terminal propagation placement flow handles blockage terminals prior to placement algorithm, which solves detours and without compromising the quality of HPWL minimization algorithms.
Terminal Space Allocation
Circuit Netlist Routing Architecture
Obstacle-Aware Propagation
Optimal Routing Resources Distribution Detour > threshold
Yes No
Placement Result
Figure 3.2: An overview of our terminal propagation placement flow. First, our algorithm creates a terminal space for each preplaced block terminal. Then, an obstacle-aware propagation algorithm is performed to propagate terminals of pre-placed blocks. Next, the routing resources are optimally redistributed if the approx-imated detours are still large after previous stages. Finally, the placement algorithm optimize the placement according to the propagated terminals to obtained a detour-minimized placement result.
3.2 Terminal Space Allocation
The first step of our algorithm is to define terminal spaces. In traditional placement flow, movable cells with nets connecting to preplaced terminals are prone to be spread onto preplaced blocks for minimized HPWL. Therefore, a propagation without considering the sizes of cells connected to terminals may possibly lead those cells to an region with insufficient free space. To properly handle the cells connecting to terminals of preplaced blocks, we introduce terminal spaces to represent the area of cells that were to be placed onto preplaced blocks. A terminal space of a terminal is a region with an estimated cell area. This terminal space has an area that is positively related the sum of areas of movable cells connected to this terminal.
These movable cells that were supposed to be placed onto preplaced blocks should be able to be contained in this terminal space. Figure 3.3 shows that two terminals with different cell areas result in different sizes of terminal spaces. In Figure 3.3 (a), there are only two movable modules connecting to the preplaced terminal, and the total area of the two movable modules is not very large. Therefore, the area of the terminal space is relatively small. In Figure 3.3 (b), there are three movable modules being placed onto the preplaced block to minimize the HPWL between the movable modules and the preplaced terminal. Furthermore, these three movable modules all have an area larger than any of the movable cell in Figure 3.3. Thus, to consider minimizing possible overlaps between movable modules connecting to preplaced blocks, the terminal space in Figure 3.3 (b) should be larger than that in Figure 3.3 (a).
Because terminal propagation is performed prior to placement stages, an algorithm predicting whether a cell would be spread onto preplaced blocks should be effectively applied. We propose Algorithm 1 to predict the size of a terminal space.
Algorithm 1 Terminal Space Allocation
Input: pi,j: the j-th terminal of preplaced block i Output: Spi,j: the terminal space of pi,j
Given a preplaced terminal pi,j, we define Spi,j as the terminal space of the propagated terminal p0i,j. Let Γ(pi,j) represent the set with all cells connecting to pi,j. Let the area of Spi,j and Γ(pi,j) be A(Spi,j) and A(Γ(pi,j)), respectively.
Theorem 1 Let there be |CP| cells connected to a preplaced terminal, and totally
|CC| cells connected to the |CP| cells. The time complexity of terminal space alloca-tion is O(|CP||CC|).
Proof 1 For a cell connected to a preplaced terminal, the time complexity of finding all cells connecting to it is O(|CC|). Because every cell connecting to a preplaced terminal is queried, the worst case scenario for time complexity happens when all
|CP| cells connect to all |CC| cells, which means it needs |CP||CC| queries. There-fore, the time complexity of determining the terminal space of a preplaced terminal is O(|CP||CC|)).
(a) (b)
Larger cells area, larger terminal space
: terminal space : movable module
: preplaced block : preplaced terminal
: propagated terminal
Figure 3.3: Each propagated terminal creates a square with an area that can contain all the modules that were to be placed onto the preplaced blocks in global placement.
3.3 Obstacle-Aware Propagation
In a placement problem, a placeable region is defined as a region where movable modules can be placed in. In this stage of our algorithm, placeable regions are divided into propagation tiles (p-tiles), as illustrated in Figure 3.4. The width and height of p-tiles are scalable to placement problem size. Given a preplaced block terminal pi,j, a cost is given to each p-tile adjacent to the preplaced block bi. We define the cost of a p-tile for pi,j to be the estimated routed wirelength from pi,j to the p-tile.
To estimate a routing result from a terminal to a p-tile, a routing approxima-tion algorithm adopted from Lin et al. [23] is applied to evaluate possible detours.
For unblocked nets, our routing algorithm estimates the cost by directly calculat-ing the Manhattan distance between the terminal and the p-tile. For nets crosscalculat-ing routing blockages, an obstacle-avoiding spanning tree is constructed by connecting terminals to every corner of the blockages. All edges of the spanning tree is then in-dividually reconstructed to a Steiner tree. The result is found by selecting a feasible connection of Steiner trees with minimum routed wirelength.
With the cost of each p-tile calculated, we can formulate terminal propagation problem into a cost minimization problem. Let ˆW (pi,j, p0i,j) be the approximated routed wirelength connecting pi,j and p0i,j. Let Ov(Spi,j, Spk,l) stands for the set of elements between in Spi,j and Spk,l that have overlaps. Let Ov(Spi,j, B) stands for the set of elements between Spi,j and B which have overlaps. The objective of a terminal propagation problem is defined as Equation 3.1:
Algorithm 2 Obstacle-Aware Propagation
Input: pi,j: the j-th terminal of preplaced block bi Output: p0i,j: the propagated terminal of pi,j
1: cmin = LARGE N U M
2: t0 = N U LL
3: for each p-tile t adjacent to bi
4: if free space of t > Spi,j
5: ct= Calculate Obstacle Aware Cost(t)
6: if cmin > ct
Theorem 2 Given a preplaced terminal, |T | p-tiles and N preplaced blocks. The time complexity of our obstacle-aware propagation algorithm is O(|T |N lgN )
Proof 2 Because our routing approximation only calculates nets between propagated terminals and the original terminals, the worst case scenario of our obstacle-aware propagation algorithm happens when all |T | p-tiles are calculated with 4N corners.
Calculate each p-tile takes O(N lgN ). Thus, the time complexity of calculating all p-tiles is O(|T |N lgN ).
1 2 3 4
5
(a)
(b)
1 2 3 4 5
: P-tile
Figure 3.4: Unblocked regions are divided into propagation tiles, and the priority for propagation is ranked by approximated routed wirelength.
Our obstacle-aware propagation algorithm can solve terminal propagation problems with minimized approximated wirelength. The propagation algorithm is fast and effective. It can find detour-free solutions if routing resources and placeable regions are not too scarce. However, for problems with scanty routing resources, the solution quality of obstacle-aware propagation is subject to the precedence of terminals. To solve this, an optimally routing resources distribution algorithm is described in the following subsection.
3.4 Optimal Routing Resource Distribution
For cases with scarce routing resources, obstacle-aware propagation can only guarantee the propagated terminals with minimum cost p-tile would result in the shortest routed wirelength. Therefore, we propose a routing resource distribution algorithm by formulating terminal propagation problems into escape routing prob-lems.
To model a terminal propagation problem into a graph, each routing tile is transformed into a routing tile node. Figure 3.5 shows how a set of given routing resources is formulated into a graph. Each routing tile node has an edge connected to adjacent routing tile node horizontally or vertically. The edge capacity represents the horizontal or vertical routing resources according to the type of the edge. For any net routed through a tile, it takes up a portion of the routing resources of the tile. When the horizontal (vertical) routing resources of a routing tile is depleted, no more nets can be horizontally (vertically) routed through it.
The transformed problem can be directly mapped to a minimum-cost maxi-mum flow problem (MCMF) mentioned in [6]. Our algorithm adopts the successive shortest path algorithm to find the minimum approximated routed wirelength with
: routing tile node
Ch : horizontal routing capacity Cv : vertical routing capacity 1/Cv
Figure 3.5: Each routing tile is formulated as a vertex, and the capacity of each edge represent the available routing resources between two routing tiles.
the maximum number of propagated terminals.
Based on the optimal routing resource distribution algorithm, we can derive the following theorem:
Theorem 3 Given |P | preplaced terminals and |G| G-cells, the time complexity of our optimal routing resource distribution algorithm is O(|G|2|P |).
Proof 3 Optimal routing resources distribution algorithm uses successive shortest path algorithm to solve minimum cost maximum flow problem. Successive short-est path algorithm finds optimal solution by iteratively search all O(|P |) augmented paths. Each path takes O(|G|2) time complexity. Thus, the time complexity of opti-mal routing resources distribution algorithm is O(|G|2|P |).
(a)
(b) 1/1
1/1
1/1 1/1
1/1
1/1
1/Ch0,0,1 1/Cv0,0,1
1/Cv4,1,2
1/Ch0,4,5 1/Ch0,5,6 1/Cv6,0,1
s t
Figure 3.6: The formulation of routing resources is illustrated here. (a) Apply routing tiles on preplaced blocks. (b) Resultant flow network for the formulated minimum-cost maximum flow problem.
Theorem 4 Given a set of preplaced blocks B, a set of movable cells C, routing ar-chitecture, and a set of preplaced block terminals P with A(Spi,j) > 0 for all pi,j ∈ P , if we perform maximum flow algorithm on our routing tile model and derive a solu-tion with some of the terminals not propagated, there exists no feasible global routing solution with every terminal in P propagated.
Proof 4 Because the maximum flow algorithm is performed before placement, there is no external routing resources that is preoccupied by other modules. The maximum flow algorithm can find the maximum number of possible propagations within given routing resources as flow capacities. If there are terminals unable to be propagated after performing maximum flow algorithm, it means the routing resources are de-pleted before these terminals are routed. Given that the maximum amount of routing resources are already in use, the inability of the maximum flow algorithm to find a solution with all terminals propagated means that the global routing resources have no such capacity to rout all terminals in P . Thus, there exists no feasible global routing solution for all P .
Theorem 5 Given a set of preplaced blocks B, a set of movable cells C, routing architecture, and a set of preplaced block terminals P which every element in P has a net connection to another cell or terminal, if there exist a feasible solution of prop-agated terminals P0 computed by MCMF, we can guarantee the sum of wirelengths from the propagated terminals to the original terminals is minimum.
Proof 5 Since our algorithm is applied before placement, the movables cells are not yet spread onto the placement region. Without any routing resources taken, the
maximum amount of routing resources are optimally divided into routing tiles. If there exists a solution computed by MCMF, the computed solution has the maximum amount of terminals propagated with the minimum wirelength. Thus, the derived so-lution has the minimum routed wirelength with the maximum number of propagated
maximum amount of routing resources are optimally divided into routing tiles. If there exists a solution computed by MCMF, the computed solution has the maximum amount of terminals propagated with the minimum wirelength. Thus, the derived so-lution has the minimum routed wirelength with the maximum number of propagated