ECE 3060VLSI and Advanced Digital Design
Lecture 12
Computer-Aided Heuristic Two-levelLogic Minimization
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
Heuristic minimization
• Provide irredundant covers with ‘reasonablysmall’ cardinality
• Fast and applicable to many functions• Avoid bottlenecks of exact minimization
– Prime generation and storage– Covering
Heuristic minimization principles
• Local minimum cover:– given initial cover– make it prime– make it irredundant
• Iterative improvement:– improve on cardinality by ‘modifying’ the
implicants
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
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
αβγεζ
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 {α,β,γ,δ,ε}
Example reduction
• Reduce 0**0 to nothing• Reduce β = *0*0 to β = 00*0• Reduce ε = 1*01 to ε = 1101• Cover is {β,γ,δ,ε}
Example reshape
• Reshape {β,δ} to {β,δ}• where δ = 10*1• Cover is {β,γ, δ,ε}
Example second expansion
• Expand δ = 10*1 to δ = 10**• Expand ε = 1101 to ζ = *101
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)
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
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)
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
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
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 = {β, γ, δ}
Example: continued
• Covering relations:– β is covered by {α, γ}– γ is covered by {β, δ}– δ is covered by {γ, ε}
• Minimum cover: γ U Er
Espresso Algorithm
• Compute the complement• Extract essentials• Iterate:
– expand, irredundant, reduce
• Cost functions:– cover cardinality Ø1
– weighed sum of cube and literal count Ø2
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);}
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
Top Related