*3.2.6. Energy functions*

MFA Algorithm moves modules to minimize a total energy function. Our MFA relocation algorithm's total energy function is summation of three energy functions. First of all is routing cost function or wire length energy that is sum of vertical and horizontal routing costs and the algorithm minimizes it. Second one is the overlap cost and avoids algorithm to locate more than one module in same location. In MFA probability of being a module in row "*i*" and column "*j*" in the same location is computed for all of the modules. The energy term is formulated corresponding to the overlap cost as Eq. 7 in cell-placement problem [14]. In Eq. 20, ��and�� are constant values as the weights of modules "*i*" and "*j*" and are given from a module weight function that is used to encode the areas of modules. These values are some of input values of the algorithm and�� for module "*i*" is related to its area. ��� � is the probability of finding module "*i*" in one of the *Q* locations at row "*p*", ݒ and is the probability of finding module "*i*" in one of the *P* locations at column "*q*", respectively.

Last energy function that supervises preserving permissible distances is *permissible distances preservation energy* or ܧௗ. When a selected module moves to a location, the summation of widths and heights of the modules that are in the same column or row are calculated and are compared to permissible distance of that row and column. If these values exceed the permissible distances first the selected module is rotated and the summation and comparison is done again. If the problem still exists the value of ܧௗand total energy increases respectively. In Eq. 21, ܧ௧, ܧ௪ andܧ are total energy function, routing cost or wire length energy function and overlap energy function, respectively. α and β are balance factors between ܧ௪ , ܧ and ܧௗ .α and β are constant during simulation and are used to increase or decrease importance of every energy functions in total energy function related to others.

**Figure 7.** The energy function minimization: ܧ௧ǡ ܧ௪ǡ ܧand ܧௗ

16 Simulated Annealing – Single and Multiple Objective Problems

first stage of MFA local relocation algorithm.

**Figure 6.** The flowchart of first stage of Local relocation

*3.2.5. MFA relocation algorithm* 

select list because it has converged.

*3.2.6. Energy functions* 

its area. ���

being in the *jth* horizontal span causes the *jth* element of ��

For module *"m"*, being in the *ith* vertical span causes the *ith* element of ��

that means probability of finding module *"m"* at row "*i*" and column "*j*" is 1. ��and�� are initial average spin vectors as two inputs of MFA algorithm. Fig. 6 shows the flowchart of

**Relocation range**

**Underlying modules grouping**

**Inner modules Outer modules** 

**MFA Relocation Algorithm**

**MFA initial average values of spin vectors calculation Permissible distances calculation** 

**Model placement Additional module**

At every epoch of MFA Algorithm one of the movable modules is selected randomly for mean field vector calculation from a random select list that includes movable modules with unconverged average spin vectors, and then selected module's average spin vector are updated using this vector. At the end of every epoch spin of every average vector that is greater than "0.9" is set to 1 and others are set to 0 and this vector is deleted from random

MFA Algorithm moves modules to minimize a total energy function. Our MFA relocation algorithm's total energy function is summation of three energy functions. First of all is routing cost function or wire length energy that is sum of vertical and horizontal routing costs and the algorithm minimizes it. Second one is the overlap cost and avoids algorithm to locate more than one module in same location. In MFA probability of being a module in row "*i*" and column "*j*" in the same location is computed for all of the modules. The energy term is formulated corresponding to the overlap cost as Eq. 7 in cell-placement problem [14]. In Eq. 20, ��and�� are constant values as the weights of modules "*i*" and "*j*" and are given from a module weight function that is used to encode the areas of modules. These values are some of input values of the algorithm and�� for module "*i*" is related to

� is the probability of finding module "*i*" in one of the *Q* locations at row "*p*",

� to become 1 and

� to be equal to 1. In MFA space

$$\begin{array}{rcl} \mathbf{E}\_{o} &=& \frac{1}{2} \sum\_{\mathbf{i}} \sum\_{\mathbf{j} \neq \mathbf{i}} \boldsymbol{\omega}\_{1} \boldsymbol{\omega}\_{1} \cdot \frac{\mathbf{r}}{\mathbf{j}} \mathbf{k} \text{[Modules i and j are in the same location]} = \\ & \frac{1}{2} \sum\_{\mathbf{i}} \sum\_{\mathbf{j} \neq \mathbf{i}} \boldsymbol{\omega}\_{1} \boldsymbol{\omega}\_{1} \frac{\mathbf{p}}{\mathbf{p} - \mathbf{1} \mathbf{q} - \mathbf{1}} \sum\_{\mathbf{p} = \mathbf{1} \mathbf{q} - \mathbf{1}}^{\mathbf{p}} \mathbf{k} \text{[Module i is in location } \mathbf{p} \mathbf{q}] \times \mathbf{P} \text{[Module j is in location } \mathbf{p} \mathbf{q}] \\ & = \frac{1}{2} \sum\_{\mathbf{i}} \sum\_{\mathbf{j} \neq \mathbf{i}} \boldsymbol{\omega}\_{1} \boldsymbol{\omega}\_{1} \frac{\mathbf{p}}{\mathbf{p} - \mathbf{1} \mathbf{q} - \mathbf{1}} \sum\_{\mathbf{i}}^{\mathbf{c}} \mathbf{v}\_{1}^{\mathbf{c}} \mathbf{v}\_{1}^{\mathbf{c}} \mathbf{v}\_{1}^{\mathbf{c}} \mathbf{v}\_{1}^{\mathbf{c}} \\ & & \qquad \qquad \qquad \qquad \qquad \boldsymbol{E}\_{t} = E\_{w} + \boldsymbol{a} \times E\_{o} + \boldsymbol{\beta} \times E\_{pd} \end{array}$$

Fig. 7 shows energy function and its parameters, wire length cost, overlap energy and permissible distances preservation energy. At the final epoch, where all of the spins

$$if \left(0.8 \times T\_{r0} \le T\_r \& 0.8 \times T\_{c0} \le T\_c\right); T\_r = 0.95 \times T\_r \; ; \; T\_c = 0.95 \times T\_c$$

$$elseif \left(0.35 \times T\_{r0} \le T\_r \le 0.8 \times T\_{r0} \& 0.35 \times T\_{c0} \le T\_c \le 0.8 \times T\_{c0}\right);$$

$$T\_r = 0.8 \times T\_r \; ; \; T\_c = 0.8 \times T\_c$$

$$elseif \left(0.35 \times T\_{r.} \; > T \; \& 0.35 \times T\_{r.} \; > T\right) \; ; T = 0.65 \times T \; ; \; T = 0.65 \times T \tag{72}$$

$$T\_{r0} \propto t\_f \times P, T\_{c0} \propto t\_f \times Q \tag{23}$$
