Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization I.

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
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Sum of Products.
Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.
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:
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.
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.
Multi-Valued Input Two-Valued Output Functions. Multi-Valued Input Slide 2 Example Automobile features 0123 X1X1 TransManAuto X2Doors234 X3ColourSilverRedBlackBlue.
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
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 Synthesis & Verification 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Exact Two-level Minimization Quine-McCluskey Procedure.
ECE 667 Synthesis and Verification of Digital Systems
Intro to Logic Synthesis 1 Introduction to Logic Synthesis Maciej Ciesielski Univ. of Massachusetts Amherst, MA.
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.
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
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.
COE 561 Digital System Design & Synthesis Two-Level Logic Synthesis Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum.
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.
Chapter 6 Quine-McCluskey Method Mei Yang ECG Logic Design 1.
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.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 5: Quine-McCluskey Method José Nelson Amaral.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic.
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.
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Combinational Logic Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
ECE Synthesis & Verification - Lecture 3/4 1 ECE 697B (667) Fall 2004 ECE 697B (667) Fall 2004 Synthesis and Verification of Digital Systems Two-level.
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.
©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.
Logic Synthesis Boolean Division.
Lecture 6 Quine-McCluskey Method
Heuristic Minimization of Two-Level Logic
Plotting functions not in canonical form
CS 352 Introduction to Logic Design
Synthesis of Two Level Circuits
ECE 331 – Digital System Design
Digital Logic & Design Dr. Waseem Ikram Lecture 12.
CHAPTER 5 KARNAUGH MAPS 5.1 Minimum Forms of Switching Functions
COE 202: Digital Logic Design Combinational Logic Part 3
ECB2212-Digital Electronics
Minimization of Switching Functions
Heuristic Minimization of Two Level Circuits
Heuristic Minimization of Two Level Circuits
ECE 331 – Digital System Design
Presentation transcript:

Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization I

2 Quine-McCluskey Procedure (Exact) Given G’ and D (covers for F = (f,d,r) and d), find a minimum cover G of primes where: f  G  f+d (G is a prime cover of F ) Q-M Procedure: 1. Generate all the primes of F, {P j } (i.e. primes of (f+d)=G’+D) 2. Generate all the minterms of f=G’  D, {m i } 3. Build Boolean matrix B where B ij = 1 if m i  P j = 0 otherwise 4. Solve the minimum column covering problem for B (unate covering problem)

3 Difficulty Note: Can be ~ 2 n minterms ~ 3 n /n primes Thus O(2 n ) rows and O(3 n /n ) columns AND minimum covering problem is NP-complete. (Hence can probably be double exponential in size of input, i.e. difficulty is O(2 3 n ) n /n minterms primes 2n2n

4 Example Primes:  y + w +  x  z Covering Table Solution: {1,2}   y + w is minimum prime cover. (also w+  x  z) 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 Karnaugh map yy w xzxz x  y  zw  xyzw  xy  zw xyzwxyzw

5 Covering Table Definition: An essential prime is any prime that uniquely covers a minterm of f. yy w xzxz x  y  zw  xyzw  xy  zw xyzwxyzw Primes of f+d Minterms of f Essential prime Row singleton (essential minterm)

6 Covering Table Row Equality: In practice, many rows are identical. That is there exist minterms that are contained in the same set of primes. m m Any row can be associated with a cube -- called the signature cube. e.g. m 1  m 2  P 2 P 4 P 5 P 7

7 Row and Column Dominance Definition: A row i 1 whose set of primes is contained in the set of primes of row i 2 is said to dominate i 2. Example: i i i 1 dominates i 2 We can remove row i 2, because we have to choose a prime to cover i 1, and any such prime also covers i 2. So i 2 is automatically covered.

8 Row and Column Dominance Definition: A column j 1 whose rows are a superset of another column j 2 is said to dominate j 2. Example: j 1 dominates j 2 We can remove column j 2 since j 1 covers all those rows and more. We would never choose j 2 in a minimum cover since it can always be replaced by j 1. j 1 j

9 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 dominated rows. 3. Remove dominated columns. For equal columns, keep one prime to represent them. 4. Newly formed row singletons define n-ary essential primes. 5. Go to 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 - the set of n-ary essential primes. The resulting G is a minimum cover.

10 Example n-ary Essential Prime and Column Dominance G=P1 + P3 Essential Prime and Column Dominance G=P1 Row dominance Cyclic Core

A 1 C 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 1,B i 2 are independent if  j such that B i 1j =B i 2j =1. (They have no column in common) Example: Covering matrix B rearranged with independent sets first. Independent set = I of rows B=

12 Lemma: |Solution of Covering|  |I| A 1 C Solving the Cyclic Core

13 Heuristic Let I={I 1, I 2, …, I k } be the independent set of rows choose j  I i which covers the most rows of A. Put j  J eliminate all rows covered by column j I  I\{I i } go to 1 if |I|  0 If B is empty, then done (in this case we have the guaranteed minimum solution - IMPORTANT) If B is not empty, choose an independent set of B and go to A 1 C

14 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 Courtesy: Maciej Ciesielski, UMASS

15 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 Can also represent it as: x y z 0 – – – – 1 f 1 f x y z f1f1 f2f2 101

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

17 Minimize multiple-output cover - example List multiple-output primes 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 listed twice p 1 p 2 p 3 p 4 p 5 Min cover has 3 primes: F = { p 1, p 2, p 5 } Create a covering table, solveCreate a covering table, solve

18 Generating Primes We use the unate recursive paradigm. The following is how the merge step is done. (Assumption: we have just generated all primes of and.) Theorem: p is a prime of f iff p is maximal among the set consisting of P = x i q, q is a prime of, P = x i r, r is a prime of, P = qr, q is a prime of, r is a prime of

19 Generating Primes Example: Assume q = abc is a prime of. Form p=x i abc. Suppose r=ab is a prime of. Then is an implicant of f Thus abc and x i ab are implicants, so x i abc is not prime. Note: abc is prime because if not, ab  f x (or ac or bc) contradicting abc prime of Note: x i ab is prime, since if not then either ab  f or x i a  f. The first contradicts abc prime of and the second contradicts ab prime of

20 Quine-McCluskey 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  using some of the primes 2.Make G irredundant (maybe not optimally) 3.Keep best result - try again (i.e. go to 1)

21 Generalized Cofactor Definition: Let f, g be completely specified functions. The generalized cofactor of f with respect to g is the incompletely specified function: Definition: Let  = (f, d, r) and g be given. Then

22 Relation with Shannon Cofactor Let g=x i. Shannon cofactor is Generalized cofactor with respect to g=x i is Note that In fact f x i is the unique cover of co(f, x i ) independent of the variable x i.

23 Shannon Cofactor off on Don’t care

24 Shannon Cofactor (Cont.) So

25 Properties of Generalized Cofactor Generalized Cofactor We will get back to use of generalized cofactor later Shannon Cofactor