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.

Slides:



Advertisements
Similar presentations
Three Special Functions
Advertisements

FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary)
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.
CSEE 4823 Advanced Logic Design Handout: Lecture #2 1/22/15
Transportation Problem (TP) and Assignment Problem (AP)
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.
The Simplex Method: Standard Maximization Problems
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)
Branch and Bound Searching Strategies
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.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
EDA (CS286.5b) Day 15 Logic Synthesis: Two-Level.
Chapter 3 Simplification of Switching Functions
Sequential System Synthesis -- Incompletely Specified Machines.
Two-Level Logic Synthesis -- Quine-McCluskey Method.
MAE 552 – Heuristic Optimization Lecture 26 April 1, 2002 Topic:Branch and Bound.
Karnaugh Maps for Simplification
ECE Synthesis & Verification - Lecture 9b 1 ECE 697B (667) Fall 2004 ECE 697B (667) Fall 2004 Synthesis and Verification of Digital Systems Boolean.
1 Branch and Bound Searching Strategies 2 Branch-and-bound strategy 2 mechanisms: A mechanism to generate branches A mechanism to generate a bound so.
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.
Quine-McClusky Minimization Method Discussion D3.2.
Ch 13 – Backtracking + Branch-and-Bound
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 Architecture I: Digital Design Dr. Robert D. Kent Lecture 3 Simplification of Boolean Expressions.
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’,
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization II.
BOOLEAN FUNCTION PROPERTIES
2-Level Minimization Classic Problem in Switching Theory
Synthesis of Two-Level Circuits
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.
Quine-McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: Identify prime implicants (implicant tables) Identify minimal PI.
2-Level Minimization Classic Problem in Switching Theory Tabulation Method Transformed to “Set Covering Problem” “Set Covering Problem” is Intractable.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
ICS 252 Introduction to Computer Design Lecture 10 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.
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.
Computer Engineering (Logic Circuits) (Karnaugh Map)
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
1 Branch and Bound Searching Strategies Updated: 12/27/2010.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
An Algorithm for the Traveling Salesman Problem John D. C. Little, Katta G. Murty, Dura W. Sweeney, and Caroline Karel 1963 Speaker: Huang Cheng-Kang.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 15: March 4, 2002 Two-Level Logic-Synthesis.
June 12, 2002© Howard Huang1 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are.
EMIS 8373: Integer Programming Column Generation updated 12 April 2005.
1 Digital Design Debdeep Mukhopadhyay Associate Professor Dept of Computer Science and Engineering NYU Shanghai and IIT Kharagpur.
Chapter 13 Backtracking Introduction The 3-coloring problem
Custom Computing Machines for the Set Covering Problem Paper Written By: Christian Plessl and Marco Platzner Swiss Federal Institute of Technology, 2002.
Boolean Functions 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Boolean Functions Basics Maciej Ciesielski Univ.
Branch and Bound Searching Strategies
ICS 252 Introduction to Computer Design Lecture 8- Heuristics for Two-level Logic Synthesis Winter 2005 Eli Bozorgzadeh Computer Science Department-UCI.
CS 721 Project Implementation of Hypergraph Edge Covering Algorithms By David Leung ( )
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
3-7 Other Two-level Implementations
CS 352 Introduction to Logic Design
Lecture 3 Gunjeet Kaur Dronacharya Group of Institutions
ICS 252 Introduction to Computer Design
Synthesis of Two Level Circuits
Branch and Bound.
ECB2212-Digital Electronics
Minimization of Switching Functions
Heuristic Minimization of Two Level Circuits
Heuristic Minimization of Two Level Circuits
ICS 252 Introduction to Computer Design
Karnaugh maps Last time we saw applications of Boolean logic to circuit design. The basic Boolean operations are AND, OR and NOT. These operations can.
Presentation transcript:

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 = 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 Are all terms PIs? 2.Is the form optimal? 3.Is the form unique?

ENEE 6442 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 6443 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

Two-Level Logic Synthesis -- Unate Covering Problem

ENEE 6445 Unate and Binate > A function f(x 1,x i x n ) is positive unate in x i if its cofactor Negative unate is defined in a similar way. If a function is neither positive unate nor negative unate in a variable, it is called binate in this variable. A function is positive/negative unate if it is so for all variables, otherwise it is called binate. > Example: f(x,y,z) = xy + xz’ + yz’ =f is positive unate in x: f x =y+z’+yz’, f x’ =yz’ =f is positive unate in y: f y =x+xz’+z’, f y’ =xz’ =f is negative unate in z: f z =xy, f z’ =xy+x+y

ENEE 6446 Unate Covering Problem (UCP) > Let M mxn be a Boolean matrix (like the constraint matrix in Q-M), the UCP is to find a minimum number of columns to cover M in the sense that any row with a 1-entry has at least one of its 1- entries covered by these columns. 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 Solutions to UCP: {x’y’, x’z’,wxy, wxz}, {x’y’, x’z’,wxy, wy’z}, {x’y’, x’z’,wxz, wyz’}.

ENEE 6447 Reduction Techniques 1. Check for essential columns and remove them; 2. Check for row dominance and remove all dominating rows; 3. Check for column dominance and remove all dominated columns; 4. Repeat 1, 2, 3 if there is any removal occurs. What is left? =If no rows/columns left, we find an optimal solution; =Otherwise, this UCP instance is called cyclic.

ENEE 6448 Essential Columns > A column is essential if it covers one 1-entry that cannot be covered by any other columns. 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 Essential columns can be removed because any cover must include them. Column x’y’ is essential because of row w’x’y’z.

ENEE 6449 Row Dominance > Row r i dominates row r j if r i has all the 1-entries in r j. r i is dominating and r j is dominated. 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 Row wx’y’z’ dominates rows w’x’y’z and w’x’yz’ Dominating rows can be removed because that whenever one of their dominated rows is covered, they are covered as well.

ENEE Column Dominance > Column p i dominates p j if p i has all the 1-entries in p j and p i costs (e.g., number of literals) no more than p j. Suppose all columns have the same cost, then column 2 dominates 1, 3, and 4. Columns 3 and 4 dominate each other. Dominated columns can be removed because that their dominating columns cover all their 1-entries with no more cost. (optimal solutions may be lost, but at least one is guaranteed.)

ENEE Example: Reduction Techniques 1. 1.No essential columns; 2.Row 1,4, and 6 dominates 2, 3, and 5 respectively; 3. 3.Column 2 dominates 1 and 3, columns 4 and 5 dominate each other; 4.Now both columns become essential.

ENEE Example: Cyclic UCP No essential columns; No row dominance; No column dominance; > Reduction technique stops. > Normally multiple solutions exist in such case. > How to find one optimal? =Implicit enumeration (exhaustive search) =Branch and bound

ENEE Branch and Bound Exhaustive search directed by easily computable bounds. Approach: 1. 1.Generate simpler instances of the same problem; 2. 2.Compute bound for each simpler instances; 3. 3.if there is direct solution better than all the bounds, stop; 4. 4.else go to step 1 for the instance with best bound; Example: traveling salesman ACDB

ENEE Branch and Bound Algorithm > How to split? =One particular column is selected or not. > What is a lower bound? =Graph version and MIS > Why do we need an upper bound? =Early truncation of branches in the decision tree > What can be an upper bound? =All columns =The current best solution

ENEE MIS: Lower Bound for UCP Convert the constraint matrix to graph: Rows  nodes If two rows have one common 1-entry  an edge UCP and MIS: A pair of unconnected nodes An independent set A maximal independent set The number of columns in a solution to UCP cannot be less than the size of a MIS. MIS_QUICK: a heuristic to find a MIS

ENEE Pseudo-Code: Branch and Bound 1. Apply reduction techniques until they stop; 2. Calculate the lower/upper bounds; 3. Pick one column and split into two branches; 4. Check one branch >If the lower bound of this branch is larger than the current upper bound of the UCP, cut this branch; >Branch and Bound on this branch; 5. Check the other branch; 6. Report the current solution.

ENEE > The End

ENEE Review: Computing All PIs > Goal: simplification > Why only PIs? (Quine’s Theorem) > How to find all PIs? =Quine’s tabular method =Iterated consensus method (if xY and x’Z are PIs, so is their consensus YZ) =Recursive method (if X is a PI of F = F 1 F 2, then we can rewrite X as YZ such that Y and Z are PIs for F 1 and F 2 respectively)

ENEE Pseudo-Code: Branch and Bound 1. Apply reduction techniques until they stop; 2. If we find a direct solution with cost less than the upper bound, update upper bound and goto step 9; 3. Calculate the lower/upper bounds; 4. If lower bound is larger than upper bound, goto step 9 and return “no solution”; 5. Pick one column and split into two branches; 6. Branch and Bound on one branch; (recursive call) 7. If the returned solution has cost equal to lower bound, goto step 9; 8. Branch and Bound on the other branch; 9. Report the current solution.

ENEE Example of reduction techniques 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