ESPRESSO: A Heuristic Algorithm for Logic Optimization - Prof. Susan Lysecky, Study notes of Electrical and Electronics Engineering

An overview of espresso, a popular heuristic algorithm used for boolean logic optimization. The algorithm utilizes local search techniques to expand and reduce implicants, aiming to find a good, if not optimal, solution. The expand, reduce, and irredundant operators, as well as additional concerns such as validity checks and which direction to expand or reduce.

Typology: Study notes

Pre 2010

Uploaded on 08/30/2009

koofers-user-qlz-1
koofers-user-qlz-1 🇺🇸

10 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
ECE 474a/575a
Susan Lysecky 1of 15
ECE 474A/57A
Computer-Aided Logic Design
Lecture 9
ESPRESSO
ECE 474a/575a
Susan Lysecky 2of 15
Some Problems are Hard
Using Exact Algorithms vs. Heuristics
Quine-McCluskey
Calculated all prime implicants to derive the optimal solution(s)
Petricks 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/575a
Susan Lysecky 3of 15
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 …
pf3
pf4
pf5

Partial preview of the text

Download ESPRESSO: A Heuristic Algorithm for Logic Optimization - Prof. Susan Lysecky and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ECE 474a/575a Susan Lysecky

1 of 15

ECE 474A/57A

Computer-Aided Logic Design

Lecture 9

ESPRESSO

ECE 474a/575a Susan Lysecky

2 of 15

Some Problems are Hard

Using Exact Algorithms 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/575a Susan Lysecky

3 of 15

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 …

ECE 474a/575a Susan Lysecky

4 of 15

Local Search

cost of a solution

possible solutions

x

F(x)

ƒ Don’t generating all prime implicants and

minterms

ƒ Instead, ESPRESSO successively modify a

given initial cover

ƒ This technique is called alocal search

algorithm

ƒ Idea behind local search

ƒ Search space or solution space - set of all

possible values and cost associated with

solution

ƒ Start with an initial value

ƒ Search all points in neighborhood for a

feasible point whose cost is less than current

ƒ Different problems have different neighborhood definitions

ƒ If one is found, start process over

ECE 474a/575a Susan Lysecky

5 of 15

Local Search

F(x)

x

local minimum

global/absolute minimum

ƒ Drawback of local searches is local optimality

ƒ Solution is locally optimal if its neighborhood does not contain any solutions with a

lower cost

ƒ Locally optimal solution may not be the optimal solution

ƒ Modify local search so we don’t get stuck at the local minimum

ECE 474a/575a Susan Lysecky

6 of 15

Espresso

ƒ Espresso utilizes local search (keeping in mind local minimum problem)

ƒ Probably most popular minimization algorithm

ƒ Extremely efficient Boolean manipulation

ƒ Composed of three main operations

ƒ EXPAND, REDUCE, IRREDUNDANT

ƒ Other operations include

ƒ COMPLEMENT, ESSENTIAL PRIMES, LASTGASP, MAKESPARSE

ƒ Espresso Heuristic (in a nutshell)

ƒ Apply Expand and Irredundant operators to optimize the current function

specification

ƒ Uses the reduce operator to get out of local minimum

ƒ Iterated until the solution converges

ECE 474a/575a Susan Lysecky

10 of 15

Espresso – Reduce Operator

ƒ Goal is to decrease the size of

implicants such that expansion

may lead to a better solution

ƒ Avoiding a local minimum

0 1 1 1

00 01 11 10

1 1

0

1 0 1

F yz x

x’z x’y

xy’ xz’

Reduce x’y to x’yz’

No implicant can be expanded

Is it valid? Yes.

0 1 1 1

00 01 11 10

1 1

0

1 0 1

F yz x

x’z x’yz’

xy’ xz’

Is it valid? Yes.

Reduce xz’ to xyz’

Is it valid? Yes.

Expand x’yz’ to yz’

0 1 1 1

00 01 11 10

1 1

0

1 0 1

F yz x

x’z

xy’ yz’

F = x’z + yz’ + xy’

Reduction helped find a better solution!

0 1 1 1

00 01 11 10

1 1

0

1 0 1

F yz x

x’z x’yz’

xy’ xyz’

ECE 474a/575a Susan Lysecky

11 of 15

Espresso – Irredundant Operator

yz’ is redundant

x’y and xz’ cover all minterms contained in yz’

F yz x

x’z (^) x’y

xy’

yz’

xz’

F yz x

x’z x’y

xy’

xz’

ƒ IRREDUNDANT

ƒ Implicant in a cover is

redundant if all the minterms

covered by it are contained in

other implicants in the cover

ECE 474a/575a Susan Lysecky

12 of 15

Espresso – Irredundant Operator

ƒ Irredundant cover is not the

same as minimal cover

F yz x

x’z x’y

xy’

xz’

F yz x

x’z

xy’

yz’

irredundant cover

irredundant cover

minimal cover

ECE 474a/575a Susan Lysecky

13 of 15

Espresso – Additional Concerns

F (^) bc a

(^0 1 0 0) ab

F (^) bc a abc

F (^) bc a bc

which way should we expand?

F yz x

x’z x’y

xy’

yz’

xz’

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

ƒ Additional concerns

ƒ Validity check operations

ƒ Which direction should the

move make?

ECE 474a/575a Susan Lysecky

14 of 15

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 essential 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

ECE 474a/575a Susan Lysecky

15 of 15

ESPRESSO, to be continued…

ƒ Presented high-level idea behind ESPRESSO

ƒ ESPRESSO performs extremely efficient Boolean manipulation

ƒ How are these operations actually performed?