**3.1 A model to solve circuit partitioning**

The circuit partitioning problem can be formally represented in graph theoretic notation as a weighted graph, with the components represented as nodes, and the wires connecting them as edges, the weights of the node represent the sizes of the corresponding components, and the weights of the edges represent the number of wires connecting the components. In its general form, the partitioning problem consists of dividing the nodes of the graph into two or more disjoint subsets such that the sum of weights of the nodes in each subset does not exceed a given capacity, and the sum of weights of edges connecting nodes in different subsets is minimized. But generally the circuits are represented as bipartite graphs consisting of two sets of nodes, the cells and the nets/ Edges connect each cell to several nets, and each net to several cells as shown in Fig1.Let G= (M, N, E), mi is a cell, niN is a net, and eij=(mi,nj) E is an edge which represents that mi and nj are connected electrically. For any nj for all I for which eij exists, we say that the cells mi are connected by net nj.

Algorithms for CAD Tools VLSI Design 133

Fig. 2. Breadth-first search sequence and the corresponding chromosome

the fitness of each individual is determined by scaling as follows.

A referenced worst cost is determined by

Then, the fitness of each individual is determined by

to participate in the crossover.

Fitness scaling is used to scale the raw fitness values of the chromosomes so that the GA sees a reasonable amount of difference in the scaled fitness values of the best versus the

The following fitness algorithm applies to evaluation functions that determine the cost, rather than the fitness, of each individual (Univesity of New Mexico, 1995). From this cost,

Cw=C+S

Where C is the average cost of the population, S is the user defined sigma-scaling factor, and is the standard deviation of the cost of the population. In case Cw is less than the real worst cost in the population, they only the individuals with cost lower than Cw are allowed

(3)

ii. Fitness Scaling

worst individuals.

Conversely, for any mi for all j for which eij exists, we say that the nets nj are connected of cell mi. Each cell mi has an area ai, and each net nj has a cost cj. The edges of the bipartite graph are un weighted. In this case, the partitioning problem is to divide the set of cells into disjoint subsets, M1, M2,…….Mk, such that the sum of cell areas in each subset Mi is less than a given capacity Ai, and the sum of costs of nets connected to cells in different subsets is minimized. That is,

$$\bigcup\_{n=1}^{k} M \quad \text{ } \mathbf{n} = \mathbf{M} \text{ } \tag{1}$$

Mn, miMnai An

and nj, if nj is connected to cells in p different partitions, then,

$$\mathbf{C} = \sum (\mathbf{p} \cdot \mathbf{l}) \mathbf{c} \text{ is minimized} \tag{2}$$

Fig. 1. Bipartite graph model for partitioning

#### **3.2 Memetic algorithms applied to circuit partitioning**

i. Chromosome Representation

1 bit in the chromosome represents each cell, the value of which determines the partition in which the cell is assigned (Krasnogor & Smith, 2008). The chromosome is sorted as an array of 32 bit packed binary words. The net list is traversed in a breadth-first search order, and the cells are assigned to the chromosome in this order. Thus, if two cells are directly connected to each other, there is a high probability that their partition bits are close to each other in the chromosome. An example is the breadth-first search sequence and the corresponding chromosome as shown in Fig. 2.

Conversely, for any mi for all j for which eij exists, we say that the nets nj are connected of cell mi. Each cell mi has an area ai, and each net nj has a cost cj. The edges of the bipartite graph are un weighted. In this case, the partitioning problem is to divide the set of cells into disjoint subsets, M1, M2,…….Mk, such that the sum of cell areas in each subset Mi is less than a given capacity Ai, and the sum of costs of nets connected to cells in different subsets

> 1 *k*

C = (p-1)cj is minimized (2)

1 bit in the chromosome represents each cell, the value of which determines the partition in which the cell is assigned (Krasnogor & Smith, 2008). The chromosome is sorted as an array of 32 bit packed binary words. The net list is traversed in a breadth-first search order, and the cells are assigned to the chromosome in this order. Thus, if two cells are directly connected to each other, there is a high probability that their partition bits are close to each other in the chromosome. An example is the breadth-first search sequence and the

and nj, if nj is connected to cells in p different partitions, then,

**M1**

**M2**

**M3**

**M4**

Fig. 1. Bipartite graph model for partitioning

corresponding chromosome as shown in Fig. 2.

i. Chromosome Representation

**3.2 Memetic algorithms applied to circuit partitioning** 

*<sup>n</sup> <sup>M</sup>* n = M, (1)

is minimized. That is,

Mn, miMnai An

ii. Fitness Scaling

Fitness scaling is used to scale the raw fitness values of the chromosomes so that the GA sees a reasonable amount of difference in the scaled fitness values of the best versus the worst individuals.

The following fitness algorithm applies to evaluation functions that determine the cost, rather than the fitness, of each individual (Univesity of New Mexico, 1995). From this cost, the fitness of each individual is determined by scaling as follows.

A referenced worst cost is determined by

$$\mathbf{Cw} = \mathbf{C} + \mathbf{S}\sigma \tag{3}$$

Where C is the average cost of the population, S is the user defined sigma-scaling factor, and is the standard deviation of the cost of the population. In case Cw is less than the real worst cost in the population, they only the individuals with cost lower than Cw are allowed to participate in the crossover.

Then, the fitness of each individual is determined by

Algorithms for CAD Tools VLSI Design 135

Log(rand[0,1]) Next=Prev+

Each mutation is evaluated and accepted separately, and this process is continued until end of population is reached. The mutated version replaces the unmutated version of the same individual in the population. The acceptance of mutation operation has some probabilistic characteristics similar to simulated annealing. If the change in the cost C is negative, signifying that the fitness has increased, the mutation is always accepted, as in simulated annealing. If change in the cost is positive, then mutations are accepted probabilistically.

**4. Evolutionary time series model for partitioning using Neuro-Memetic** 

Fig. 3. Sample Circuit Fig. 4. Bipartition Circuit

An evolutionary time-series model for partitioning a circuit is discussed using Neuro

A sample example and the corresponding chromosome representation is shown in Fig 3 and

Where PM is the mutation probability.

Memetic algorithm owing to its local search capability.

**approach** 

Fig 4.

**Sample Data Set** 

Log(1.0-PM) 

(7)

$$\begin{cases} \text{Cw-C} & \text{if } \text{Cw} \ge 0 \\ \text{F=0} & \text{otherwise} \end{cases} \tag{4}$$

This scales the fitness such that, if the cost is k standard deviations from the population average, the fitness is

$$\mathbf{F} \mathbf{=} (\mathbf{S} \pm \mathbf{K}) \sigma \tag{5}$$

This means that may individuals worse than S standard deviation from the population mean (k=s) are not selected at all. If S is small, the ratio of the lowest to the highest fitness in the population increases, and then the algorithm becomes more selective in choosing parents. On the other hand, if S is large, then Cw is large, and the fitness values of the members of the population are relatively close to each other. This causes the difference in selection probabilities to decrease and the algorithm to be less selective in choosing parents.

#### iii. Evaluation

The cut cost is calculated as the number of nets cuts. If the net is present in both partitions, or if the net is present in the partition opposite to its I/O pad, then it is said to have a cut (Merz & Freisleben, 2000).

Counting number of 1's in the chromosome does partition imbalance evaluation. A quadratic penalty has been used for imbalance, so that large imbalance is penalized more than a small imbalance. The user specifies the relative weights for cut and imbalance Wc and Wb.

Thus the total cost is:

$$\mathbf{C} = \text{Wc(cut)} + \text{Wb(imbalance)} \mathbf{2} \tag{6}$$

#### iv. Incorporation and Duplicate Check

The two new offspring formed in each generation are incorporated into the population only if they are better than the worst individuals of the existing population. Before entering a new offspring into the population, it is checked against all other members of the population having the same cost, in order to see whether it is duplicate. Duplicates can result due to the same crossover operation (T. Jones, 1995).

Duplicates have two disadvantages:


After crossover and incorporation, mutation is performed on each bit of the population with a very small probability Pm. We go through the entire population once (Krasnogor et al., 1998a). For each mutation the location in bits is determined from previous location and a random number as follows,

Cw-C if Cw>0 F=0 otherwise

This scales the fitness such that, if the cost is k standard deviations from the population

F=(S K)

This means that may individuals worse than S standard deviation from the population mean (k=s) are not selected at all. If S is small, the ratio of the lowest to the highest fitness in the population increases, and then the algorithm becomes more selective in choosing parents. On the other hand, if S is large, then Cw is large, and the fitness values of the members of the population are relatively close to each other. This causes the difference in selection probabilities to decrease and the algorithm to be less selective in choosing parents.

The cut cost is calculated as the number of nets cuts. If the net is present in both partitions, or if the net is present in the partition opposite to its I/O pad, then it is said to have a cut

Counting number of 1's in the chromosome does partition imbalance evaluation. A quadratic penalty has been used for imbalance, so that large imbalance is penalized more than a small imbalance. The user specifies the relative weights for cut and imbalance Wc and

The two new offspring formed in each generation are incorporated into the population only if they are better than the worst individuals of the existing population. Before entering a new offspring into the population, it is checked against all other members of the population having the same cost, in order to see whether it is duplicate. Duplicates can result due to the

First they occupy storage space that could otherwise be used to store a population with

 Second whenever crossover occurs between two duplicates, the offspring is identical to the parents, regardless of the cut point, and this tends to fill the population with even

After crossover and incorporation, mutation is performed on each bit of the population with a very small probability Pm. We go through the entire population once (Krasnogor et al., 1998a). For each mutation the location in bits is determined from previous location and a

C Wc cut Wb imbalance 2 (6)

(4)

(5)

 

average, the fitness is

iii. Evaluation

Wb.

(Merz & Freisleben, 2000).

Thus the total cost is:

iv. Incorporation and Duplicate Check

same crossover operation (T. Jones, 1995).

Duplicates have two disadvantages:

more diverse feature.

more duplicates.

random number as follows,

v. Mutation

$$\text{Next=Prev+}\left[\frac{\text{Log(rand[0,1])}}{\text{Log(1.0-PM)}}\right] \tag{7}$$

Where PM is the mutation probability.

Each mutation is evaluated and accepted separately, and this process is continued until end of population is reached. The mutated version replaces the unmutated version of the same individual in the population. The acceptance of mutation operation has some probabilistic characteristics similar to simulated annealing. If the change in the cost C is negative, signifying that the fitness has increased, the mutation is always accepted, as in simulated annealing. If change in the cost is positive, then mutations are accepted probabilistically.
