**5.1. Problem definition**

244 Simulated Annealing – Single and Multiple Objective Problems

near-optimal solution.

considered.

the *i*

**3. How to improve traditional simulated annealing** 

good configuration of past solutions at the beginning but to lose it at last.

There are at least two shortcomings which impact the search speed of traditional SA. (1) Inefficient global search: In order to assure a final convergence effectively, the moving methods with relatively small changes should be used, so the global search within a short runtime is quite limited. Even using higher temperature, it is still slow to explore the huge search space of layout problem. (2) Informational waste: It does not use the information of past experience, including past solutions and past moves. It is quite possible to get a very

First of all, to overcome the shortcoming of inefficient global search, a two-stage algorithm is considered as follows. The first stage is named rough search, and the second stage is named focusing search. The rough search tends to big changes, such as crossover from genetic algorithm, to improve global search ability, while the focusing search tends to small changes, such as exchange, move and rotation, to get final convergence and reach better

Secondly, to overcome the shortcoming of informational waste, a special crossover operator from genetic algorithm, which reuses the information of past solutions, is considered. Comparing with random operator, the crossover operator has a search direction, which is based on the configuration from past good solutions, by use a part of configuration of the current best to reduce the informational waste. Besides, a guide with the probabilities to select running method adaptively according to the short-term improving speed is also

In real implementation of 2-stage SA, the temperature scheduling of the second stage is same with that of the first stage using a geometric scheduling (*Tk+1 = qTk, 0<q<1*) with repeated inside loop (*p* times) as the equation (1). The only difference is the parameter setting. In the second stage, *T'i* (instead of *Ti* in the first stage) is the variable temperature at

*th* step in the second stage, *T'0* (instead of *T0*) is the initial temperature of the second stage, *p'* (instead of *p*) is the inside loop number of the second stage and *q'* (instead of *q*) the temperature coefficient of the second stage. The detailed temperature scheduling setting depends on the requirement of runtime. As a reference, two sets of the parameters are set separately as follows: *T0* = 100000, *Te* = 100, *p* = 1000, *q* = 0.98, *T'0* = 1000, *T'e* = 1, *p'* = 1000, *q'* = 0.98. For different benchmarks, the inside loop number can be increased from 1000 to 2000, 5000, etc. Also the temperature coefficient can be closer to 1, such as 0.99, 0.995, etc. The parameter setting with a given runtime is adjusted by selecting the initial temperature, the

By overcoming the mentioned shortcoming, we proposed a mixed simulated annealing (MSA) to speed up traditional simulated annealing (SA) and 2-stage SA. The basic idea is to improve the global search ability and to speed up the search process by a special crossover operator, which uses the information of past solutions. Just like SA and 2-stage SA, MSA is

final temperature, the temperature coefficient and the inside loop number.

**4. Mixed simulated annealing** 

Let us start with the formulation of 3D placement. Let *M =* {*m1*, *m2*, *...*, *mn*} denote the modules or blocks to be placed, where *n* is the number of modules. Each *mi*, where *1*≤*i*≤*n*, has height *hi*, length *li* and width *wi*. The packing volume is defined by the minimum bounding rectangular parallelepiped including all modules. For the placement, we need to optimize the interconnect networks. Let *N =* {*n1, n2, …, nl*} be the set of interconnect nets between modules, where *l* is total net number. Let *leni* denote the estimated wire length of each net *ni*, *1*≤*i*≤*l*. Let *Pi* denote the estimated dynamic power, i.e. the interconnect power of net *ni*. Let (*xi, yi, zi, rx-i, ry-i, rz-i*) be the location and rotation on 3D orthogonal coordinate system for each module *mi*, *1*≤*i*≤*k*, where (*xi, yi, zi*) means the coordinates of the below-rearleft corner of module *mi*, and (*rx-i, ry-i, rz-i*) denotes the rotation (0, 1) of *mi* on yz-, zx- and xyplane. *rz-i* =1 is the normal state of modules, while *rz-i* =0 is rotated by 90 degree.

In short, The input is a set of modules *M =* {*m1, m2,...*} with height, length and width {(*h1, l1, w1*)*,* (*h2, l2, w2*)*,...*} and a net list *N =* {*n1, n2,* ...}. The constraint is no overlap between *mi* and *mj*, where *i*≠*j*. The output is a set of location and rotation for each module {(*x1, y1, z1, rx-1, ry-1, rz-1*)*,*  (*x2, y2, z2, rx-2, ry-2, rz-2*)*,...*} such that: (1) Minimize the power consumption; (2) Minimize the maximal delay; (3) Minimize the volume of bounding box.

The 3D-packing problem is a special case of 3D placement with no consideration of power and delay. The 2D placement problem is regarded as a special case of 3D placement with z=0, as shown in Figure 3. The 2D-packing problem is a special case of 3D packing with z=0. All of the mentioned three problems are formulated so far.

A Simulated Annealing Based Approach to Integrated Circuit Layout Design 247

**Figure 4.** Coding-decoding transition method to get Γ+ (*m3*,*m2*,*m4*,*m1*,*m5*) using the West-South and East-

**Figure 5.** Coding-decoding transition method to get Γ- (*m1*,*m2*, *m5*,*m3*,*m4*) using the West-North and East-

without any intersection. As shown in Figure 5, we can get (*m1*,*m2*, *m5*,*m3*,*m4*) as Γ- using the same method to get Γ+. The negative sequence Γ- is changed from the West-South corner to the East-North corner, i.e. from 0 to *n*-1 in Γ-. So far, we get the coding of a general 2Dpacking topology based on North-South and West-East relation corresponding to the order

North corners of module to connect with those corners of layout

South corners of module to connect with those corners of layout

of modules in sequence pair, as shown in Figure 6.

**Figure 3.** 2D placement as a special case of 3D placement

## **5.2. Problem representation**

The original packing or placement is with infinite solution space. The coding and decoding method is generally needed to connect the problem and its representation. The solution space of a good representation should be finite. And the solutions after a good representation should be feasible and be better to include at least one optimal solution. Sequence quintuple can be used to represent a general 3D-packing topology, but the solution space of sequence quintuple is quite large. Furthermore, sequence quintuple representation is simplified to sequence triple representation, which can be decoded to a relatively simple 3D topology. In the case of 2D-packing topology, sequence pair, which can be simplified from sequence triple, is used to represent a general 2D packing in this research. As an example, the coding from Figure 3 to Figure 6 can be gotten by using the coding-decoding transition method in Figure 4 and Figure 5, which are based on North-South and West-East relation corresponding to the order of modules in sequence pair as follows.

In order to get a positive sequence Γ+, each West-South corner of module connects to the West-South corner of the whole layout, and each East-North corner of module connects to the East-North corner of the whole layout without any intersection as shown in Figure 4. We can get a sequence (*m3*,*m2*,*m4*,*m1*,*m5*) corresponding to (0,1,2,3,4) from left side (i.e. two red points in Figure 4) to right side (i.e. two blue points in Figure 4). The positive sequence Γ+ is changed from the West-North corner to the East-South corner, i.e. from 0 to *n*-1 in Γ+, where *n* is the total number of modules. By using this coding method, we can get the whole sequence Γ+ as shown in Figure 5, which is Γ+ (*m3*,*m2*,*m4*,*m1*,*m5*). Similarly, in order to get Γ-, each West-North corner of module connects to the West-North corner of the whole layout, and each East-South corner of module connects to the East-South corner of the whole layout

**Figure 3.** 2D placement as a special case of 3D placement

The original packing or placement is with infinite solution space. The coding and decoding method is generally needed to connect the problem and its representation. The solution space of a good representation should be finite. And the solutions after a good representation should be feasible and be better to include at least one optimal solution. Sequence quintuple can be used to represent a general 3D-packing topology, but the solution space of sequence quintuple is quite large. Furthermore, sequence quintuple representation is simplified to sequence triple representation, which can be decoded to a relatively simple 3D topology. In the case of 2D-packing topology, sequence pair, which can be simplified from sequence triple, is used to represent a general 2D packing in this research. As an example, the coding from Figure 3 to Figure 6 can be gotten by using the coding-decoding transition method in Figure 4 and Figure 5, which are based on North-South and West-East relation corresponding to the order of modules in sequence pair as

In order to get a positive sequence Γ+, each West-South corner of module connects to the West-South corner of the whole layout, and each East-North corner of module connects to the East-North corner of the whole layout without any intersection as shown in Figure 4. We can get a sequence (*m3*,*m2*,*m4*,*m1*,*m5*) corresponding to (0,1,2,3,4) from left side (i.e. two red points in Figure 4) to right side (i.e. two blue points in Figure 4). The positive sequence Γ+ is changed from the West-North corner to the East-South corner, i.e. from 0 to *n*-1 in Γ+, where *n* is the total number of modules. By using this coding method, we can get the whole sequence Γ+ as shown in Figure 5, which is Γ+ (*m3*,*m2*,*m4*,*m1*,*m5*). Similarly, in order to get Γ-, each West-North corner of module connects to the West-North corner of the whole layout, and each East-South corner of module connects to the East-South corner of the whole layout

**5.2. Problem representation** 

follows.

**Figure 4.** Coding-decoding transition method to get Γ+ (*m3*,*m2*,*m4*,*m1*,*m5*) using the West-South and East-North corners of module to connect with those corners of layout

**Figure 5.** Coding-decoding transition method to get Γ- (*m1*,*m2*, *m5*,*m3*,*m4*) using the West-North and East-South corners of module to connect with those corners of layout

without any intersection. As shown in Figure 5, we can get (*m1*,*m2*, *m5*,*m3*,*m4*) as Γ- using the same method to get Γ+. The negative sequence Γ- is changed from the West-South corner to the East-North corner, i.e. from 0 to *n*-1 in Γ-. So far, we get the coding of a general 2Dpacking topology based on North-South and West-East relation corresponding to the order of modules in sequence pair, as shown in Figure 6.

A Simulated Annealing Based Approach to Integrated Circuit Layout Design 249

**Figure 7.** A 3D-packing topology decoded from sequence quintuple

is not fixed, then the solution space will increase to (*n!*)*22n*.

is not fixed, then the solution space will increase to (*n!*)*323n*.

might not be covered by sequence triple.

of modules. sequence triple defines (*mi* W *mj*) when

It defines (*mi* N *mj*) when

It defines (*mi* T *mj*) when

For a given packing with *n* modules, the solution space is (*n!*)*2*. If the rotation of the module

In case of sequence triple, it consists of three independent sequences *Γ i,* where 1≤*i*≤3. The coding and the decoding are based on TB-, NS- and WE- relation corresponding to the order

*F2*(*mi*) > *F2*(*mj*) and *F3*(*mi*) < *F3*(*mj*).

*F1*(*mi*) < *F1*(*mj*), *F2*(*mi*) < *F2*(*mj*) and *F3*(*mi*) < *F3*(*mj*)

*F1*(*mi*) < *F1*(*mj*), *F2*(*mi*) > *F2*(*mj*) and *F3*(*mi*) >*F3*(*mj*) For a given packing with *n* modules, the solution space is (*n!*)*3*. If the rotation of the module

However, sequence triple does not cover all kinds of topology of 3D packing. As shown in Figure 7, (*m4* N *m1*) and (*m1* N *m6*) lead to (*m4* N *m6*). At the same time, (*m6* W *m2*) and (*m2* W *m4*) lead to (*m4* W *m6*). The pair (*m4*, *m6*) is conflicting with the rule of uniqueness, i.e. each pair of modules should be assigned with a unique topology. That means the packing can not be represented by sequence triple. As a result, the topology with the minimum volume

**Figure 6.** Intuitive image using slant grid (0,1,2,3,4) for *Γ+* and *Γ* to explain the relation between solution representation and 2D-packing topology

Generally, a 3D-packing topology is defined by the orthogonal coordinate system (*x, y, z*) in sequence triple and sequence quintuple representations. It is regarded as a set of the relations of relative location between boxes, i.e. "Top-Bottom", "North-South" and "West-East" (TB-, NS- and WE-) relations. Let (*mi* T *mj*) denote that *mi* is on the top of *mj*. Similarly, (*mi* N *mj*) and (*mi* W *mj*) denote NS- and WE-relations. The rule of symmetry to be followed is that (*mi* T *mj*) is the same relation as (*mj* B *mi*). That is to say, the topology should be reversely decoded if the order of labeling is reversed.

We define the notation of sequence pair, sequence triple and sequence quintuple as follows. Let (*Γ i*[0], *Γ<sup>i</sup>* [1], ..., *Γ<sup>i</sup>* [*n*-1]) be the components of *Γ i*. Let *Fi* (*mj*) be the order of *mj* in sequences *Γ i*. For example, if *Γ i*[*l*] is *mj*, then *Fi* (*mj*) *= l*. So the order of *mj* can be represented by (*F1*(*mj*), *F2*(*mj*), ...). In general, let *A+B* be the sequence which is the concatenation of *A* and *B*, and *A-B* be the sequence obtained from *A* by removing all the elements in *B*, where *A* and *B* are sequences. Let us denote *A*[*i*, *j*], where *i*<*j*, as the sequence (*A*[*i*], *A*[*i*+1], ..., *A*[*j*]), where *A* = (*A*[0], *A*[1], ..., *A*[*n*-1]).

In case of sequence pair, the two sequences generate a finite solution space which includes at least one optimal solution of 2D packing for area optimization by decoding. Sequence pair defines (*mi* W *mj*) when

$$F^1(m) \le F^1(m) \text{ and } F^2(m) \le F^2(m)$$

It defines (*mi* N *mj*) when

$$F^1(m) \le F^1(m) \text{ and } F^2(m) \ge F^2(m)$$

**Figure 7.** A 3D-packing topology decoded from sequence quintuple

For a given packing with *n* modules, the solution space is (*n!*)*2*. If the rotation of the module is not fixed, then the solution space will increase to (*n!*)*22n*.

In case of sequence triple, it consists of three independent sequences *Γ i,* where 1≤*i*≤3. The coding and the decoding are based on TB-, NS- and WE- relation corresponding to the order of modules. sequence triple defines (*mi* W *mj*) when

$$F^2(m) \ge F^2(m) \text{ and } F^3(m) \le F^3(m).$$

It defines (*mi* N *mj*) when

248 Simulated Annealing – Single and Multiple Objective Problems

**Figure 6.** Intuitive image using slant grid (0,1,2,3,4) for *Γ+* and *Γ-*

reversely decoded if the order of labeling is reversed.

Let (*Γ i*[0], *Γ<sup>i</sup>*

[1], ..., *Γ<sup>i</sup>*

(*A*[0], *A*[1], ..., *A*[*n*-1]).

defines (*mi* W *mj*) when

It defines (*mi* N *mj*) when

*Γ i*. For example, if *Γ i*[*l*] is *mj*, then *Fi*

Generally, a 3D-packing topology is defined by the orthogonal coordinate system (*x, y, z*) in sequence triple and sequence quintuple representations. It is regarded as a set of the relations of relative location between boxes, i.e. "Top-Bottom", "North-South" and "West-East" (TB-, NS- and WE-) relations. Let (*mi* T *mj*) denote that *mi* is on the top of *mj*. Similarly, (*mi* N *mj*) and (*mi* W *mj*) denote NS- and WE-relations. The rule of symmetry to be followed is that (*mi* T *mj*) is the same relation as (*mj* B *mi*). That is to say, the topology should be

We define the notation of sequence pair, sequence triple and sequence quintuple as follows.

*F2*(*mj*), ...). In general, let *A+B* be the sequence which is the concatenation of *A* and *B*, and *A-B* be the sequence obtained from *A* by removing all the elements in *B*, where *A* and *B* are sequences. Let us denote *A*[*i*, *j*], where *i*<*j*, as the sequence (*A*[*i*], *A*[*i*+1], ..., *A*[*j*]), where *A* =

In case of sequence pair, the two sequences generate a finite solution space which includes at least one optimal solution of 2D packing for area optimization by decoding. Sequence pair

*F1*(*mi*) < *F1*(*mj*) and *F2*(*mi*) < *F2*(*mj*)

*F1*(*mi*) < *F1*(*mj*) and *F2*(*mi*) > *F2*(*mj*)

[*n*-1]) be the components of *Γ i*. Let *Fi*

solution representation and 2D-packing topology

to explain the relation between

(*mj*) be the order of *mj* in sequences

(*mj*) *= l*. So the order of *mj* can be represented by (*F1*(*mj*),

$$\begin{aligned} F^1(mi) &\le F^1(m)\_\prime \; F^2(mi) \le F^2(m)\_\prime\\ &\text{and } F^3(mi) \le F^3(m)\_\prime \end{aligned}$$

It defines (*mi* T *mj*) when

$$F^1(mi) \le F^1(m) \wr F^2(mi) \ge F^2(m)$$
 
$$\text{and } F^3(mi) \ge F^3(m)$$

For a given packing with *n* modules, the solution space is (*n!*)*3*. If the rotation of the module is not fixed, then the solution space will increase to (*n!*)*323n*.

However, sequence triple does not cover all kinds of topology of 3D packing. As shown in Figure 7, (*m4* N *m1*) and (*m1* N *m6*) lead to (*m4* N *m6*). At the same time, (*m6* W *m2*) and (*m2* W *m4*) lead to (*m4* W *m6*). The pair (*m4*, *m6*) is conflicting with the rule of uniqueness, i.e. each pair of modules should be assigned with a unique topology. That means the packing can not be represented by sequence triple. As a result, the topology with the minimum volume might not be covered by sequence triple.

In case of sequence quintuple, it consists of five sequences *Γ i,* where 1≤*i*≤5. Sequence quintuple generates a finite solution space which includes at least one optimal solution of 3D packing for volume optimization by decoding. sequence quintuple defines (*mi* W *mj*) when

A Simulated Annealing Based Approach to Integrated Circuit Layout Design 251

In detail, the rotation changes the orientation of a module. When a rotation is applied to module *mi*, *ri* is changed to 1 *- ri*. As an example shown in Figure 8, if a rotation is applied to module *m4*, *r4* is changed to 1 –*r4*. With respect to 3D packing, *ri* is randomly selected from *rx-*

**Figure 9.** An example of layout before and after "exchange" in focusing search

**Figure 10.** An example of layout before and after "move" in focusing search

corresponds to all sequences, i.e. the sequence pair (*Γ+, Γ-*

The exchange moving method exchanges the order of two modules in *Γ<sup>i</sup>*

the sequence quintuple (*Γ1, Γ2, Γ3, Γ4*, *Γ5*). When an exchange is applied to module *mi* and *mj* with sequence triple representation, *F1*(*mi*) , *F2*(*mi*), *F3*(*mi*), *F1*(*mj*), *F2*(*mj*) and *F3*(*mj*) are changed to *F1*(*mj*) , *F2*(*mj*), *F3*(*mj*), *F1*(*mi*), *F2*(*mi*)and *F3*(*mi*), respectively. In the case of sequence pair, *F+*(*mi*), *F-*(*mi*), *F+*(*mj*), and *F-*(*mj*) are changed to *F+*(*mj*), *F-*(*mj*), *F+*(*mi*), and *F-*(*mi*),

, where *Γ<sup>i</sup>*

), the sequence triple (*Γ1, Γ2, Γ3*) or

*i, ry-i,* and *rz-i*.

$$F^1(m) \le F^1(m) \text{ and } F^2(m) \le F^2(m)$$

It defines (*mi* N *mj*) when

$$F^{\diamond}(m) \le F^{\diamond}(m) \text{ and } F^{\Downarrow}(m) \le F^{\Downarrow}(m)$$

It defines (*mi* T *mj*) when

F5(mi) < F5(mj)

where *mi* and *mj* is overlapping in the projected xy-plane after WE- and NS- decoding. For a given packing with *n* modules, the solution space is (*n!*)*5*. If the rotation of the module is not fixed, then the solution space will increase to (*n!*)*523n*.
