ECE 667 - Synthesis & Verification 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Exact Two-level Minimization Quine-McCluskey Procedure.

Slides:



Advertisements
Similar presentations
FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary)
Advertisements

Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover.
Glitches & Hazards.
CSEE 4823 Advanced Logic Design Handout: Lecture #2 1/22/15
ECE C03 Lecture 31 Lecture 3 Two-Level Logic Minimization Algorithms Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ELEC Digital Logic Circuits Fall 2008 Logic Minimization (Chapter 3) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.
MVI Function Review Input X is p -valued variable. Each Input can have Value in Set {0, 1, 2,..., p i-1 } literal over X corresponds to subset of values.
Binary Recursion Tree The recursive Shannon expansion corresponds to a binary recursion tree Example: Path (v) to node v corresponds to cube c(v) Example:
Two-Level Logic Synthesis -- Heuristic Method (ESPRESSO)
Logic Synthesis 2 Outline –Two-Level Logic Optimization –ESPRESSO Goal –Understand two-level optimization –Understand ESPRESSO operation.
1 Consensus Definition Let w, x, y, z be cubes, and a be a variable such that w = ax and y = a’z w = ax and y = a’z Then the cube xz is called the consensus.
Totally Unimodular Matrices Lecture 11: Feb 23 Simplex Algorithm Elliposid Algorithm.
EDA (CS286.5b) Day 15 Logic Synthesis: Two-Level.
COE 561 Digital System Design & Synthesis Two-Level Logic Synthesis
COE 561 Digital System Design & Synthesis Two-Level Logic Synthesis Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum.
Chapter 3 Simplification of Switching Functions
Logic Synthesis Outline –Logic Synthesis Problem –Logic Specification –Two-Level Logic Optimization Goal –Understand logic synthesis problem –Understand.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 4: February 25, 2009 Two-Level Logic-Synthesis.
ENEE 6441 On Quine-McCluskey Method > Goal: find a minimum SOP form > Why We Need to Find all PIs? f(w,x,y,z) = x’y’ +wxy+x’yz’+wy’z = x’y’+x’z’+wxy+wy’z.
ECE Synthesis & Verification - Lecture 9b 1 ECE 697B (667) Fall 2004 ECE 697B (667) Fall 2004 Synthesis and Verification of Digital Systems Boolean.
Gate Logic: Two Level Canonical Forms
Irredundant Cover After performing Expand, we have a prime cover without single cube containment now. We want to find a proper subset which is also a cover.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.
1 Generalized Cofactor Definition 1 Let f, g be completely specified functions. The generalized cofactor of f with respect to g is the incompletely specified.
Winter 2014 S. Areibi School of Engineering University of Guelph
ECE 667 Synthesis and Verification of Digital Systems
Intro to Logic Synthesis 1 Introduction to Logic Synthesis Maciej Ciesielski Univ. of Massachusetts Amherst, MA.
ECE Synthesis & Verification, Lecture 17 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Technology.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization I.
1 Binary Recursion Tree The recursive Shannon expansion corresponds to a binary recursion tree Example: Path  (v) to node v corresponds to cube c  (v)
Two Level Logic Optimization. Two-Level Logic Minimization PLA Implementation Ex: F 0 = A + B’C’ F 1 = AC’ + AB F 2 = B’C’ + AB product term AB, AC’,
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization II.
2-Level Minimization Classic Problem in Switching Theory
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Synthesis of Two-Level Circuits
Combinatorial Algorithms Unate Covering Binate Covering Graph Coloring Maximum Clique.
Quine-McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: Identify prime implicants (implicant tables) Identify minimal PI.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Multi-Valued Logic.
2-Level Minimization Classic Problem in Switching Theory Tabulation Method Transformed to “Set Covering Problem” “Set Covering Problem” is Intractable.
Heuristic Two-level Logic Optimization Giovanni De Micheli Integrated Systems Centre EPF Lausanne This presentation can be used for non-commercial purposes.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.
Karnaugh map covering Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA)
UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.
Two Level Networks. Two-Level Networks Slide 2 SOPs A function has, in general many SOPs Functions can be simplified using Boolean algebra Compare the.
2-1 Introduction Gate Logic: Two-Level Simplification Design Example: Two Bit Comparator Block Diagram and Truth Table A 4-Variable K-map for each of the.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 4: October 5, 2005 Two-Level Logic-Synthesis.
Simplification of incompletely specified functions using QM Tech.
ECE2030 Introduction to Computer Engineering Lecture 8: Quine-McCluskey Method Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic.
1 ECE2030 Introduction to Computer Engineering Lecture 8: Quine-McCluskey Method Prof. Hsien-Hsin Sean Lee School of ECE Georgia Institute of Technology.
1 Quine-McCluskey Method. 2 Motivation Karnaugh maps are very effective for the minimization of expressions with up to 5 or 6 inputs. However they are.
3.2 Matchings and Factors: Algorithms and Applications This copyrighted material is taken from Introduction to Graph Theory, 2 nd Ed., by Doug West; and.
Two-Level Boolean Minimizer BOOM-II Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University Karlovo nam. 13,
Weikang Qian. Outline Intersection Pattern and the Problem Motivation Solution 2.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 15: March 4, 2002 Two-Level Logic-Synthesis.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
Boolean Functions 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Boolean Functions Basics Maciej Ciesielski Univ.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect10: Two-level Logic Minimization.
ICS 252 Introduction to Computer Design Lecture 8 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.
CS 721 Project Implementation of Hypergraph Edge Covering Algorithms By David Leung ( )
©2010 Cengage Learning SLIDES FOR CHAPTER 6 QUINE-McCLUSKEY METHOD Click the mouse to move to the next page. Use the ESC key to exit this chapter. This.
CS 352 Introduction to Logic Design
Synthesis of Two Level Circuits
ECB2212-Digital Electronics
Minimization of Switching Functions
Heuristic Minimization of Two Level Circuits
Heuristic Minimization of Two Level Circuits
CUT SET TRANSFORMATION
Presentation transcript:

ECE Synthesis & Verification 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Exact Two-level Minimization Quine-McCluskey Procedure Slides adopted (with permission) from A. Kuehlmann, UC Berkeley, 2003

ECE Synthesis & Verification 2 Outline QM Theorem Generating all primes – –Single output functions – –Multiple output functions Setting up a covering table Solving the Unate Covering Problem – –Reduction rules – –Solving cyclic core

ECE Synthesis & Verification 3 Quine-McCluskey Theorem Theorem (Quine): There is a minimum cover that is prime Proof: Consider a minimum cover that is not prime. Each non-prime implicant can be replaced by a prime implicant that covers it. Thus the resulting set of implicants is a cover and has the same cardinality as the original cover. Hence, there is a minimum cover that is prime. Given initial cover for F = (f,d,r), find a minimum cover G of primes where: f  G  f+d G is a prime cover of F ; f = on-set, r = off-set, d = don’t care set

ECE Synthesis & Verification 4 Quine-McCluskey Procedure (Exact) Q-M Procedure : 1. Generate all primes (f+d), call it {P i } 2. Generate all minterms of (f+d), call it {m i } 3. Build a covering (prime implicant) matrix B, where B ij = 1 if m i  P j = 0 otherwise = 0 otherwise 4. Solve the minimum column covering problem for B (unate covering problem), UCP.

ECE Synthesis & Verification 5 Covering table xyxy xyxy xyxy xyxy zwzw zwzw zw zwzw xzxz y’ w (on set) (don’t care set) Primes: y’ + w + x’z’ Example y’y’wx’z’ x y’z’w x’y zw x’y z’w x’y’z’w’

ECE Synthesis & Verification 6 Covering Table Recall: An essential prime is any prime that uniquely covers a minterm of f. Solution: {p 1,p 2 }   y + w is minimum prime cover. (Also w +  x  z) Possible approach (SAT): (p 1 +p 3 )(p 2 +p 3 )(p 1 +p 2 )p 2 Minterms of f y’y’wx’z’ x y’ z’w x’y z w x’y z’w x’y’ z’w’ Row singleton (essential minterm) Essential prime {p1 p2 p3} Primes of (f+d)

ECE Synthesis & Verification 7 Table reduction - Column Dominance Definition: A column P 1 whose 1-entries are a superset of another column P 2 is said to dominate P 2. Example: P 1 dominates P 2 (it has 1 everywhere P 2 has) P 1 P We can remove dominated column P 2 since P 1 covers all those rows and more. We would never choose P 2 in a minimum cover since it can always be replaced by P 1.

ECE Synthesis & Verification 8 Row Dominance and equality Definition: A row m 1 whose set of primes contains the set of primes of row m 2 is said to dominate m 2.. Example: m m m 1 dominates m 2 : it has 1 everywhere m 2 has 1 Dominating row We can remove dominating row m 1 : any prime that covers m 2 also covers m 1 (covered automatically). Row Equality: In practice, many rows are identical. That is there exist minterms that are contained in the same set of primes.

ECE Synthesis & Verification 9 Difficulty The size of table: ~ 2 n minterms ~ 3 n /n primes We have O(2 n ) rows and O(3 n /n ) columns AND minimum covering problem is NP-complete. Hence it can probably be double exponential in size of input, i.e. difficulty is O(2 3 n ) n /n minterms primes 2n2n

ECE Synthesis & Verification 10 Pruning the Covering Table 1.Remove all rows covered by essential primes (columns in row singletons). Put these primes in the cover G. 2. Group identical rows together and remove dominating rows. 3. Remove dominated columns. For equal columns, keep one prime to represent them. 4. Newly formed row singletons define essential primes. 5. Go to step 1 if covering table decreased. The resulting reduced covering table is called the cyclic core. This has to be solved (unate covering problem). A minimum solution is added to G (set of essential primes). The resulting G is a minimum cover.

ECE Synthesis & Verification 11 Example Cyclic Core Essential primes + column dominance: G = P1 + P3 Essential prime + column dominance G = P1 Row dominance P4 dominates P7 P1 is essential P3 dominates P2 P3 is essential

ECE Synthesis & Verification 12 Solving the Cyclic Core Best known method (for unate covering) is branch and bound with some clever bounding heuristics. Independent Set Heuristic: – –Find a maximum set of “independent” rows I. – –Two rows B i, B k are independent if they have no column in common Example: Covering matrix B rearranged with independent sets first. I = Independent set of rows B = A 1 C

ECE Synthesis & Verification 13 Lemma: | Cover |  | I | Solving the Cyclic Core A 1 C I

ECE Synthesis & Verification 14 Heuristic Let I = { I 1, I 2, …, I k } be the independent set of rows 1. 1.Choose column j  I i which covers the most rows of A Put j  J 3. 3.Eliminate all rows covered by column j 4. 4.Update I  I \ {I i } 5. 5.If | I |  0, go to step If B is empty, then done (in this case we have the guaranteed minimum solution, |J| = |I |) else, choose an independent set of B and go to A 1 C Can you think of some Improved heuristics? What about weighted optimization problem: min  w i ?

ECE Synthesis & Verification 15 Branch and Bound Algorithm (generic)

ECE Synthesis & Verification 16 Generating Primes - single output func. Tabular method (based on consensus operation): Start with all minterm canonical form of F Group pairs of adjacent minterms into cubes Repeat merging cubes until no more merging possible; mark (  ) + remove all covered cubes. Result: set of primes of f. Example: F = x’ y’ + w x y + x’ y z’ + w y’ z w’ x’ y’ z’  w’ x’ y’ z  w’ x’ y z’  w x’ y’ z’  w x’ y’ z  w x’ y z’  w x y z’  w x y’ z  w x y z  w’ x’ y’  w’ x’ z’  x’ y’ z’  x’ y’ z  x’ y z’  w x’ y’  w x’ z’  w y’ z w y z’ w x y w x z x’ y’ x’ z’ F = x’ y’ + w x y + x’ y z’ + w y’ z

ECE Synthesis & Verification 17 Generating Primes – multiple outputs Procedure similar to single-output function, except: – –include also the primes of the products of individual functions Example: x y z 0 – – 1 f 1 f x y z 0 – – – – 1 f 1 f x y z f1f1 f2f2 101

ECE Synthesis & Verification 18 Generating Primes - example Modification (w.r.t single output function): – –When two adjacent implicants are merged, the output parts are intersected There are five primes listed for this two-output function. - What is the min cover ? f2f f1f | 01  010 | 01  011 | | 10  111 | 10  0 – 0 | – | 01 – 1 1 | 10 1 – 1 | 10 x y z 0 – – – – 1 f 1 f

ECE Synthesis & Verification 19 Minimize multiple-output cover - example List multiple-output primes Create a covering table, solve f1f1 f2f p 1 = | 11 p 2 = 0 – 0 | 01 p 3 = 0 1 – | 01 p 4 = – 1 1 | 10 p 5 = 1 – 1 | | | | | | | 10 IMPORTANT: Multiple-output minterms must be split into individual, single-output cubes to solve covering p 1 p 2 p 3 p 4 p 5 Min cover has 3 primes: F = { p 1, p 2, p 5 }

ECE Synthesis & Verification 20 Summary Q-M: 1. Generate cover of all primes 2. Make G irredundant (in optimum way) Note: Q-M is exact i.e., it gives an exact minimum Heuristic Methods: 1.Generate (somehow) a cover of F using some of the primes 2.Make G irredundant (maybe not optimally) 3.Keep best result - try again (go to 1)