Download Two Level Logic Minimization in VLSI and Advanced Digital Design - Prof. Vincent Mooney and more Study notes Electrical and Electronics Engineering in PDF only on Docsity! ECE 3060 VLSI and Advanced Digital Design Lecture 10 Two Level Logic Minimization ECE 3060 Lecture 10–2 Motivation • We will study modern techniques for manipulating and minimizing boolean functions • Issue: Tractibility of minimization problem for large number of variables • Exact methods • Heuristic methods • Issue: Representation of boolean expressions in a form conducive to boolean operations • Implicant tables • Binary decision diagrams • Issue: Manipulation of realistic multilevel networks • Graph representations • multilevel minimization • Technology mapping ECE 3060 Lecture 10–5 Definitions • Boolean variable: • Boolean literal: or • Product or cube: product of literals • Implicant: product term implying a value of a function (usually TRUE) • binary hypercube in the boolean space • Minterm: product using all input variables implying a value of a function (usually TRUE) • vertex in the boolean space a B∈ a a ECE 3060 Lecture 10–6 Tabular Representations • Truth table • list of all minterms of a function • Implicant table or cover • list of all implicants of a function sufficient to define the function • Comment: • Implicant tables are smaller in size • Example Cover 001 10 *11 11 101 01 11* 11 x ab ac+= y ab bc ac+ += abc xy ECE 3060 Lecture 10–7 Cube Representation • • + + + 000 100 110 010 001 011 111 c a b 101 F abc abc abc abc abc+ + + += F = ab bc ac ab ECE 3060 Lecture 10–10 Minimal or Irredundant Cover • Cover of the function that is not a proper superset of another cover • no implicant can be dropped • local optimum 000 100 110 001 011 111 c a b 101 010 ECE 3060 VLSI and Advanced Digital Design Lecture 10 Two Level Logic Minimization ECE 3060 Lecture 10–2 Motivation • We will study modern techniques for manipulating and minimizing boolean functions • Issue: Tractibility of minimization problem for large number of variables • Exact methods • Heuristic methods • Issue: Representation of boolean expressions in a form conducive to boolean operations • Implicant tables • Binary decision diagrams • Issue: Manipulation of realistic multilevel networks • Graph representations • multilevel minimization • Technology mapping ECE 3060 Lecture 10–5 Definitions • Boolean variable: • Boolean literal: or • Product or cube: product of literals • Implicant: product term implying a value of a function (usually TRUE) • binary hypercube in the boolean space • Minterm: product using all input variables implying a value of a function (usually TRUE) • vertex in the boolean space a B∈ a a ECE 3060 Lecture 10–6 Tabular Representations • Truth table • list of all minterms of a function • Implicant table or cover • list of all implicants of a function sufficient to define the function • Comment: • Implicant tables are smaller in size • Example Cover 001 10 *11 11 101 01 11* 11 x ab ac+= y ab bc ac+ += abc xy ECE 3060 Lecture 10–7 Cube Representation • • + + + 000 100 110 010 001 011 111 c a b 101 F abc abc abc abc abc+ + + += F = ab bc ac ab ECE 3060 Lecture 10–10 Minimal or Irredundant Cover • Cover of the function that is not a proper superset of another cover • no implicant can be dropped • local optimum 000 100 110 001 011 111 c a b 101 010 ECE 3060 Lecture 10–11 Minimal Cover with respect to single-implicant containment • no implicant is contained by any other implicant • weak local optimum 000 100 110 010 001 011 111 c a b 101 ECE 3060 Lecture 10–12 Logic Minimization • Exact methods: • compute minimum cover • often intractable for large functions • based on Quine-McCluskey method • Heuristic methods: • Compute minimal cover (possibly minimum) • There are a large variety of methods and programs • academic: MINI, PRESTO, ESPRESSO (UCBerkeley) • industry: Synopsys, Cadence, Mentor Graphics, Zuken ECE 3060 Lecture 10–15 Prime Implicant Table • Rows: minterms • Columns: prime implicants • Exponential size: for a function • minterms • up to prime implicants f :Bn B→ 2n 3n n⁄ ECE 3060 Lecture 10–16 Example • Function: • Choose cover by selecting a set of implicants which cover all minterms. f abc abc abc abc abc+ + + += • Primes: • Implicant Table: Label PIs 00* *01 1*1 11* α β γ δ Minterms Primes 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 α β γ δ abc abc abc abc abc ECE 3060 Lecture 10–17 Cube Representation 000 100 110 001 011 111 c a b 101 010 000 100 110 001 011 111 101 010 (a) prime implicants (b) minimum cover ECE 3060 Lecture 10–20 Matrix representation • View implicant table of some function as Boolean matrix: • the ith minterm is covered by the jth prime implicant • The (Boolean) selection vector selects which prime implicants will be in the cover. • To cover , find an which satisfies • i.e. select enough columns to cover all rows • To find a minimum cover, minimize cardinality of , i.e. the number of nonzero entries of . f A aij 1=( ) ⇒ x f x yi 1 i∀≥ Ax y= x x ECE 3060 Lecture 10–21 Example • The magnitude of indicates the number of prime implicants which cover the ith minterm. yi 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 1 1 2 1 1 1 = ECE 3060 Lecture 10–22 Branch and Bound Algorithm • Exact algorithm, but not polynomial time. • First step: • Remove Essential Prime Implicants (EPIs) which are columns incident to one (or more) row(s) with a single 1 in them. • Modify by removing the column and incident rows • Example: rows 1 and 5 from previous matrix becomes A 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 A= 1 1 ECE 3060 Lecture 10–25 Branching Algorithm • Remove essential primes from consideration. • Perform a depth-first search of remaining covers. • Bounding algorithm used to prune search tree. α C∈ β C∈ α C∉ β C∉ γ C∉γ C∈ ECE 3060 Lecture 10–26 Branch and Bound Algorithm EXACT_COVER( , , ) { /* is current best estimate */ Reduce matrix and update corresponding ; Calculate current_estimate for this branch; /* we don’t cover this */ if (current_estimate >= | |) return ( ); if ( has no rows) return ( ); Select a branching column ; ; /* this changes element in */ = after deleting column and rows incident to ; = EXACT_COVER( , , ); if ; ; = after deleting column ; = EXACT_COVER( , , ); if ; return ( ); } A x b b A x b b A x c xc 1= c x à A c c x̃ à x b x̃ b<( ) b x̃̃= xc 0= à A c x̃ à x b x̃ b<( ) b x̃= b ECE 3060 Lecture 10–27 Example • Consider , , There are no essential primes, and no row or column dominance. • Denote the implicants and the minterms as • Choose (i.e. ) A 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 1 = x x1 x2 x3 x4 x5 = b 1 1 1 1 1 = P j μi P1 c 1=