*3.2.2. Calculation of permissible distances and construction of MFA vectors*

The first stage of local relocation algorithm has to extract information of hypergraph representation of selected part of model placement as inputs of second stage, such as P, Q and sets C and N and MFA input vectors. The selected part of model placement is called the local *relocation range* and must has enough free space or dead space for inserting an extra module.

Selecting size and position of relocation rang depends on size of additional module and desirable similarity between model placement and relocated placement. It is clear that selecting bigger part of a model placement as a relocation range may cause more unsimilarity. So, this algorithm seeks around additional module in different directions considering relocation range limitation to find desirable range.

After relocation range determination, its underlying modules are classified into two groups:

First group includes modules that are completely inside the relocation range and are *movable modules*. Second group consists of modules that just overlap with relocation range and must have fixed position during relocation because they form a frame around movable modules and are *fixed modules*.

Actually if we assume the model placement as a puzzle, this frame is just a piece of it. It's clear that after local relocation, this piece must fit on its location again so any movement or rotation from inside modules must preserve vertical and horizontal distances between outer ones. Fig. 3.a shows the relocation range and its underlying modules on the model placement. Fig. 3.b shows local relocated placement of Fig. 3.a.

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 right boundary modules.

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

### *3.2.3. Calculating permissible distances*

12 Simulated Annealing – Single and Multiple Objective Problems

The proposed relocation algorithm consists of two stages:

relocation range around additional module.

distances are defined at the following sections.

but causes more unsimilarity.

*3.2.1. Local relocation algorithm* 

ii. Local Relocation with MFA

module.

groups:

and are *fixed modules*.

selecting a big part of model placement as the relocation range may cause a feasible solution

i. Construction of MFA vectors and calculation of permissible distances from a proper

At first stage, given the model placement and an additional module with its coordinates, the small area around the additional module is scanned to find proper range that has enough free space as the *local relocation range,* then necessary information that will be used at the second stage are extracted. At second stage, MFA algorithm starts to move or rotate some modules (movable modules) considering critical distances criteria using information of first stage. All of the seconcepts like movable modules, permissible distances and critical

The first stage of local relocation algorithm has to extract information of hypergraph representation of selected part of model placement as inputs of second stage, such as P, Q and sets C and N and MFA input vectors. The selected part of model placement is called the local *relocation range* and must has enough free space or dead space for inserting an extra

Selecting size and position of relocation rang depends on size of additional module and desirable similarity between model placement and relocated placement. It is clear that selecting bigger part of a model placement as a relocation range may cause more unsimilarity. So, this algorithm seeks around additional module in different directions

After relocation range determination, its underlying modules are classified into two

First group includes modules that are completely inside the relocation range and are *movable modules*. Second group consists of modules that just overlap with relocation range and must have fixed position during relocation because they form a frame around movable modules

Actually if we assume the model placement as a puzzle, this frame is just a piece of it. It's clear that after local relocation, this piece must fit on its location again so any movement or rotation from inside modules must preserve vertical and horizontal distances between outer ones. Fig. 3.a shows the relocation range and its underlying modules on the model

*3.2.2. Calculation of permissible distances and construction of MFA vectors* 

considering relocation range limitation to find desirable range.

placement. Fig. 3.b shows local relocated placement of Fig. 3.a.

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. Righttop corner coordinate of module "i" is obtained.

$$
\pi \varkappa \varkappa\_l = \varkappa\_l + \;\varkappa\_l \; , \; \jmath h\_l = \; \jmath\_l + \; h\_l \tag{14}
$$

For each row or column, two modules are determined as its boundary modules. Fig. 4.b represents boundary modules of the relocation range shown in Fig. 3.

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 modules, ����and ����represent *ith* row's *jth* column's permissible distances.

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

� = �0 ... 1 ... 0�

�� = �(max(���) − ���)� + (max(���) − ���)� (17)

To construct precision vertical and horizontal vectors we used a pseudo-trigonometric method. Module position is determined using its left-down corner distance with left-down corner of relocation range with coordinate as(���, ���).Fig. 5 shows the relocation range of Fig. 3 and its incident inner modules that are darker one. We used a special value to normalize these distances. This value is Euclidean distance between left-down corner of relocation range and a point with coordinate of inner modules maximum "x" and maximum

1: i-1 i i+1: P 1: j-1 j j+1: Q

**Figure 5.** Relocation range and its inner modules for construction of MFA initial average spin vectors

��� <sup>=</sup> ��� ���

��ri��ntal range = ����(���)� ���

Vertical range = (

Then for calculating row vector of a module, its vertical distance with left-down corner of relocation range is obtained and then normalized as Eq. 18. Same calculation is done for

Eq. 19 represents normalized total horizontal and vertical ranges. Horizontal range is divided into *P* parts and vertical range into *Q* parts. The algorithm then determines position

> min(y��) − y�� Sd ,

of modules based on their ���and ���values in comparison to *P* and *Q* obtained spans.

�� , ��� <sup>=</sup> ��� ���

�� , ���(���)� ���

max(y��) − y�� Sd )

�� (18)

�� � , (19)

"y" as:

��

� = �0 ... 1 ... 0� , ��

column vector.

(16)

**Figure 4.** a) Coordinates of a module b) Boundary modules

In main algorithm sum of widths or heights of modules that are located in the same row or column are calculated and results are not permitted to exceed permissible distance of that row or column. For decreasing number of variables and calculations, outer modules that must have fixed position are laid aside and just inner modules that are movable enter MFA algorithm. In addition extra module as an overlap maker module enters the algorithm but it stays on its location during algorithm. Some of outer modules that advance inside the inner modules area could enter MFA algorithm to prevent some undesirable locating.
