ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided...

25
ECE 3060 VLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization

Transcript of ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided...

Page 1: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

ECE 3060VLSI and Advanced Digital Design

Lecture 12

Computer-Aided Heuristic Two-levelLogic Minimization

Page 2: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Computer-Aided Heuristic Two-level Logic Minimization

• Heuristic logic minimization• Principles• Operators on logic covers• Espresso

Disclaimer: lecture notes based on originals by Giovanni De Micheli

Page 3: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Heuristic minimization

• Provide irredundant covers with ‘reasonablysmall’ cardinality

• Fast and applicable to many functions• Avoid bottlenecks of exact minimization

– Prime generation and storage– Covering

Page 4: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Heuristic minimization principles

• Local minimum cover:– given initial cover– make it prime– make it irredundant

• Iterative improvement:– improve on cardinality by ‘modifying’ the

implicants

Page 5: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Heuristic minimization operators• Expand:

– make implicants prime– remove covered implicants

• Reduce:– reduce size of each implicant while preserving cover

• Reshape– modify implicant pairs: enlarge one implicant

enabling the reduction of another

• Irredundant:– make cover irredundant

Page 6: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Exampleon-set : 0000 1 prime implicants : α | 0**0 1

0010 1 β | *0*0 10100 1 γ | 01** 10110 1 δ | 10** 11000 1 ε | 1*01 11010 1 ζ | *101 10101 10111 11001 11011 11101 1

Page 7: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

αβγεζ

Page 8: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Example Expansion• Expand 0000 to α = 0**0

– drop 0100, 0010, 0110 from the cover

• Expand 1000 to β = *0*0– drop 1010 from the cover

• Expand 0101 to γ = 01**– drop 0111 from the cover

• Expand 1001 to δ = 10**– drop 1011 from the cover

• Expand 1101 to ε = 1*01• Cover is {α,β,γ,δ,ε}

Page 9: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators
Page 10: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Example reduction

• Reduce 0**0 to nothing• Reduce β = *0*0 to β = 00*0• Reduce ε = 1*01 to ε = 1101• Cover is {β,γ,δ,ε}

Page 11: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators
Page 12: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Example reshape

• Reshape {β,δ} to {β,δ}• where δ = 10*1• Cover is {β,γ, δ,ε}

Page 13: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators
Page 14: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Example second expansion

• Expand δ = 10*1 to δ = 10**• Expand ε = 1101 to ζ = *101

Page 15: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators
Page 16: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Summary of Example• Expansion:

– Cover: {α,β,γ,δ,ε}– prime, redundant, minimal w.r.to single cube containment

• Reduction:– α eliminated– β = *0*0 reduced to β = 00*0– ε = 1*01 reduced to ε = 1101– Cover: {β,γ,δ,ε}

• Reshape:– {β,δ} reshaped to {β,δ} where δ = 10*1

• Second expansion:– Cover: {β,γ,δ,ζ}– prime, irredundant (= minimal)

Page 17: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Expandnaive implementation

• For each implicant– for each non-* literal (care literal)

8raise it to * (don’t care) if possible

– remove all covered implicants

• Problems:– check validity of expansion: 2 ways

8non intersection of expanded implicant with OFF-set•requires complementation of ON-set

8expanded implicant covered by union of ON-set and DC-set•can be reduced to recursive tautology check

– order of expansions

Page 18: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Heuristics• First expand cubes which are unlikely to be

covered by other cubes– Selection: choose implicants with least number

of literals in common with other implicants– Example: f = a’b’c’d’ + ab’cd + a’b’c’d

choose ab’cd

• Choose expansions to cover the largestnumber of minterms possible (=> primeimplicant)

Page 19: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Reduce Example• Expanded cover:

8α **18β 00*

• Select α: cannot be reduced and still coverthe ON-set

• Select β: reduced to8β 001

• Reduced cover:8α **18β 001

Page 20: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Irredundant Cover

• Relatively essential set Er

– implicants covering some minterms of thefunction not covered by other implicants

• Totally redundant set Rt

– implicants covered by the relatively essentials

• Partially redundant set Rp

– remaining implicants

Page 21: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Irredundant cover goal andexample

• Goal: find a subset of Rp that, together withEr, covers the function

• Example:8α 00*8β *018γ 1*18δ 11*8ε *10

• Er = {α, ε}• Rt = {}• Rp = {β, γ, δ}

Page 22: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Example: continued

• Covering relations:– β is covered by {α, γ}– γ is covered by {β, δ}– δ is covered by {γ, ε}

• Minimum cover: γ U Er

Page 23: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Espresso Algorithm

• Compute the complement• Extract essentials• Iterate:

– expand, irredundant, reduce

• Cost functions:– cover cardinality Ø1

– weighed sum of cube and literal count Ø2

Page 24: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Espresso algorithmEspresso(F,D) { R = complement(F U D); F = expand(F, R); F = irredundant(F, D); E = essentials(F, D); F = F - E; D = D U E; repeat { Ø2 = cost(F);

repeat { Ø1 = |F|; F = reduce(F, D);

F = expand(F, R); F = irredundant(F, D); } until (|F| z Ø1); F = last_gasp(F, D, R); } until cost(F) z Ø2; F = F U E; D = D - E; F = make_sparse(F, D, R);}

Page 25: ECE 3060 VLSI and Advanced Digital DesignVLSI and Advanced Digital Design Lecture 12 Computer-Aided Heuristic Two-level Logic Minimization. Computer-Aided Heuristic Two- ... • Operators

Summaryheuristic minimization

• Heuristic minimization is iterative• Few operators applied to covers• Underlying mechanism

– cube operation– recursive paradigm

• Efficient algorithms• Preview: next lecture covers efficient boolean

representations for computer manipulation