**1.2. Hopfield Neural Network (HNN)**

The Hopfield Network is a fully connected network of simple processing units, Vi , with numerically weighted symmetric connections, Tij, between units Vi and Vj. processing units have states (either discrete in {0, 1}, or continuous in [0, 1] depending on whether the discrete or the continuous version of the network is being considered). Each processing unit performs simple and identical computations which generally involve summing weighted inputs to unit, applying an internal transfer function, and changing state if necessary. The power of the Hopfield model lies in the connections between units and the weights of these connections [16]. An Energy function was defined by Hopfield on the states of the network (values of all units). The energy function, *E*, in its simplest form is:

$$E = -\frac{1}{2} \Sigma\_{l=1}^{N} \Sigma\_{l=1}^{N} T\_{lj} V\_{l} V\_{l} + \Sigma\_{l=1}^{N} V\_{l} I\_{l} \tag{1}$$

Where�� denotes the current state (value) of the *ith* neuron and �� denotes its bias. Hopfield utilized the fact that the ���� <sup>→</sup> ) is a *Liapunov* function (bounded from below) to show that, from any starting state, the network would always converge to some energy function minimum upon applying a sequence of asynchronous local state updates (that locally reduce energy).

To solve any particular problem, first a decision must be made on how to set the network parameters *T* and *I*, so that minimization of the problem objective function and enforces satisfaction of the problem constraints; this process is termed 'mapping' the problem onto the network. Hopfield gives the motion equation of the *ith* neuron:

$$\frac{d\mathcal{U}\_l}{dt} = \frac{\mathcal{U}\_l}{\mathfrak{r}} - \frac{\partial E(\overleftarrow{\mathcal{V}\_l})}{\partial \mathcal{V}\_l}, \mathcal{U}\_l = \frac{\partial E\_H(\overleftarrow{\mathcal{V}\_l})}{\partial \mathcal{V}\_l} \tag{2}$$

Where *E* is energy function in term of �� and �� is *Hopfield term* of energy function. Totally Eq. 2.is motion (updating) equation of state of neurons and its output is ��.Usually a simple nondecreasing monatomic output function in term of �� like �(��) is applied torelate �� to the states. Typically this function is a step function or a hyperbolic tangent function. � is a constant number as the weighting factor of ��.Thereforea Hopfield Neural Network minimizes a cost function that is encoded with its weights by implementation of *gradient descent.* For more details see [16]

## **2. MFA technique**

4 Simulated Annealing – Single and Multiple Objective Problems

**Figure 1.** Molecules movement at the cooling process

stress and resistant to failure due to external shock.

**1.2. Hopfield Neural Network (HNN)** 

utilized the fact that the ����

reduce energy).

optimization algorithms to resolve various cases of problems.

(values of all units). The energy function, *E*, in its simplest form is:

� � � �

�

As the material is kept at a high temperature the molecules are able to move around quite freely thus reducing stress on a large scale, indeed if the material is made too hot it will move into the liquid state allowing free movement of the molecules. As the material is cooled the molecules are not able to move around as freely but still move limited distances reducing stress in regional areas. The result is a material with significantly less internal

High Temperature Movements Thermal Equilibrium

The statistic mechanic is a domain in physics that describes the process of slow cooling of *Hamiltonian Ising* for particles or spins with high degree of freedom until they accede on their equilibrium states. The particles that are cooling, on solid state, provide a framework to characteristics improvisation of intricate and large systems. Now this idea is stated inside

The Hopfield Network is a fully connected network of simple processing units, Vi , with numerically weighted symmetric connections, Tij, between units Vi and Vj. processing units have states (either discrete in {0, 1}, or continuous in [0, 1] depending on whether the discrete or the continuous version of the network is being considered). Each processing unit performs simple and identical computations which generally involve summing weighted inputs to unit, applying an internal transfer function, and changing state if necessary. The power of the Hopfield model lies in the connections between units and the weights of these connections [16]. An Energy function was defined by Hopfield on the states of the network

> � ∑ ∑ ������� <sup>+</sup> � ���

Where�� denotes the current state (value) of the *ith* neuron and �� denotes its bias. Hopfield

from any starting state, the network would always converge to some energy function minimum upon applying a sequence of asynchronous local state updates (that locally

To solve any particular problem, first a decision must be made on how to set the network parameters *T* and *I*, so that minimization of the problem objective function and enforces

��� ∑ ����

�

<sup>→</sup> ) is a *Liapunov* function (bounded from below) to show that,

��� (1)

As it mentioned before, MFA merges collective computation and annealing properties of Hopfield neural Networks and SA, respectively, to obtain a general algorithm for solving combinatorial optimization problems. MFA can be used for solving a combinatorial optimization problem by choosing a representation scheme in which the final states of the discrete variables (spins or neurons) can be decoded as a solution to the problem. In fact the space of problem is mapped to the space of MFA variables (spins) and there will be a one-toone relation between two spaces. This is called *encoding*. Then, an energy function is formulated in term of spins with a structure that is based on essence of problem whose global minimum value corresponds to an optimum solution of the problem. MFA is expected to compute the optimum solution to the target problem, starting from a randomly chosen initial state, by minimizing this energy function. Steps of applying MFA technique to a problem can be summarized as follows:


These main steps are same for various types of optimization problems and are explained at the following sections.

#### **2.1. Encoding**

The MFA algorithm is derived by analogy to *Ising* and *Potts* models which are used to estimate the state of a system of particles, called spins, in thermal equilibrium. In *Ising* model, spins can be in one of the two states represented by0 and 1, whereas in Potts model they can be in one of the K states and the configuration of the problem determines which one has to be used.

For *K*-state *Potts* model with nS spins, the states of spins are represented using nS Kdimensional vectors.

$$\mathbf{S} \le \{\mathbf{S}\boldsymbol{\omega}, \dots, \mathbf{S}\boldsymbol{\omega}, \dots, \text{S}\mathbf{x}\} \text{ for } 1 \le \mathbf{i} \le \mathbf{n} \tag{3}$$

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

�� = �� � � � �� (8)

(9)

for1 i *nC* , 1 *k K* (10)

��� = ����in � i� in ���i�i�n �� ��� 1 i n� , 1 k K(P{} is probability function) (7)

���is the probability of finding spin *i* at state *k*. If ��� =1, then spin *i* is in state *k* and the

Locating spin *i* at stat *k* relevant to type of target problem has some costs and actually energy function calculates these costs. Example given, for circuit partitioning problem, utilizing the interconnection cost and the wire-length cost for VLSI placement problem are common cost functions and are used to formulating energy function of these target

The interconnection cost is represented by *Ec* that for the circuit is total length of internal connections between circuit components or the cost of the connections among the circuit partitions. It is clear that if all of the circuit elements are located in one place and overlaps together, the interconnection cost (total wire length) becomes 0 and it is not acceptable. This is what we mean *illogical minimization* of interconnection cost energy function. So another term of the energy function must be applied for penalizing illogical minimization of first cost function. This term is represented by *Ep*. For example, this term is imbalanced partitioning for circuit partitioning problem and overlap between modules for VLSI

Where α parameter is introduced to maintain a balance between the two opposite terms of

Mean field theory equations, needed to minimize the total energy function *Et*, can be

��� = − ����� ����

The quantity ��� represents the *kth* element of the *mean field vector* effecting on spin *i*. Using

Where *T* is the temperature parameter which is used the relax the system iteratively and is

A teach iteration of algorithm, the mean field vector effecting on a randomly selected spin is computed. Then, spin average vector is updated. This process is repeated for a random sequence of spins until the system is stabilized for the current temperature. The system is

placement problem [13, 14].The total energy function, *Et*, is sum of both terms:

**2.3. Derivation of the mean field theory equations** 

the mean field values, average spin values, *vik*, can be updated.

managed with a cooling schedule program.

**2.4. Energy difference and cooling schedule** 

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

corresponding configuration is Vi = Si.

problems [12-14].

total energy function.

derived as follow:

Just one of the components of Si is 1 and the others are 0. That means *ith* spin must be at one of the K- states.

$$
\Sigma\_{k=1}^{K} \mathbf{S}\_{lk} = \mathbf{1} \; for \; \mathbf{1} \le \mathbf{i} \le \mathbf{n}\_{\mathcal{S}} \tag{4}
$$

For encoding of VLSI circuit design problem, for example, each spin vector corresponds to a cell in the circuit or a module in the placement. Hence, number of spin vectors is equal to the number of cells or modules; n*C*. Dimension *K* of the spin vectors is equal to the number of empty part of overall circuit space or empty spaces of the placement. That means we can divide the circuit space (chip area or die surface)to *K* parts and fill every part just by one and only one of the circuit elements [12, 13]. Therefore when a spin is assigned in *kth* state that means its corresponding cell or module (circuit element) is placed on *kth* space or part of circuit or placement.

#### **2.2. Energy function formulation**

In the MFA algorithm, the aim is to find the spin values minimizing the energy function of the system. In order to achieve this goal, the average (expected) value *Vi = <Si>* of each spin vector *Si* is computed and iteratively updated until the system stabilizes at some fixed point.

$$\text{VI} = <\text{S} \succneq \text{for } 1 \le \text{i} \le \text{nc} \text{ and } \text{VI} \nvdash [vu\_1 \dots \, vu\_{\ell} \, \dots \, vu\_{\ell} \, \dots \, vu] \text{ So:}$$

$$[vu, \dots, vu, \dots, vu] \text{= } [\lhd \rhd, \dots, \lhd \rhd, \dots, \lhd \lhd] \text{ for } 1 \le i \le n \tag{5}$$

*vik* is probability of finding spin *i* at state *k* and can take any real value between 0 and 1. When the system is stabilized, *vik* values are expected to converge to 0 or 1.As the system is a Potts glass we have the following constraint:

$$\sum\_{k=1}^{K} \upsilon\_{lk} = \mathbf{1} \; for \; \mathbf{1} \le \mathbf{i} \le \mathbf{n}\_{\mathcal{C}} \tag{6}$$

This constraint guarantees that each Potts spin *S*i is in one of the *K* states at a time, and each cell is assigned to only one position for encoded configuration of the problem. In order to construct an energy function it is helpful to associate the following meaning to the values ���, for example:

��� = ����in � i� in ���i�i�n �� ��� 1 i n� , 1 k K(P{} is probability function) (7)

���is the probability of finding spin *i* at state *k*. If ��� =1, then spin *i* is in state *k* and the corresponding configuration is Vi = Si.

Locating spin *i* at stat *k* relevant to type of target problem has some costs and actually energy function calculates these costs. Example given, for circuit partitioning problem, utilizing the interconnection cost and the wire-length cost for VLSI placement problem are common cost functions and are used to formulating energy function of these target problems [12-14].

The interconnection cost is represented by *Ec* that for the circuit is total length of internal connections between circuit components or the cost of the connections among the circuit partitions. It is clear that if all of the circuit elements are located in one place and overlaps together, the interconnection cost (total wire length) becomes 0 and it is not acceptable. This is what we mean *illogical minimization* of interconnection cost energy function. So another term of the energy function must be applied for penalizing illogical minimization of first cost function. This term is represented by *Ep*. For example, this term is imbalanced partitioning for circuit partitioning problem and overlap between modules for VLSI placement problem [13, 14].The total energy function, *Et*, is sum of both terms:

$$E\_t = E\_c + a \times E\_p \tag{8}$$

Where α parameter is introduced to maintain a balance between the two opposite terms of total energy function.

#### **2.3. Derivation of the mean field theory equations**

6 Simulated Annealing – Single and Multiple Objective Problems

The MFA algorithm is derived by analogy to *Ising* and *Potts* models which are used to estimate the state of a system of particles, called spins, in thermal equilibrium. In *Ising* model, spins can be in one of the two states represented by0 and 1, whereas in Potts model they can be in one of the K states and the configuration of the problem determines which

For *K*-state *Potts* model with nS spins, the states of spins are represented using nS K-

Si= [Si1,… ,Sik, … , SiK] for 1≤ i ≤ nS (3)

Just one of the components of Si is 1 and the others are 0. That means *ith* spin must be at one

∑ ��� � ������� i n�

For encoding of VLSI circuit design problem, for example, each spin vector corresponds to a cell in the circuit or a module in the placement. Hence, number of spin vectors is equal to the number of cells or modules; n*C*. Dimension *K* of the spin vectors is equal to the number of empty part of overall circuit space or empty spaces of the placement. That means we can divide the circuit space (chip area or die surface)to *K* parts and fill every part just by one and only one of the circuit elements [12, 13]. Therefore when a spin is assigned in *kth* state that means its corresponding cell or module (circuit element) is placed on *kth* space or part of

In the MFA algorithm, the aim is to find the spin values minimizing the energy function of the system. In order to achieve this goal, the average (expected) value *Vi = <Si>* of each spin vector *Si* is computed and iteratively updated until the system stabilizes at some fixed point.

[*vi1*, … ,*vik* , … *viK*]= [< Si1> , … . <Sik> , … , <SiK>] *for*1 i n*C* (5)

*vik* is probability of finding spin *i* at state *k* and can take any real value between 0 and 1. When the system is stabilized, *vik* values are expected to converge to 0 or 1.As the system is a

∑ ��� � ������� i n�

This constraint guarantees that each Potts spin *S*i is in one of the *K* states at a time, and each cell is assigned to only one position for encoded configuration of the problem. In order to construct an energy function it is helpful to associate the following meaning to the values

�

��� (4)

��� (6)

�

**2.1. Encoding** 

one has to be used.

dimensional vectors.

of the K- states.

circuit or placement.

���, for example:

**2.2. Energy function formulation** 

Vi = < Si> *for* 1 i n*C* and Vi =[*vi1*, … , *vik* , … *viK*] So:

Potts glass we have the following constraint:

Mean field theory equations, needed to minimize the total energy function *Et*, can be derived as follow:

$$\phi\_{lk} = -\frac{\partial E(\mathcal{V})}{\partial v\_{lk}}\tag{9}$$

The quantity ��� represents the *kth* element of the *mean field vector* effecting on spin *i*. Using the mean field values, average spin values, *vik*, can be updated.

$$\text{for } \upsilon\_{lk} = \frac{e^{\Phi\_{lk}/T}}{\sum\_{n=1}^{K} e^{\Phi\_{lk}/T}} \text{for1} \le \text{ i } \le m \text{ , } 1 \le k \le K \tag{10}$$

Where *T* is the temperature parameter which is used the relax the system iteratively and is managed with a cooling schedule program.

#### **2.4. Energy difference and cooling schedule**

A teach iteration of algorithm, the mean field vector effecting on a randomly selected spin is computed. Then, spin average vector is updated. This process is repeated for a random sequence of spins until the system is stabilized for the current temperature. The system is

observed after each spin vector update in order to detect the convergence to an equilibrium state for a given temperature.

If the total energy does not decrease in most of the successive spin vector updates, this means that the system is stabilized for that temperature. Then, *T*is decreased according to the cooling schedule by a decreasing factor and the iterative process restarted again with new temperature. To reduce the complexity of energy difference computation an efficient scheme could be used.

$$
\Delta E\_{lk} = \oint\_{lk} \Delta \upsilon\_{lk} \text{ so } \Delta E = \sum\_{k=1}^{K} \phi\_{lk} \Delta \upsilon\_{lk}
\text{where } \Delta \upsilon\_{lk} = \upsilon\_{lk} \text{ (new)} - \upsilon\_{lk} \text{ (old)}\tag{11}
$$

Depending to complexity of problem, the cooling program could be in one stage or more stages in order to reach faster and better result. In some problems like circuit partitioning problem the applied cooling schedule is simply in one stage (�� is decreasing factor):

$$T\_{new} = T\_{old} \times t\_f \text{ for } 0 < t\_f < 1 \tag{12}$$

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

In modern VLSI physical design, Engineering Change Order (ECO) optimization methods are used to mitigate model placement problems such as hot spots and thermal dissipation that are identified at a given layout at post-routing analysis that is an evaluation stage after placement stage. The relocation problem is defined as adding an additional module to a model placement in order to solve problems at a manner that similarity of the resultant

Our presented MFA-based technique is modified form which was applied for cell placement problem in [14] by adding some considerations relating to particular characteristics of the

Placement is the process of determining the locations of circuit devices on a die surface. ItisanimportantstageintheVLSIdesignflowbecauseitaffectsroutability, performance, heat

Traditionally, it is applied after the logic synthesis stage and before the routing stage. Since the advent of deep submicron process technology around mid-1990, interconnect delay, which is largely determined by placement, has become the dominating component of circuit delay. As a result, placement information is essential even in early design stages to achieve

The circuit is presented with a hyper-graph Ω(C, N), that consists of a set C representing the cells circuit, a cell weight function of the circuit, a hyper-edge set *N* representing the nets of the ߱ǣ ܥ ՜ ࣨand a net weight function ߱௧ǣܰ՜ࣨ where ࣨ represents the set of natural numbers. Space of circuit is a rectangular grid of clusters with P rows and Qcolumns

As presented before in the K-state Potts model of S spins, the states of spins re represented using S K-dimensional vectors. To apply MFA technique for cell placement problem the circuit layout space is mapped to a grid space with *P* rows and *Q* columns. If the number of

3 columns

*Locatio n of the ith Cell*

**3. VLSI Relocation problem using MFA technique** 

distribution, and to a less extent, power consumption of a design.

placement to the model placement is kept.

local relocation problem.

better circuit performance.

where the cells will be placed.

**Figure 2.** Cell location on spin space configuration

2 rows

**3.1. Cell placement problem** 

Actually cooling schedule controls amount of acceptable cost increasing moves and the efficiency of the algorithm. Clearly for very large temperatures almost any change will be accepted while as the temperature is reduced the chance that a positive cost change will also be accepted is reduced.

## **2.5. Total MFA algorithm**

The total format of MFA for various kind of problem is represented as:


Inside the algorithm some notes must be considered. Selection of initial temperatures is crucial for obtaining good quality solutions. Typically spin averages initialize with an equal values plus a small disturbing part that is randomly valued but this is not an eternal rule. Adding this disturbing part causes the spins exit their stable states and their movement starts. Selecting balance factors in energy function has important role for efficiency of the algorithm.
