Heuristic Minimization of Two Level Circuits

Slides:



Advertisements
Similar presentations
Three Special Functions
Advertisements

Minimization of Circuits
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
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.
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
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.
COE 561 Digital System Design & Synthesis Two-Level Logic Synthesis
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.
Gate Logic: Two Level Canonical Forms
Two-Level Logic Minimization Exact minimization –problem : very large number of prime and very large number of minterm Heuristic minimization –avoid computing.
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.
Winter 2014 S. Areibi School of Engineering University of Guelph
ECE 667 Synthesis and Verification of Digital Systems
Simple Minimization Loop F = EXPAND(F,D); F = IRREDUNDANT(F,D); do { cost = F ; F = REDUCE(F,D); F = EXPAND(F,D); F = IRREDUNDANT(F,D); } while ( F < cost.
Lecture 3. Boolean Algebra, Logic Gates
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’,
Tautology. Tautology Decision May be able to use unateness to simplify process Unate Function – one that has either the uncomplemented or complemented.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Two-Level Minimization II.
BOOLEAN FUNCTION PROPERTIES
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Department of Computer Engineering
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.
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
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.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect15: Heuristic Two Level Logic.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
June 12, 2002© Howard Huang1 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are.
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.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
CHAPTER 6 Quine-McCluskey Method
Digital Logic.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Heuristic Minimization of Two-Level Logic
Computer Organisation
Prof. Sin-Min Lee Department of Computer Science
CS 105 Digital Logic Design
CS 352 Introduction to Logic Design
ECE 2110: Introduction to Digital Systems
Lecture 3 Gunjeet Kaur Dronacharya Group of Institutions
Propositional Calculus: Boolean Algebra and Simplification
17-Nov-18 Logic Algebra 1 Combinational logic.
ICS 252 Introduction to Computer Design
Synthesis of Two Level Circuits
Optimized Implementation of Logic Function
ECE 331 – Digital System Design
Digital Logic & Design Dr. Waseem Ikram Lecture 13.
MVI Function Review Input X is p-valued variable. Each Input can have Value in Set {0, 1, 2, ..., pi-1} literal over X corresponds to subset of values.
Chapter 3 Gate-level Minimization.
MINTERMS and MAXTERMS Week 3
Sungho Kang Yonsei University
COE 202: Digital Logic Design Combinational Logic Part 3
ECB2212-Digital Electronics
Synthesis and Verification of Finite State Machines
MVI Function Review Input X is p-valued variable. Each Input can have Value in Set {0, 1, 2, ..., pi-1} literal over X corresponds to subset of values.
Minimization of Switching Functions
Overview Part 2 – Circuit Optimization
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.
Tautology Decision May be able to use unateness to simplify process
ECE 352 Digital System Fundamentals
ECE 331 – Digital System Design
Presentation transcript:

Heuristic Minimization of Two Level Circuits Sungho Kang Yonsei University

Outline Local Search Checking for Equivalence and Tautology Choosing the Right Direction Identifying Essential Implicants

Local Search Local search algorithms The algorithms that start from an initial solution and try to find a better one by applying successive modifications One property of the solution of a local search algorithm is local optimality A solution is locally optimal if its neighborhood does not contain any solution of lower cost

Local Search Applied to Logic Minimization Starting point is a cover for a multi-output function and the cost is the number of cubes with the number of literals as a tie-breaker The neighborhood is defined as the set of covers that are obtained from the original cover by adding or removing exactly one literal to one of the cubes A new cover obtained is a feasible point if it is equivalent to the original one The solutions with more cubes than the initial cover are not part of the search space

Local Search Applied to Logic Minimization xyz f 000 1 xyz f 01- 1 change 000 1 into 0-0 1 0-0 1 - 11 1 -11 1 Expand output xyz fg xyz fg xyz fg xyz fg xyz fg 0-1 10 0-1 11 0-1 11 1- - 10 1- - 10 1-0 10 1-0 10 1-0 10 - - 1 10 0- 1 11 00- 01 00- 01 -00 01 0-1 01 -10 01 -00 01 -00 01 -11 01 -10 01 -11 01 -11 01

Simple Local Search Algorithm F = EXPAND(F,D); F = IRREDUNDANT(F,D); do { cost = |F|; F = REDUCE(F,D); } while (|F| < cost); F = MAKE_SPARSE(F,D);

Checking for Equivalence Equivalence and Tautology The expansion or reduction is valid if and only if ci*  ( F-{ci} )  D F={cj} is the current cover for ON-set and D is the cover for DC-set ci is the cube of F that is being added or reduced ci* is the cube that contains the newly added or removed minterms xyz f check the validity of the expansion of 000 1 to 0-0 1 000 1 01- 1 must check the containment of 010 1 in -11 1 xyz ( F-{ci} )  D 100 - 01- 1 - 11 1 100 1

Checking for Tautology Equivalence and Tautology The cofactor of a function f(x1, x2, …, xn) with respect to literal x1, written fx1, is f(1, x2, …, xn) The cofactor of a function f(x1, x2, …, xn) with respect to literal x1’, written fx1’, is f(0, x2, …, xn) The cofactor of a function f(x1, x2, …, xn) with respect to cube c is the successive cofactoring of f with respect to all the literals in c A function that is identically 1 is called a tautology For a function f and a cube c c  f  fc  1

Checking for Tautology Equivalence and Tautology General rule Eliminate the rows that disagree with the input part of ci* A disagreement means that the row has a 1 in an input column where ci* has a 0 or vice versa Eliminate the rows that do not have at least a 1 in an output column where ci* has a one

Unate Functions Equivalence and Tautology A function f(x1, x2, …, xn) is monotonically increasing in variable x1 if and only if f(0, x2, …, xn )  f(1, x2, …, xn) A function f(x1, x2, …, xn) is monotonically decreasing in variable x1 if and only if f(0, x2, …, xn )  f(1, x2, …, xn) If neither of the two above is true, f is non monotonic in x1 A function f(x1, x2, …, xn) is unate in variable x1 if and only if it is either monotonic increasing or monotonic decreasing in x1 It is unate if it is unate in all of its variables

Unate Functions Equivalence and Tautology A cover F is monotonically increasing in variable x1 if and only if x1 never appears complemented in the terms of F It is monotonically decreasing in variable x1 if and only if x1 never appears uncomplemented in the terms of F If neither of the two above is true, F is non monotonic in x1 If function f(x1, x2, …, xn) is unate in variable x1, then there exists a cover of f unate in x1 If a cover F is unate in x1, then the function F represents is also in x1 A unate cover F is a tautology if and only if it contains the constant term 1

Unate Functions Non-unate cover wxyz f - 1- 1 1 0 -10 1 010- 1 Equivalence and Tautology Non-unate cover xyz f yz fx yz fx’ 1-1 1 after splitting -1 1 0- 1 11- 1 1- 1 -0 1 00- 1 0-0 1 It is sufficient to examine one of them to see that the function is not a tautology wxyz f - 1- 1 1 0 -10 1 010- 1 All minterms with w=1 and x=0 cause f to be 0 After simplification, no row is left The fucntion is not tautologous

Speed-up for Tautology Checking Equivalence and Tautology A row of all - in the input part If such a row is found, the function is tautologous in all the outputs that have a 1 in that row This condition is always sufficient and is also necessary for unate functions An input column of all 1s or all 0s If such a column is found, the function is not a tautology If the number of inputs is less than 8, the truth table is generated and the tautology question is answered by inspection The rationale is that if the number of inputs is small enough, generating the truth table is faster than recurring If the vertex count of the cover is insufficient, the function is not a tautology The vertex count of the cover is the sum of the vertex counts of the cubes

Tautology Checks : Example Equivalence and Tautology First : Not a tautology wxyz f cover is unate in w and x - - 1 - 1 1 - - 1 1 cofactor wrt to w’ and x yz f - 0 - 0 1 1- 1 - 0 0 - 1 Second : Not a tautology wxyz fg cover is unate in x and x 1- 01 01 - 110 10 cofactor yz fg 1110 11 -0 10 - - - 0 10 -1 11 - - - 1 11 can drop y g is not a tautology

Choosing the Right Direction The choice of one direction over another may influence the quality of the solution

Recursive Complementation Right Direction For a Boolean function f f’ = x fx’ +x’ fx’’ For f monotonic increasing in x f’ = fx’ +x’ fx’’ For f monotonic decreasing in x f’ = x fx’ + fx’’

Recursive Complementation Right Direction Example wxyz If we select w, a row of all dashes will appear in fw 11 - - Complement of the tautology is trivial to compute 1 - - - - 1 - 1 fw’ = 0 - 11 - compute fw’’ cofactoring f xyz - 111 1- 1 11- 111 fw’’ = x’+G’ xyz final result 0- - wxyz -00 00 - - 0 - 00

Using the OFF-set in the Expansion Right Direction Build a blocking matrix, that has a row for each cube in the OFF-set and a column for each variable A row of the blocking matrix tells us that it is OK to expand the cube, as long as at least one of the directions corresponding to one of its ones is not expanded

Identifying Essential Primes Let F be a cover composed of prime implicants Let e be one of the primes in F and let G be the cover composed of the remaining primes Then e is an essential prime if and only if it is not covered by the union of ; 1. The consensus terms of e and each term of G 2. The intersections of e and each term of G