CHAPTER 4 DSA DESIGN-TECHNOLOGY CO-OPTIMIZATION
4.3 DSA Contact Layer Optimization for Full-chip Layout
It is shown that the DSA contact layer optimization problem is NP- hard [9]. The previous SAT formulation can solve the problem in cell scale, but not full-chip level. On the other hand, simulated annealing [42] has been suc- cessfully employed in many area, such as floorplanning problem [43]. In this work, we propose a simulated-annealing based algorithm to search for a near-optimal solution iteratively. We introduce our annealing scheme and the operations (moves) to search for neighbors of a state (solution) in the following. As in any simulated annealing based algorithm, the efficiencies of evaluating cost (energy) and updating the solution directly affect the ef- ficiency of the algorithm as they are evaluated at each iteration during the cooling. Therefore, we propose an efficient algorithm to dynamically update the graph connected components that correspond to the template shapes. This enables fast evaluation of template cost.
4.3.1
Overall Annealing Scheme
The proposed algorithm follows the three phases below to converge to a solution:
1. Perturb the given layout and generate candidate solutions. 2. Evaluate the new cost of the candidate solutions.
3. Accept or reject the candidate solutions according to the Metropolis criteria.
4.3.2
Candidate Solution Generation
A naive candidate generation operation is to randomly select a metal wire and move it to a feasible location. However, this approach is inefficient due to the same costs of some neighboring solutions. For example, the solution in Figure 4.3(b) will have the same cost as the solution where contact 7 is moved down by one grid. Clearly, there will be lots of such cases. This inevitably increases the annealing iterations.
To avoid oscillating among a set of neighboring solutions with the same costs, guidance is required during the solution generation. We propose a field-based method that is similar to the density penalty concept for over- lap minimization in analytical placement. Particularly, we define the local contact density of a grid as the ratio of contacts over the area of a window centered at the grid. The region that has higher densities will be chosen and a local search is applied to search for a minimum cost solution. When the temperature is high, we allow regions with small densities to be chosen. The purpose is to let the algorithm probe at different places in the solution space in higher temperature to avoid being trapped in local minima. As the temperature gets lower, we gradually raise the threshold and only target high density regions. This is assuming that we have reached a ridge in the solu- tion space, at this stage we have explored many sub-optimal regions, and the probability of getting a closer-to-optimal solution is high enough. The region size of the local search does not have to be fixed. Instead, it is adaptively increased when no better neighbor solution can be found.
4.3.3
Solution Updating and Cost Evaluating
When wires are permuted, it will be very inefficient if the cost of the whole layout is re-evaluated from scratch since only a small fraction of the layout is locally changed. We propose an incremental cost updating algorithm based on disjoint set data structure [44]. We also keep track of the current size and number of diagonal shapes in a template (component). Suppose the cost of the original layout is known and the connected component is already constructed. If we permute a wire, we have the following cases:
1. A contact on the wire conflicts with some other contacts and thus forms new template shapes. In this case, we can simply set the parent of the
! !
(a) New template shape
!
!
(b) Split template shapes
Figure 4.7: Incremental update of cost and template.
existing template shape as the contact on the wire.1 If there are multi- ple templates conflicts, they are merged as a single template. The cost can be updated in constant time. This is illustrated in Figure 4.7(a), the left contact on the wire being permuted conflicts with contacts from two separate templates. The two templates and the contact form a new template, which now has four templates and two new diagonal shapes. Thus, the delta cost is computed as
∆cost = (3 − 1)ws (∆size)
+ 2wp (∆diagonal)
2. A contact on the wire belongs to some template. Permuting the wire splits the template into several new templates. In this case, we need to compute these new templates by running breadth-first-search (BFS), starting from each contact that it is connecting to. Even though the worst case runtime is still linear to the size of contacts, in practice, each template shape should be small enough that the BFS only takes
1A disjoint set maintains a set of trees where every element is a tree node that has a
parent pointer. All the vertices in a tree are considered in the same set. The tree root is the representative of the corresponding set.
an insignificant amount of time. Figure 4.7(b) illustrates an example. When the wire is moved away, a template shape was split into two separate template shapes. The connected components and the template costs need to be re-computed via BFS. The delta cost is:
∆cost = (1 + 1 − 4)ws (∆size) + (1 − 3)wp (∆diagonal)
The above algorithm is summarized in Algorithm 2.
Algorithm 2 Update the solution and delta cost after wire permutation. 1: procedure IncrementalCost(w, t) . w: Wire. t: track 2: cost ← 0, s ← original track where w is at t
3: for all Contact c ∈ w do . Case 1
4: Ct ← list of contacts that conflict with c at t
5: for all Contact d ∈ Ct do
6: FindRoot(d) ← c . FindRoot is a routine of disjoint set 7: cost ← cost + wp . Increase peanut-shaped count
8: end for
9: S ← list of template shapes where contact in C belongs to 10: Tnew ← Merge S with c
11: cost ← cost + wc
12: Tsplit ← template where c belongs to at s . Case 2
13: cost ← cost − cost(Tsplit)
14: Cs ← list of conflict contact with c at s
15: for all Contact c ∈ Cs do
16: L ← BFS . Recompute connected component
17: FindRoot(L) ← c . Set the new root
18: cost ← cost + cost(L) . Recompute cost for the split template
19: end for
20: end for 21: return cost 22: end procedure