Docsity

Logic Optimization Techniques: Quine-McCluskey vs. Espresso - Prof. Susan Lysecky, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
1
Two-level Logic Optimization, Part 2
ECE 474a/575a
Susan Lysecky
2of 14
Exact Algorithm vs. Heuristics
•Quine-McCluskey
Calculated all prime implicants to derive the optimal solution(s)
Petrick’s Method derives all covers to determine minimum cover set(s)
Number of prime implicants grow quickly -- solution space is huge!
Finding the minimum cover set in a class of NP complete problems
•Determining optimal solution is difficult
•Move to heuristics
Look at generating a quality solution quickly (not necessarily optimal)
pf3
pf4
pf5

Partial preview of the text

Download Logic Optimization Techniques: Quine-McCluskey vs. Espresso - Prof. Susan Lysecky and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Two-level Logic Optimization, Part 2

ECE 474a/575aSusan Lysecky 2 of 14

Exact Algorithm vs. Heuristics

• Quine-McCluskey

ƒ Calculated all prime implicants to derive the optimal solution(s) ƒ Petrick’s Method derives all covers to determine minimum cover set(s) ƒ Number of prime implicants grow quickly -- solution space is huge! ƒ Finding the minimum cover set in a class of NP complete problems

  • Determining optimal solution is difficult

• Move to heuristics

ƒ Look at generating a quality solution quickly (not necessarily optimal)

ECE 474a/575aSusan Lysecky 3 of 14

Logic Optimization Techniques

• Logic Optimization Techniques

ƒ K-maps (Graphical) ƒ Quine-McCluskey (Exact Algorithm) ƒ Espresso (Heuristic)

• Other Generalized Heuristics

ƒ Branch-and-bound ƒ Simulated Annealing ƒ Dynamic Programming ƒ many more exists … ze

ECE 474a/575aSusan Lysecky 4 of 14

Local Search

• Don’t generating all prime implicants and

minterms

• Instead, ESPRESSO successively modify a

given initial cover

ƒ This technique is called a algorithm local search

• Idea behind local search

ƒ Search space or solution space - set of allpossible values and cost associated with solution ƒ Start with an initial value ƒ Search all points in neighborhood for a feasiblepoint whose cost is less than current

  • Different problems have different neighborhooddefinitions ƒ If one is found, start process over

cost of a solution

possible solutions

x

F(x)

ECE 474a/575aSusan Lysecky 7 of 14

Espresso – Expand Operator

• EXPAND

ƒ Deleting one (or more) of itsliterals ƒ Check for validity

Fa (^) bc ab

Fa bc abc

Fa (^) bc (^000 011 110 100) bc 0 0

Fa (^) bc abc

Expand abc by removing c (results in ab)

Is it valid? Yes.

Expand abc by removing c (results in ab)

Is it valid? No.

ECE 474a/575aSusan Lysecky 8 of 14

Espresso – Expand Operator

• Goal is to expand a non-prime

implicants to prime with the

least number of literals 1 1 0 1

00 01 11 10 1 0 0 1 0 X

Fa bc^ a’b’c’

Expand a’b’c’ by removing a’Is it valid? Yes.

(^01 0011 0110 1100 101) X

Fa (^) bc^ b’c’

Expand b’c’ by removing b’Is it valid? Yes. (^001 011 110 ) 1 0 0 1 0 X

Fa (^) bc^ c’

c’ is an prime implicant

ECE 474a/575aSusan Lysecky 9 of 14

Espresso – Reduce Operator

• REDUCE

ƒ Adding one or more literals ƒ Check for validity 1 1 1 1

Fa (^) bc a’b’ (^001 011 111 ) 0 0

Fa bc a’

Fa (^) bc a’c (^001 011 111 ) 0 0

Fa (^) bc a’

Reduce a’ by adding b’ (results in a’b’)

Is it valid? Yes.

Reduce a’ by adding c (results in ac)

Is it valid? Yes.

ECE 474a/575aSusan Lysecky 10 of 14

Espresso – Reduce Operator

• Goal is to decrease the size ofimplicants such that expansion

may lead to a better solution ƒ Avoiding a local minimum

(^000 011 111 ) 1 1 0 1 0 1

Fx (^) yz^ x’z^ x’y

xy’ xz’

Reduce x’y to x’yz’

No implicant can be expanded Is it valid? Yes. (^000 011 111 ) 1 1 0 1 0 1

Fx (^) yz^ x’z^ x’yz’

xy’ xz’

Is it valid? Yes.Reduce xz’ to xyz’

Is it valid? Yes.Expand x’yz’ to yz’

(^01 0001 0111 1110 )

Fx (^) yz^ x’z

xy’ yz’

F = x’z + yz’ + xy’ Reduction helped find a bettersolution!

(^000 011 111 ) 1 1 0 1 0 1

Fx yz^ x’z^ x’yz’

xy’ xyz’

ECE 474a/575aSusan Lysecky 13 of 14

Espresso – Additional Concerns

• Additional concerns

ƒ Validity check operations

ƒ Which direction should the

move make?

• Methods outlined in the heuristic

ƒ We will not cover these

Fa bc (^0 1 0 0) ab

Fa bc abc

(^000 011 110 ) 0 0

Fa (^) bc

which way should weexpand? bc

Fx yz^ x’z^ x’y

xy’

yz’ xz’

which implicant should we reduce?which literal should we add?

ECE 474a/575aSusan Lysecky 14 of 14

Espresso

espresso(F,D) { R = complement(F U D); F = expand(F,R); // initial expansion F = irredundant(F,D); // initial irredundant cover E = essentials(F,D); // detect essential prime implicants F = F – E; // remove prime implicants from f D = D U E; // add essential prime implicants to D repeat { φ 1 = |F |; F = reduce(F,D); F = expand(F,R); F = irredundant(F,D); } until (|F | ≥ φ 1 ); F = F U E; D = D – E; RETURN F; }

repeated application of REDUCE, EXPAND,IRREDUNDANT operations while cost keeps decreasing

F is the on-set, D is the don’t care set