Two-Level Logic Synthesis -- Heuristic Method (ESPRESSO)

11
Two-Level Logic Synthesis Two-Level Logic Synthesis -- -- Heuristic Method (ESPRESSO) Heuristic Method (ESPRESSO)

description

Two-Level Logic Synthesis -- Heuristic Method (ESPRESSO). Exact and Heuristic Minimizers. Exact Minimizers: guaranteed optimal solution(s) PIs and/or minterms Complexity Heuristic Minimizers Quality of the solution Complexity. solution space. solution space. search space. cost. local - PowerPoint PPT Presentation

Transcript of Two-Level Logic Synthesis -- Heuristic Method (ESPRESSO)

Page 1: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

Two-Level Logic SynthesisTwo-Level Logic Synthesis-- -- Heuristic Method (ESPRESSO)Heuristic Method (ESPRESSO)

Page 2: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 2

Exact and Heuristic MinimizersExact and Heuristic Minimizers

Exact Minimizers: Exact Minimizers: guaranteed optimal solution(s)guaranteed optimal solution(s) PIs and/or mintermsPIs and/or minterms ComplexityComplexity

Heuristic MinimizersHeuristic Minimizers Quality of the solutionQuality of the solution ComplexityComplexity

Page 3: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 3

search spacesearch space

solution spacesolution space

ApproachApproach1.1. Find a starting pointFind a starting point

2.2. Search the neighborhoodSearch the neighborhood

3.3. Move to neighbor point(s)Move to neighbor point(s)

4.4. Continue until a local optimal is reachedContinue until a local optimal is reached

ComponentsComponents Solution spaceSolution space Neighborhood structureNeighborhood structure Move strategyMove strategy Action on local optimalAction on local optimal

Local SearchLocal Search

costcost

locallocaloptimaloptimal

solution spacesolution space

Page 4: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 4

Local Search for Logic MinimizationLocal Search for Logic Minimization

Goal: Goal: Given a Boolean function, find a SOP with minimal Given a Boolean function, find a SOP with minimal cost cost

Local Search:Local Search: Search space: all SOP forms on given variablesSearch space: all SOP forms on given variables

solution space: SOP forms equal to the given functionsolution space: SOP forms equal to the given function Neighborhood: two SOP forms are of Neighborhood: two SOP forms are of distance 1distance 1 if if

• they have only one product term not in commonthey have only one product term not in common• they have only one literal not in common in this termthey have only one literal not in common in this term

How to find neighbors: How to find neighbors: expansionexpansion and and reductionreduction Greedy move strategy: Greedy move strategy: move to a neighbor with less costmove to a neighbor with less cost Halt (or try again) at a local minimalHalt (or try again) at a local minimal

Page 5: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 5

Neighborhood StructureNeighborhood Structure

Two solutions, Two solutions, s s andand t, t, are of are of distance distance rr if there if there exist a sequence of exist a sequence of (r+1)(r+1) solutions, solutions, ss00,s,s11,…,s,…,srr, , s.t. s.t. ss00=s=s, , ssrr=t=t, and , and ssii and and ssi+1i+1 are of distance 1.are of distance 1.

(I) xy+wy’z+w’x’y(I) xy+wy’z+w’x’y (II) xy’+wy’z+w’x’y(II) xy’+wy’z+w’x’y (III) x’y’+wy’z+w’x’y(III) x’y’+wy’z+w’x’y

A local search algorithm usually is based on A local search algorithm usually is based on searching neighbors within a given distance searching neighbors within a given distance (radius). Larger radius in general leads to more (radius). Larger radius in general leads to more neighbors, better movement, shorter search time neighbors, better movement, shorter search time before reach a local optimal, but longer run-time before reach a local optimal, but longer run-time overall and no guarantee on the quality of the overall and no guarantee on the quality of the local optimal.local optimal.

Page 6: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 6

ExpandExpand

The The expansionexpansion of an implicant is obtained by of an implicant is obtained by deleting one (or more) of its literals.deleting one (or more) of its literals.

A A kk-literal implicant can have -literal implicant can have 22kk-1-1 expansions. expansions. Literal vs. mintermLiteral vs. minterm Check for: Valid ImplicantCheck for: Valid Implicant Stop at: Prime ImplicantStop at: Prime Implicant

Goal: Goal: expand non-prime implicant to prime with expand non-prime implicant to prime with the least literalsthe least literals

Page 7: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 7

Example: Example: ExpandExpand

f=x’y’z’+xy’z’+x’yz’+x’y’zf=x’y’z’+xy’z’+x’yz’+x’y’z with xyz’ as don’t carewith xyz’ as don’t care x’y’z’ x’y’z’ y’z’ (xy’z’ y’z’ (xy’z’ ) ) z’ (xyz’ z’ (xyz’, x’yz’ , x’yz’ ) ) 1( 1(xx) ) x’y’z’ x’y’z’ x’z’ (x’yz’ x’z’ (x’yz’ ) ) x’ (x’yz x’ (x’yz x) x) x’y’zx’y’z y’z (xy’z y’z (xy’z xx))

Questions:Questions: Where to start: one that is unlikely Where to start: one that is unlikely

to be covered by othersto be covered by others How to check validity: How to check validity:

• compare with off-setcompare with off-set• compare with on-set + don’t care setcompare with on-set + don’t care set

Which literal to delete? Which literal to delete?

z

x

y

Page 8: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 8

ReduceReduce

The The reductionreduction of an implicant is obtained by of an implicant is obtained by adding one or more literals.adding one or more literals.

Reduction increases the cost (fanins)Reduction increases the cost (fanins) Why Reduce?Why Reduce?

f = xz’ + xy’ + x’y + x’z = xy’ + x’z + yz’ f = xz’ + xy’ + x’y + x’z = xy’ + x’z + yz’ (???, see next slide)(???, see next slide)

Check for: Valid CoverCheck for: Valid Cover Stop at: Maximally reduced implicantStop at: Maximally reduced implicant

Goal: Goal: decrease the size of implicants such that decrease the size of implicants such that expansion may lead to a better solution expansion may lead to a better solution

Page 9: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 9

Example: Example: ReduceReduce

f = xz’ + xy’ + x’y + x’zf = xz’ + xy’ + x’y + x’z No implicant can be expandedNo implicant can be expanded

(I.e., all are PIs)(I.e., all are PIs) Reduce x’y to x’yz’Reduce x’y to x’yz’ Reduce xz’ to xyz’Reduce xz’ to xyz’ Expand x’yz’ to yz’Expand x’yz’ to yz’ f = xy’ + x’z + f = xy’ + x’z + yz’yz’

Reduction is for further expansion, Reduction is for further expansion, one way to get out of local optimal.one way to get out of local optimal.

z

x

y

z

x

y

z

x

y

z

x

y

Page 10: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 10

IrredundantIrredundant

An implicant in a cover is An implicant in a cover is redundantredundant if all the if all the minterms covered by it are contained in other minterms covered by it are contained in other implicants in the cover.implicants in the cover.

z

x

y

Redundant coverRedundant cover

z

x

y

Irredundant coverIrredundant cover(non-expandable)(non-expandable)

z

x

y

Minimum coverMinimum cover(after reduction(after reduction

+ expansion)+ expansion)

irredundant cover vs. minimum coverirredundant cover vs. minimum cover

redundant PI(s) should be out, but what must be in the cover?redundant PI(s) should be out, but what must be in the cover?

Page 11: Two-Level Logic Synthesis --  Heuristic Method (ESPRESSO)

ENEE 644 11

The Espresso HeuristicThe Espresso Heuristic

First it applies the Expand and Irredundant First it applies the Expand and Irredundant operators to optimize the current function operators to optimize the current function specificationspecification

Then it uses the reduce operator to get out of Then it uses the reduce operator to get out of local minimumlocal minimum

This is iterated till the solution convergesThis is iterated till the solution converges (This was espresso in a nutshell)(This was espresso in a nutshell)