**3.2. Local relocation using MFA technique**

10 Simulated Annealing – Single and Multiple Objective Problems

columns if the row spin vector of *ith* cell is ���

*perimeter* method or *Half Perimeter Wire Length* (*HPWL*) method*.* 

of being *ith* and *jth* cells in same location. The total energy function��, is:

*3.1.2. Half Perimeter Wire Length (HPWL) method* 

*3.1.1. Energy function formulation* 

as Fig. 2.

considered.

cells be CL, the number of spins that encode the configuration of problem is *CL (P × Q)* dimensional Potts spins so there would be a total of |CL|*×*P*×*Q two-state variables. To decreasing the number of spins that encode the configuration of problem, they are separated to two types: row and column spins. Therefore there would be *P* row spins and *Q* column spins and totally |CL|*×* (*P+Q*) spins[14].For example for a circuit space with 2 rows and 3

�0,0,1� that means this cell is located at second row and third column of configuration space

Energy function in the MFA algorithm corresponds to formulation of the cost function of the cell placement problem in terms of spins. Since the MFA algorithm iterates on the expected values of the spins, the expected value of the energy function is formulated. The gradient of the expected value of the energy function is used in the MFA algorithm to compute the new values to update spin vectors in order to minimize the energy function. The applied cost energy for this problem is routing cost energy that is calculated approximately. It is not feasible to calculate the exact routing length for two reasons. Firstly, a feasible placement is not available during the execution of some algorithms; secondly, the computation of the exact routing cost necessitates the execution of the global and the detailed routing phases which are as hard as the placement phase. Commonly used approximations are the *semi-*

Using the expected values of spins, the probability of existence of one or more cells of *nth*  net in *pth* row and *qth* column is calculated and applying *HPWL* method routing length cost is obtained. Different weights for row and column routing length costs could be

If the routing cost is used as the only factor in the cost function, the optimum solution is mapping all cells of the circuit to one location in the layout. This placement will reduce the routing cost to zero but obviously it is not feasible. Hence, a term in the energy function is needed which will penalize the placements that put more than one cell to the same location. This term is called the overlap cost. This term is calculated by multiplying the probabilities

where ����, ���� and �� are vertical routing cost, horizontal routing cost and overlap cost respectively.The parameter � is balance factor between routing and overlap cost functions.

A very simple and widely used cost function parameter is the interconnect wire length of a placement solution; this can be easily approximated using the bounding box method. This wire length estimation method draws a bounding box around all ports in a given net, half

�� =����� ������ � ��� � ��� (13)

� = �0,1� and its column spin vector is ���

� =

Our method executes local relocation on a model placement where an additional module is added to it for modification with minimum number of displacement. The model placement is a given placement of the circuit that needs modification. MFA based method resolves the problem in less time and hardware in compare to SA-based method. In addition, the runtime of solution is mostly independent of size and complexity of input model placement. Our proposed MFA algorithm is optimized by adding the ability of rotation of modules inside an energy function called *permissible distances preservation energy* that will be defined at section 3.2.6. This in turn allows more options in moving the engaged modules. Finally, a three-phase cooling process governs convergence of problem variables called neurons or spins.

The relocation problem is formulated as follows:

**Input**: A model placement including a set of modules and a net list or hypergraph representation of circuit, the additional module with its coordinates and the incident nets.

**Output**: Local relocated placement

**Objective**: Fast relocation with minimum number of displacements and more similarity

**Constraint**: No overlap between modules and preservation of permissible distances

There are four classified approaches to the problem of inserting an extra module into a model placement.


Our approach matched the fourth approach above. The MFA relocation algorithm removes overlaps by moving or rotating modules. Note that all of the movements and rotations must observe some permissible distances that will be explained in the following sections. Feasibility of problem depends on topology of placement and similarity. It is clear that

selecting a big part of model placement as the relocation range may cause a feasible solution but causes more unsimilarity.

Mean Field Annealing Based Techniques for Resolving VLSI Automatic Design Problems 13

Dashed square is the relocation range and black module is the additional module. Modules marked as "o" are outer modules and those marked as "i" are inner modules. In our method we have used MFA with discrete variable for relocation, so the problem's configuration must encode to discrete space. As a result, the width and height of relocation range are divided into equal spans that form some columns and rows respectively. The rows and columns that are occupied with modules are marked. The outer modules are then separated into four sets: up boundary modules, down boundary modules, left boundary modules and

**Figure 3.** a) Relocation range and it sunder lying modules. b) Local relocated placement using MFA

For each row or column, two modules are determined as its boundary module. *Permissible distance* of every row or column is obtained with calculating distance between left boundary module and right boundary module of that row or distance between up boundary module and down boundary module of that column respectively. Fig. 4.a shows coordinates of a module. Left-down corner and right-top corners of a module are considerable here. Right-

For each row or column, two modules are determined as its boundary modules. Fig. 4.b

In Fig. 4.b row and column permissible distances are computed using Eq. 15 considering coordinates of the boundary modules of that row or column. Subscribe "*o*" Refers to outer

represents boundary modules of the relocation range shown in Fig. 3.

modules, ����and ����represent *ith* row's *jth* column's permissible distances.

��� � �� + �� � �ℎ� � �� + ℎ� (14)

right boundary modules.

*3.2.3. Calculating permissible distances* 

top corner coordinate of module "i" is obtained.
