TWO-LEVEL BOOLEAN LOGIC MINIMIZATION USING MICROBIAL GENETIC ALGORITHMS

Sumanth Jagannathan

Jay Kumar S

II Year B.Tech, Dept. of Electrical Engineering Indian Institute of Technology-Madras Madras, Tamil Nadu, India email: [email protected]

II Year B.Tech, Dept. of Electrical Engineering Indian Institute of Technology-Madras Madras, Tamil Nadu, India email: [email protected]

Abstract

This paper is a step towards the application of Artificial Intelligence in digital circuit design. Here we apply the microbial genetic algorithm to the problem of two-level Boolean logic minimization. Genetic algorithms have proved to be an efficient and efficacious answer to the problem of optimization. Microbial genetic algorithms are a minimalist version of GAs which take less processing time. We apply the algorithm for the minimization of a logic circuit with 4 inputs and 7 outputs. We also study the effects of mutation rate and crossover rate on the solution obtained.

1

INTRODUCTION

Two-level logic minimization is an important step in VLSI design. Various optimization techniques have been proposed in the past such as the ESPRESSO algorithm and [5](Coudert et al). In this paper, we investigate the applicability of genetic algorithms to this problem. In two-level minimization, as the number of inputs and outputs increase, the CPU time taken to get the optimal solution becomes an important constraint. So we require fast algorithms. This led us to use microbial GAs for this problem. The microbial GA ([3] Harvey, 1996) is a minimal form of the genetic algorithm. In conventional GA, a generational system is used. From one generation a parental pool is selected with probabilities based on their fitness. Offspring are generated from pairs of parents using one-point, twopoint, uniform or some other variety of crossover. Mutation is performed next, to form the new generation. On the contrary, in microbial GA there are no generations. We instead work with a single population of strings. First, two strings are chosen at random using

methods such as roulette wheel. From these parents an offspring is generated using crossover and mutation. The less fit of the pair is then eliminated and replaced by the offspring. The absence of a generational system reduces the number of fitness evaluations and random number generations, thereby reducing considerable amount of CPU time. While applying genetic algorithms to discrete problems, we have to take care of the fact that a string may not always represent a valid solution to the problem. Even a simple operation such as crossover of two valid strings may result in an invalid solution. The answer to this is to have a problem-specific genotype representation [4] (Schnecke,1996). We have explained our encoding scheme in the following sections. This paper is divided into four sections. In section 2, we describe the methodology we have employed. Section 3 contains the algorithm which has been implemented. In section 4 we give the experimental results and discuss them. We also study the effects of crossover rate and mutation rate on the solution.

2 2.1

METHODOLOGY THE PROBLEM

We have considered a Boolean function with 4 inputs and 7 outputs. The outputs may have don't care entries also. The aim is to find the smallest set of product terms using which all outputs can be implemented in sum-of-products form. 2.2

CONSTRAINTS OF THE PROBLEM

The following constraint has to be satisfied. All the 1's and none of the 0's of the outputs to be implemented should be covered by the solution. The don't-cares may or may not be covered. This is an equality constraint. Equality constraints may be subsumed into the system model ([1] Goldberg,1989). We

have achieved this by keeping track of the 1's that were not covered as explained below. 2.3

ENCODING

The product terms are divided into 2 groups – minterms and non-minterms (by non-minterms we refer to those product terms that are not minterms). Consider the truth table to be implemented. If all the outputs are 0 for a particular input combination, then those non-minterms covering this input combination are unnecessary (i.e. they need not be included in the solution). The encoding is done only with the remaining non-minterms. The solutions are represented by strings in the following manner. Each string consists of a number of bits indicating the presence or absence of the remaining nonminterms. The size of the string depends on the number of remaining non-minterms. The minterms are excluded because they will be used to implement the constraint of covering all 1's of all the outputs. Given a string, if the non-minterms present in the solution do not cover a particular 1 of some output, then to cover that 1, the corresponding minterm is included in the solution. Thus we have used a problem specific genotype to ensure that all strings represent valid solutions. 2.3.1

Example

2.4.1

To any string we give an initial fitness of 30,000. For every product term in the solution, we give a penalty of 500. For the 4-input case considered here, these values ensure that no string has a negative fitness. Consider the string in the previous example. 1

0

1

2. Evaluate fitness for all the strings. 3. while (there is improvement in the max. fitness of the population) do begin a. Select 2 parent strings population randomly.

m-minterms

from

the

b. Evaluate the fitness of both strings.

d-don't cares

c. Crossover these 2 parents to produce offspring (genetic exchange takes place) with a probability equal to the crossover rate.

the valid product terms(excluding the minterms) are : yw', yz'w', yzw', xyw', x'yw' and xyz'. So the string has 6 genes, i.e. 6 bits.

d. Carry out mutation on the offspring with a probability equal to the mutation rate.

If the string is as follows, 0

0

1. Initialize a population of strings randomly, wherein every string is a candidate solution to the given problem.

f2(x,y,z,w)=Σ m(1,6,12,13) + Σ d(4,14)

0

0

THE MICROBIAL GENETIC ALGORITHM

3

f1(x,y,z,w)=Σ m(4,6,12,14)

0

0

This solution has 2 non-minterms and 1 minterm. Therefore the total penalty is 3 x 500 =1,500 The string is given a fitness of 28,500.

If the functions to be minimized are

1

Example

0

e. Replace the parent having less fitness with the newly formed offspring.

1

f.

Evaluate fitness for the new offspring.

end begin the corresponding non-minterms included in the solution are yw' and xyz'. These non-minterms do not cover the minterm x'y'z'w. Therefore this minterm is also included in the solution. 2.4

FITNESS

To assign fitness we use the method of penalties. We count the non-minterms represented by the string. We also count the minterms, which are necessary to ensure that the string represents a valid solution. For every product term included in the solution, a penalty is given to the fitness. Thus the fittest string represents the optimal solution.

end After all the iterations, select the string with maximum fitness as the solution for the given problem. We have used one-point crossover and single mutation where a randomly chosen bit is altered with a certain probability.

4

RESULTS

Figure 1 shows the truth table of the functions to be implemented.

Figure 2: Effect of Crossover Rate b

c

d

f1 f2 f3 f4 f5 f6 f7

0

0

0

0

1

0

1

0

0

1

0

0

0

0

1

1

_

0

_

1

0

_

0

0

1

0

_

0

1

_

1

0

1

0

0

1

1

1

1

1

1

_

_

_

0

1

0

0

_

1

_

1

1

0

_

0

1

0

1

_

_

_

1

1

1

1

0

1

1

0

1

1

_

0

_

_

_

0

1

1

1

0

_

0

0

_

1

1

1

0

0

0

0

1

0

0

1

0

0

1

0

0

1

0

_

1

_

0

1

_

1

0

1

0

1

1

_

1

_

1

0

1

0

1

1

0

_

0

_

0

_

0

1

1

0

0

1

1

_

0

1

1

_

1

1

0

1

1

1

0

_

_

_

1

1

1

1

0

_

1

0

1

0

0

1

1

1

1

1

1

0

1

1

1

1

1

Figure 2 shows that a crossover rate between 60% and 100% leads to a good solution. 4.2

EFFECT OF DIFFERENT MUTATION RATES 4

2.4

x 10

2.35

Fitness of the solution

a

2.3

2.25

2.2

2.15

2.1

2.05

25

0

50

75

100

Mutation rate ( per cent )

Figure 1: Truth Table of the 7 functions A dash ( '_ ' ) represents a don't care entry

Figure 3: Effect of Mutation Rate

We ran the microbial GA for the above input and studied the effects of different crossover and mutation rates on the best solution. A population size of 26 strings has been used throughout.

Figure 3 shows that a mutation rate of 30% leads to a good solution. Beyond 30% there are only fluctuations and there is not much improvement.

4.1

Having fixed the crossover rate at 100% and mutation rate at 30%, we obtained the curves for maximum, average and minimum fitness of the population.

EFFECT OF DIFFERENT CROSSOVER RATES 4

2.4

x 10

4

Maximum fitness Average fitness

2.3

2.2

2.2

2 Fitness of the population

Fitness of the solution

2.4

x 10

2.1 2 1.9

Minimum fitness 1.8

1.6

1.4

1.8 1.2

1.7 1 0

1.6 0

10

20

30

40

50

60

70

Crossover rate ( per cent )

80

90

100

500

1000 1500 Number of iterations

2000

2500

Figure 4: The Maximum, Minimum and Average Fitness curves Figure 4 shows that the average, minimum and maximum fitness of the population increase as evolution proceeds. As the solution converges, the range of fitness of the population decreases. Many strings in the population have high fitness, almost near the optimum. The best solution obtained had 12 product terms : bd , bd' , abc' , cd'a , da'b' , a'b'c , c'd'a , a'bc' , a'b'c'd' , ab'c'd , ab'cd' and abcd . All the seven functions can be realized using the above product terms as follows: f1(a,b,c,d) = bd' + abc' + cd'a + da'b' + a'b'c'd' + abcd f2(a,b,c,d) = bd' + abc' + cd'a + da'b' + c'd'a f3(a,b,c,d) = a'b'c + a'b'c'd' + ab'c'd + abcd

f6(a,b,c,d) = bd + abc' + a'b'c'd' + ab'c'd + ab'cd' f7(a,b,c,d) = bd + bd' + abc' + a'b'c The CPU time taken to reach an optimal solution was around 2.5 seconds on a Pentium III 450 MHz processor. IMPORTANCE OF MUTATION

When the program was run for the same input with zero Mutation Rate, we found that the system prematurely converged to a solution with a fitness of 19,000 which is not the optimal one. This implies that the system was not able to recover from the unsatisfactory solution. Figure 5 shows this: 4

x 10

Maximum fitness of the population

1.85

1.8

1.75

1.7

1.65

1.6 0

200

400

600

800 1000 1200 Number of iterations

1400

1600

CONCLUSION

In conclusion, this paper has demonstrated that the microbial GA can be applied to the problem of two-level minimization, especially because it is very fast. The algorithm proposed in this paper has been applied successfully for a 4-input, 7 output Boolean function and can been generalized for a function of a larger number of inputs and outputs. Such an algorithm is a step towards application of Artificial Intelligence in Digital design. In future, Genetic Algorithms might prove to be a robust answer to the optimization problems in digital design.

[1] David E. Goldberg. 1989. Genetic Algorithms in Search, Optimization , and Machine Learning. AddisonWesley Longman, Inc.

f5(a,b,c,d) = bd + abc' + da'b' + a'b'c + c'd'a + a'bc'

1.9

5

References

f4(a,b,c,d) = cd'a + da'b' + a'bc' +abcd

4.3

Thus the importance of mutation is to allow the system to recover from such conditions of premature convergence.

1800

2000

Figure 5: Maximum Fitness for Zero Mutation Rate

[2] David Beasley, David R. Bull, Ralph R. Martin. 1993. An overview of Genetic algorithms:Part2, Research Topics, University Computing. [3] Inman Harvey, The Microbial Genetic Algorithm, submitted as a letter to Evolutionary Computation, 19th January, 1996 [4] Volker Schnecke, Oliver Vonberger, A Genetic Algorithm for VLSI Physical Design Automation, Proceedings of ACEDC '96. [5] Olivier Coudert, Jean Christophe Madre, Henri Fraisse, A New Viewpoint on Two-level Logic Minimization, Bull Corporate Research Center, France

two-level boolean logic minimization using microbial ...

In conventional GA, a generational system is used. From one generation a .... the system prematurely converged to a solution with a fitness of 19,000 which is.

37KB Sizes 0 Downloads 233 Views

Recommend Documents

Using Quadtrees for Energy Minimization Via Graph Cuts
For illustration, in figure 5 we reconstruct .... for representing 3D arrays such as those proposed in [18]. 6.3 Application .... In Tutorial at ACM. SIGGRAPH 2005 ...

Application Specific Loss Minimization Using Gradient ...
controlling the degree of freedom of the base learner, and by ... degree of freedom increases as the tree level increases, and ..... Statistics & Data Analysis, vol.

Using Quadtrees for Energy Minimization Via Graph Cuts
How to efficiently... (ordered in increase order of difficult). – compute them? – compute their areas? – compute the perimeters of common borders? – compute their neighborhood system? Page 8. 14:12. 8. Quadtrees. Our proposal: Page 9. 14:12.

Numeric Literals Strings Boolean constants Boolean ... - GitHub
iRODS Rule Language Cheat Sheet. iRODS Version 4.0.3. Author: Samuel Lampa, BILS. Numeric Literals. 1 # integer. 1.0 # double. Strings. Concatenation:.

Improving Code Recommender Systems using Boolean ...
Factor Analysis and Graphical Models. Marcel Bruch. Software Technology Group. Technische Universität Darmstadt [email protected].

Anesthesia Prediction Using Fuzzy Logic - IJRIT
Thus a system proposed based on fuzzy controller to administer a proper dose of ... guide in developing new anesthesia control systems for patients based on ..... International conference on “control, automation, communication and energy ...

Fair Simulation Minimization - Springer Link
Any savings obtained on the automaton are therefore amplified by the size of the ... tions [10] that account for the acceptance conditions of the automata. ...... open issue of extending our approach to generalized Büchi automata, that is, to.

The Genetic Code Boolean Lattice ABSTRACT
Knight et al (1999). Our partial order, obtained in the codon set as a consequence of a Boolean lattice and defined in the standard genetic code, reflects the relationship between the codon assignment and the .... base is U coding to hydrophobic amin

Approximate Boolean Reasoning: Foundations and ... - CiteSeerX
0 if x > 50. This function can be treated as rough membership function of the notion: “the young man” ... Illustration of inductive concept approximation problem. 2.

PDF Online Socratic Logic: A Logic Text using Socratic ...
Online PDF Socratic Logic: A Logic Text using Socratic Method, Platonic Questions, and Aristotelian Principles, Edition 3.1, Read PDF Socratic Logic: A Logic ...

pdf-17\socratic-logic-a-logic-text-using-socratic ...
There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. pdf-17\socratic-logic-a-logic-text-using-socrati

Conditions and Boolean Expressions
switch (n). { case 1: printf("You picked a low number.\n"); break; case 2: printf("You picked a medium number.\n"); break; case 3: printf("You picked a high number.\n"); break; default: printf("Invalid.\n"); break;. } } Page 9. Ternary Operator. #inc

variable block carry skip logic using reversible gates
its carry output, Ci+1, when Pi = Ai⊕Bi. Multiple full- adders, called a .... architecture for adder circuits using reversible logic based on minimizing gate count, ...

Online Electric Vehicle Control Using Fuzzy Logic Controller.pdf ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Online Electric ...

Wall Follower Robot Using Fuzzy Logic: A Review - IJRIT
and to enter open areas of the rooms [1,2]. In attempts .... Computer simulations are carried out to compare between a Knowledge Based Fuzzy Logic Controller.

Using Logic Models for Program Development1 - Semantic Scholar
Extension Service, Institute of Food and Agricultural Sciences, University of Florida, Gainesville, ... activities. Well-conceived logic models are based on relevant disciplinary research and developed in consultation ... handler training component o

Using Logic Models for Program Development1
back to identify the steps necessary to achieve these outcomes, and by doing so, we can better .... http://citnews.unl.edu/TOP/index.html. Hatry, Harry P. 1999.

Realization of a Ship Autopilot using Fuzzy Logic
control, the Proportional plus Integral plus Derivative (PID) controllers remain common-place. ... changes in speed, water depth, mass loading, the severity of the weather, etc. ... For the course-keeping and the track-keeping problems only the.

Using Logic Models for Program Development1 - Semantic Scholar
Extension Service, Institute of Food and Agricultural Sciences, University of Florida, Gainesville, FL 32611-0540. ... state specialists, and administrators.

TCPS Controller Design Using Fuzzy Logic Controller for Power ...
For economic and ecological reasons, the building of new transmission lines and expansion of existing transmission systems are becoming more and more difficult. In this new situation, it is necessary to utilize the existing power transmission system

Using Markov Logic Network for On-line Activity ...
is dressing up in the morning (in that case, the best action could be to provide high intensity light .... command), to ease social inclusion and to provide security reassurance by de- tecting situations of ... the home automation system transmitted

Optimum Gate Ordering of CMOS Logic Gates Using Euler Path ...
Optimum Gate Ordering of CMOS Logic Gates Using Euler Path Approach: Some Insights and Explanations. 87. Before. Merging. After. Merging. Increase in odd.