Two-Level Logic Synthesis -- Quine-McCluskey Method.

Slides:



Advertisements
Similar presentations
Minimization of Circuits
Advertisements

IKI b-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from Prof. Daniel Gajski’s.
K-Map Simplification COE 202 Digital Logic Design Dr. Aiman El-Maleh
Based on slides by: Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 8 – Systematic Simplification.
1 Combinational Logic Network design Chapter 4 (continued ….)
ECE 3110: Introduction to Digital Systems Simplifying Sum of Products using Karnaugh Maps.
ELEC Digital Logic Circuits Fall 2008 Logic Minimization (Chapter 3) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.
Two-Level Logic Synthesis -- Heuristic Method (ESPRESSO)
Boolean Algebra.
Quine-McClusky Minimization Method Module M4.3 Section 5.3.
Gate-Level Minimization. Digital Circuits The Map Method The complexity of the digital logic gates the complexity of the algebraic expression.
Computer Logic and Digital Design Chapter 2 Henry Hexmoor AND logic
Examples Simplify: ab’c + abc + a’bc Show that X + X’Y = X + Y
Chapter 3 Simplification of Switching Functions
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.
SYEN 3330 Digital Systems Jung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 – Part 6.
Quine-McClusky Minimization Method Discussion D3.2.
Proving Incompleteness {NAND} is a complete system Is {XOR,0} a complete system?
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
Computer Engineering (Logic Circuits) (Karnaugh Map)
Logic gate level Part 3: minimizing circuits. Improving circuit efficiency Efficiency of combinatorial circuit depends on number & arrangement of its.
SYEN 3330 Digital Systems Jung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 – Part 5.
EECC341 - Shaaban #1 Lec # 7 Winter Combinational Circuit Minimization Canonical sum and product logic expressions do not provide a circuit.
Computer Architecture I: Digital Design Dr. Robert D. Kent Lecture 3 Simplification of Boolean Expressions.
IKI a-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization I.
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’,
BOOLEAN FUNCTION PROPERTIES
Synthesis of Two-Level Circuits
Organizational Remarks
Department of Computer Engineering
Combinatorial Algorithms Unate Covering Binate Covering Graph Coloring Maximum Clique.
Chapter 3. Minimization of Switching Functions. Given a sw function f(x 1, x 2, …, x n ) and some cost criteria, find a representation of f which minimizes.
The covering procedure. Remove rows with essential PI’s and any columns with x’s in those rows.
Gate-Level Minimization Chapter 3. Digital Circuits The Map Method The complexity of the digital logic gates the complexity of the algebraic expression.
Quine-McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: Identify prime implicants (implicant tables) Identify minimal PI.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
CS2100 Computer Organisation
ECE 3110: Introduction to Digital Systems Symplifying Products of sums using Karnaugh Maps.
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.
Boolean Algebra Introduction Logical arguments are valid (or not) by virtue of their form, not content Example All men are mortal(premise 1) Harry is a.
Gate-level Minimization
Computer Engineering (Logic Circuits) (Karnaugh Map)
Chapter 3 The Karnaugh Map
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
June 12, 2002© Howard Huang1 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are.
1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral.
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.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
ECE/CS 352 Digital System Fundamentals1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 2 – Part 6 Tom Kaminski & Charles R. Kime.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
Computer Organisation
Chapter 4 Simplification of Boolean Functions Karnaugh Maps
Lecture 5 Topics Canonical or Standard Forms of Functions
3-7 Other Two-level Implementations
Synthesis of Two Level Circuits
Chapter 3 Gate-level Minimization.
MINTERMS and MAXTERMS Week 3
Minimization of Switching Functions
Overview Part 2 – Circuit Optimization
Presentation transcript:

Two-Level Logic Synthesis -- Quine-McCluskey Method

ENEE 6442 Two-Level Logic > What is Two-Level Logic? > Why Two Levels? =Universal =Speed =Simplicity > Typical Two Level Circuits: AND-OR, OR-AND, NAND-NAND, NOR-NOR > Cost Functions in Two-Level Circuits =Number of gates =Number of fanin (gate inputs)

ENEE 6443 Quine’s PI Theorem > Review: Implicants and PIs: Let f: B n  B =A minterm is an implicant in which all literals appear exclusively =An implicant with k literals has 2 n-k such minterms, who share these k literals. =An implicant l 1 l k is prime iff l 1 l j-1 l j+1 l k is not an implicant for all 1  j  k. =In the cubical representation, for an implicant with k literals, k = n: a vertex (minterm)k = n: a vertex (minterm) k = n-1: an edgek = n-1: an edge k = k: an (n-k)-dimension face (plane)k = k: an (n-k)-dimension face (plane) z x y xy’z’ xy’z xyzx’yz xyz’ yz x > (Quine’s Theorem [1952]) A minimal SOP must always consist of a sum of prime implicants. > Minimal in terms of number of literals

ENEE 6444 Computing PIs: Tabular Method f(w,x,y,z) = x’y’ + wxy + x’yz’ + wy’z 1.Rewrite in minterm canonical form; f(w,x,y,z) = (wx’y’z+wx’y’z’+w’x’y’z+w’x’y’z’)+ (wxyz+wxyz’)+(wx’yz’+w’x’yz’)+(wxy’z+wx’y’z) 2.Group by number of complement literals; Merge terms in adjacent groups; -- distance-1 merging Xy + Xy’ = X -- distance-1 merging 4.Repeat step 3. until no new term is created.

ENEE 6445 f(w,x,y,z) = (wx’y’z+wx’y’z’+w’x’y’z+w’x’y’z’)+ (wxyz+wxyz’)+(wx’yz’+w’x’yz’)+(wxy’z) xw’x’y’z’ xw’x’z’xw’x’yz’ xw’x’y’xw’x’y’z xx’y’z’xwx’y’z’ xx’yz’ xwx’z’ x’z’xx’y’zxwx’yz’ x’y’xwx’y’xwx’y’z wy’zxwxy’z wyz’xwxyz’ wxzwxyxwxyz More on Quine’s Method:  Easy to implement  Can handle don’t cares  inefficient Check for: Xy + Xy’ = X All prime implicants: All prime implicants: wxy, wxz, wyz’, wxy, wxz, wyz’, wy’z, x’y’, x’z’ wy’z, x’y’, x’z’

ENEE 6446 Computing PIs: Iterated Consensus Method > Start with: SOP standard form (as compared to the canonical form in Tabular Method) > Goal: sum of all PIs-- complete sum > Basic idea: xY + x’Z = xY + x’Z + YZ -- consensus law > Theorem: A SOP formula is a complete sum iff =No term includes any other term; =The consensus of any two terms either does not exist or is contained in some term.

ENEE 6447 Example: Iterated Consensus Method f(w,x,y,z)= wx + x’y + xyz = wx + x’y + xyz + wy = wx + x’y + xyz + wy + yz = wx + x’y + wy + yz  Start with any SOP form  Need to compare every pair of terms Do they have consensus? Does one contain the other? xY + x’Z = xY + x’Z + YZ

ENEE 6448 Computing PIs: Recursive Method > Basic idea: if F 1 and F 2 are complete sums, the complete sum of F 1 F 2 can be obtained by: =Expanding F 1 and F 2 to POS (Boole’s Expansion) =Multiplying out F 1 and F 2 by distributive law =Applying x x=x and x x’=0 =Eliminating all terms that are contained in others > Example: f(w,x,y,z) = (w+x)(x’+y)(y+z) = (wx’+wy+xx’+xy)(y+z) = wx’y+wx’z+wyy+wyz+xyy+xyz = wy+xy+wx’y+wx’z+wyz+xyz = wy+xy+wx’z

ENEE 6449 Computing the PIs: Recursive Method > Given f(x,y,z….)= (x’ + f(1,y,z..))(x + f(0,y,z…)) (Boolean Expansion) > C-S(f) = ABSORB((x’ +C-S(f(1,y,z..))(x + C- S(f(0,y,z…))) > Essentially a recursive procedure. ABSORB is a manifestation of the result outlined in the previous slide.

ENEE f(w,x,y,z)=w’y’z+xyz+wyz’+wx’y’ Compute Complete Sum by Recursion Tree f(0,x,y,z)=y’z+xyz = (y+z)(y’+xz) = y’z+xz f(0,x,0,z) = z f(0,x,1,z) = xz = (x+0)(x’+z) = xz f(0,0,1,z)=0f(0,1,1,z)=z f(1,x,y,z)= xyz+yz’+x’y’ =(y+x’)(y’+x+z’) =xy+yz’+x’y’+x’z’ =xy+yz’+x’y’+x’z’ f(1,x,0,z) = x’ f(1,x,1,z) = xz+z’ = (z+1)(z’+x) = x+z’ f(1,x,1,0) =1 f(1,x,1,1) = x w y y z x z z 0 x’ x 1 f(w,x,y,z) f(w,x,y,z) = (w+y’z+xz)(w’+xy+yz’+x’y’+x’z’) = wxy+wyz’+wx’y’+wx’z’+w’y’z+x’y’z+w’xz+xyz f(x)= (x + f(0)) (x’+f(1))

ENEE Quine-McCluskey Method Problem: Given a Boolean function f (may be incomplete), find a minimum cost SOP formula. Q-M Procedure: 1.Generate all the PIs of f, {P j } 2.Generate all the minterms of f, {m i } 3. Build the Boolean constraint matrix B, where B ij is 1 if m i  P j and is 0 otherwise 4. Solve the minimum column covering problem for B # of literals

ENEE Example: Quine-McCluskey Method 11 wx’y’z 11 wxy’z 1 w’x’yz’ 11 wx’yz’ 11 wxyz’ 11 wxyz 11 w’x’y’z’ 1 w’x’y’z 11 wx’y’z’x’z’x’y’wy’zwyz’wxzwxy minimum cover(s): {x’y’, x’z’,wxy, wxz}, {x’y’, x’z’,wxy, wy’z}, {x’y’, x’z’,wxz, wyz’}. f(w,x,y,z) = x’y’ + wxy + x’yz’ + wy’z

ENEE More 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 = x’y’+x’z’+wxy+wxz = x’y’+x’z’+wxz+wyz’ > How We Find Them? =Quine’s tabular: start with minterm, the smallest I =Iterated consensus: complete sum theorem =Recursive: complete sum theorem 1.Are all terms PIs? 2.Is the form optimal? 3.Is the form unique?

ENEE z Quine’s PI Theorem > Review: Implicants and PIs: Let f: B n  B =A minterm is an implicant if the corresponding discriminant is 1. =An implicant with k literals has 2 n-k such minterms, who share these k literals. =An implicant l 1 l k is prime iff l 1 l j-1 l j+1 l k is not an implicant for all 1  j  k. =In the cubical representation, for an implicant with k literals, k = n: a vertex (minterm)k = n: a vertex (minterm) k = n-1: an edgek = n-1: an edge k = k: an (n-k)-dimension face (plane)k = k: an (n-k)-dimension face (plane) x y xy’z’ xy’z xyzx’yz xyz’ yz x > (Quine’s Theorem [1952]) A minimal SOP must always consist of a sum of prime implicants.

ENEE > Testability > Stuck-at-0/1 Fault Model > Redundant Gate > Untestable Fault An area-optimal circuit must be fully testable for stuck-at faults. Testability Stuck-at-0?001? Stuck-at-0? A 3 =1: y=1, z=1 A 1 =0: x=0 A 2 =x’z=1 zy A3A3A3A3yxzx’ A1A1A1A1 A2A2A2A2