Genie A Genetic Placement Algorithm James P Cohoon

  • Slides: 19
Download presentation
Genie: A Genetic Placement Algorithm James P. Cohoon William D. Paris © 1987 IEEE

Genie: A Genetic Placement Algorithm James P. Cohoon William D. Paris © 1987 IEEE

Genetic Algorithms n n State Space Search –similar to SA Based on principles of

Genetic Algorithms n n State Space Search –similar to SA Based on principles of natural selection and evolution q q Population of solutions, of varying fitness levels Solutions ‘mate’ or crossover, to form offspring Solutions randomly mutate to introduce new genes into the current population Best solutions have a better chance of surviving to the next generation

Pseudo Code overview Create an initial population P While (best score hasn’t improved in

Pseudo Code overview Create an initial population P While (best score hasn’t improved in 10, 000 generations) { Offspring = Crossover(s 1, s 2 in P)* P = Selection(P U O)* For( i=1 to k*) Mutate(s in P) } *Solutions are selected for crossover proportional to the fitness level of individual. If (fitness < average) solution is rejected for crossover. *k = random normal function of mean K*Pop_Size*Num_Nets

Population Constructor Net 1: A, B, C, D Net 2: A, D, E, F,

Population Constructor Net 1: A, B, C, D Net 2: A, D, E, F, H Net 3: A, B, E, G, I, J A B E G I J Step 1: Randomly select a net (Z) Step 2: Place free modules in net Z on grid from L to R

Population Constructor Net 1: A, B, C, D Net 2: A, D, E, F,

Population Constructor Net 1: A, B, C, D Net 2: A, D, E, F, H Net 3: A, B, E, G, I, J A B E G I J Step 1: Randomly select a net (Z) Step 2: Place free modules in net Z on grid from L to R Step 3: Update free modules and nets

Population Constructor Net 1: A, B, C, D Net 2: A, D, E, F,

Population Constructor Net 1: A, B, C, D Net 2: A, D, E, F, H Net 3: A, B, E, G, I, J A B E G I J Step 1: Randomly select a net (Z) Step 2: Place free modules in net Z on grid from L to R Step 3: Update free modules and nets Step 4: Select next net Do { module m = previous module placed } Until ( m is in a free net || no mods left on net) if (success) go to Step 2 else go to Step 1

Population Constructor Step 1: Randomly select a net (Z) Step 2: Place free modules

Population Constructor Step 1: Randomly select a net (Z) Step 2: Place free modules in net Z on grid from L to R Step 3: Update free modules and nets Net 1: A, B, C, D Net 2: A, D, E, F, H Net 3: A, B, E, G, I, J A B E G F H I J D Step 4: Select next net Do { module m = previous module placed } Until ( m is in a free net ) if (success) go to Step 2 else go to Step 1

Population Constructor Step 1: Randomly select a net (Z) Step 2: Place free modules

Population Constructor Step 1: Randomly select a net (Z) Step 2: Place free modules in net Z on grid from L to R Step 3: Update free modules and nets Net 1: A, B, C, D Net 2: A, D, E, F, H Net 3: A, B, E, G, I, J A B E G F H C I J D Step 4: Select next net Do { module m = previous module placed } Until ( m is in a free net ) if (success) go to Step 2 else go to Step 1

Fitness Calculation n n Semi-perimeter bounding rectangle for each net Measure of excess channel

Fitness Calculation n n Semi-perimeter bounding rectangle for each net Measure of excess channel usage q Penalized if channel has above average # nets n ie non-uniform channel usage

Crossover Operator Passing Parent Target Parent A B C G I B D E

Crossover Operator Passing Parent Target Parent A B C G I B D E F F J L G H I K D C

Crossover Operator Passing Parent A B C D E F G H I Copy

Crossover Operator Passing Parent A B C D E F G H I Copy of Target Parent H J L K E A

Crossover Operator Passing Parent Copy of Target Parent A B C D E F

Crossover Operator Passing Parent Copy of Target Parent A B C D E F G H I J L K

Mutation Operator n n n Selects a random net (Z) in Solution (s). Selects

Mutation Operator n n n Selects a random net (Z) in Solution (s). Selects a random Module on Z Locates farthest module on net Z, and moves it as close as possible. Net 1: A, B, C, D n 2 A 3 1 D 1 is preferred (d. Y < d. X) q q if B or C @ 1, preferred If B, C @ 1, 2, required 2 is 3 is

Mutation Operator Step 1: Select a random net Step 2: Select a random module

Mutation Operator Step 1: Select a random net Step 2: Select a random module Net 1: A, B, C, D Step 3: Locate farthest module on net Initial Solution D E A C B

Mutation Operator Step 1: Select a random net Step 2: Select a random module

Mutation Operator Step 1: Select a random net Step 2: Select a random module Net 1: A, B, C, D Step 3: Locate farthest module on net Step 4: Slide module to closest possible location Initial Solution D E A C B

Results Authors Results My Results Vs TW* chip Genie Score Genie Time TW Score

Results Authors Results My Results Vs TW* chip Genie Score Genie Time TW Score TW Time 10_1 40 2. 27 us 59 . 26 us 10_2 42 2. 2 us 60 . 31 us 50_1 2755 23 us 3794 36. 5 us 50_2 3295 35. 6 us 4959 29. 2 us *simplified algorithm, Implemented by me TW cost function used for both algorithms

Merits of GA’s n Pros: q q q n Large Population provides information about

Merits of GA’s n Pros: q q q n Large Population provides information about past solution space provides a more guided search Can keep inferior solutions without destroying the good ones crossover allows for the best parts of multiple solutions to form into one Cons: q q High memory requirement Difficult parameterization (population size, rate of mutation, weighted fitness for selection, etc)

My Thoughts n Potential Areas of improvement q q Crossover -Poor for small circuits

My Thoughts n Potential Areas of improvement q q Crossover -Poor for small circuits (Converge to local optima too quickly) Mutation -too deterministic (almost always improves solution)

References Genetic Placement James P. Cohoon, member, IEEE, and William D. Paris IEEE Transactions

References Genetic Placement James P. Cohoon, member, IEEE, and William D. Paris IEEE Transactions on Computer Aided Design, Vol. Cad-6, November 1987 VLSI Cell Placement Techniques K. SHAHOOKAR AND P. MAZUMDER Department of Electrical Engineering and Computer Sc~ence, University of Michigan, Ann Arbor, Michigan 48109 ACM Computing Surveys, Vol. 23, No. 2, June 1991