Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Sum of Products.

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
Universal logic design algorithm and its application to the synthesis of two-level switching circuits §H.-J.Mathony §IEEE Proceedings 1989.
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:
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.
Chapter 3 Simplification of Switching Functions
1 Multi-Valued Logic Up to now…two-valued synthesis –Binary variables take only values {0, 1} Multi-Valued synthesis –Multi-valued variable X i can take.
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.
Logic Synthesis n -Basic Concepts and Tools n Tao Lin n Ohio Universtiy n February 17, 1998.
ECE Synthesis & Verification - Lecture 9b 1 ECE 697B (667) Fall 2004 ECE 697B (667) Fall 2004 Synthesis and Verification of Digital Systems Boolean.
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.
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.
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
Propositional Calculus Math Foundations of Computer Science.
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’,
ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Multi-level.
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
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
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.
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.
Copyright © 2004 by Miguel A. Marin Revised McGILL UNIVERSITY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING COURSE ECSE DIGITAL SYSTEMS.
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.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
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.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
BDDs1 Binary Tree Representation The recursive Shannon expansion corresponds to a binary tree Example: Each path from the root to a leaf corresponds to.
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.
1 ECEN 4703 Switching and Finite Automata Theory Sunil P Khatri University of Colorado, Boulder Spring 2002 Modified from lecture notes of Robert K Brayton,
Binary Decision Diagrams Prof. Shobha Vasudevan ECE, UIUC ECE 462.
CHAPTER 6 Quine-McCluskey Method
Logic Synthesis Boolean Division.
Heuristic Minimization of Two-Level Logic
Computer Organisation
CS 352 Introduction to Logic Design
Propositional Calculus: Boolean Algebra and Simplification
Synthesis of Two Level Circuits
Optimized Implementation of Logic Function
ECE 331 – Digital System Design
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.
COE 202: Digital Logic Design Combinational Logic Part 3
ECB2212-Digital Electronics
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.
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 Sum of Products

2 Representation of Boolean Functions Sum of Products: A function can be represented by a sum of cubes (products): f = ab + ac + bc Since each cube is a product of literals, this is a “sum of products” (SOP) representation A SOP can be thought of as a set of cubes F F = {ab, ac, bc} A set of cubes that represents f is called a cover of f. F 1 ={ab, ac, bc} and F 2 ={abc,abc,abc,abc,bc} are covers of f = ab + ac + bc.

3 SOP Covers (SOP’s) can efficiently represent many practical logic functions (i.e. for many, there exist small covers). Two-level minimization seeks the minimum size cover (least number of cubes) bc ac ab c a b = onset minterm Note that each onset minterm is “covered” by at least one of the cubes! None of the offset minterms is covered

4 Irredundant Cubes Let F = {c 1, c 2, …, c k } be a cover for f, i.e. f =  i k =1 c i A cube c i  F is irredundant if F\{c i }  f Example: f = ab + ac + bc bc ac ab c a b bc ac Not covered F\{ab}  f

5 Prime Cubes A literal j of cube c i  F ( =f ) is prime if (F \ {c i })  {c’ i }  f where c’ i is c i with literal j of c i deleted. A cube of F is prime if all its literals are prime. Example f = ab + ac + bc c i = ab; c’ i = a (literal b deleted) F \ {c i }  {c’ i } = a + ac + bc bc ac a c a b Not equal to f since offset vertex is covered F=ac + bc + a = F \{c i }  {c’ i }

6 Prime and Irredundant Covers Definition 1 A cover is prime (irredundant) if all its cubes are prime (irredundant). Definition 2 A prime of f is essential (essential prime) if there is a minterm (essential vertex) in that prime that is in no other prime. Definition 3 Two cubes are orthogonal if they do not have any minterm in common – –E.g. c 1 = abc 2 = bc are orthogonal c 1 = abc 2 = bc are not orthogonal

7 Prime and Irredundant Covers Example f = abc + bd + cd is prime and irredundant. abc is essential since abcd  abc, but not in bd or cd or ad Why is abcd not an essential vertex of abc? What is an essential vertex of abc? What other cube is essential? What prime is not essential? abc bd cd d a c b

8 PLA’s - Multiple Output Functions A PLA is a function f : B n  B m represented in SOP form: f2f2 f3f3 f1f1 n=3, m=3 aabbcc abc f 1 f 2 f Personality Matrix

9 PLA’s (cont.) Each distinct cube appears just once in the AND-plane, and can be shared by (multiple) outputs in the OR-plane, e.g., cube (abc). Extensions from single output to multiple output minimization theory are straightforward. Multi-level logic can be viewed mathematically as a connection of single output functions.

10 Shannon (Boole) Cofactors Let f : B n  B be a Boolean function, and x= (x 1, x 2, …, x n ) the variables in the support of f. The cofactor f a of f by a literal a=x i or a=x i is f x i (x 1, x 2, …, x n ) = f (x 1, …, x i-1, 1, x i+1,…, x n ) f x i (x 1, x 2, …, x n ) = f (x 1, …, x i-1, 0, x i+1,…, x n ) The computation of the cofactor is a fundamental operation in Boolean reasoning!!!! Example: a b c f = abc + abc a b c f a = bc

11 Generalized Cofactor The generalized cofactor f C of f by a cube C is f with the fixed values indicated by the literals of C, e.g. if C=x i x j, then x i =1, and x j =0. if C= x 1 x 4 x 6 f C is just the function f restricted to the subspace where x 1 =x 6 =1 and x 4 =0. As a function, f C does not depend on x 1,x 4 or x 6 anymore (However, we still consider f C as a function of all n variables, it just happens to be independent of x 1,x 4 and x 6 ). x 1 f  f x 1 Example: f= ac + ac, af = ac, f a =c

12 Fundamental Theorem Theorem: Let c be a cube and f a function. Then c  f  f c  1. Proof. We use the fact that xf x = xf, and f x is independent of x. If : Suppose f c  1. Then cf=f c c=c. Thus, c  f. f c

13 Proof (cont.) Only if. Assume c  f Then c  cf = cf c. But f c is independent of literals i  c. If f c  1, then  m  B n, f c (m)=0. We will construct a m’ from m and c in the following manner: m i ’=m i, if x i  c and x i  c, m i ’=1, if x i  c, m i ’=0, if x i  c. i.e. we made the literals of m’ agree with c, i.e. m’  c  c(m’)=1 Also, f c is independent of literals x i,x i  c  f c (m’) = f c (m) = 0  f c (m’) c(m’)= 0 contradicting c  cf c. m= 000 m’= 101 m m’ C=xz

14 Cofactor of Covers Definition: The cofactor of a cover F is the sum of the cofactors of each of the cubes of F. Note: If F={c 1, c 2,…, c k } is a cover of f, then F c = {(c 1 ) c, (c 2 ) c,…, (c k ) c } is a cover of f c. Suppose F(x) is a cover of f(x), i.e. Then for 1  j  n, is a cover of f x j (x)

15 Definition: The cofactor C x j of a cube C with respect to a literal x j is C if x j and x j do not appear in C C\{x j } if x j appears positively in C, i.e. x j  C  if x j appears negatively in C, i.e. x j  C Example: C = x 1 x 4 x 6, C x 2 = C (x 2 and x 2 do not appear in C ) C x 1 = x 4 x 6 (x 1 appears positively in C) C x 4 =  (x 4 appears negatively in C) Cofactor of Cubes

16 Example F = abc + bd + cd F b = ac + cd (Just drop b everywhere and throw away cubes containing literal b) Cofactor of Cubes (cont.)

17 Shannon Expansion f : B n  B Shannon Expansion: Theorem: F is a cover of f. Then We say that f (F) is expanded about x i. x i is called the splitting variable.

18 Example Cube bc got split into two cubes c a b c a b bc ac ab Shannon Expansion (cont.)

19 List of Cubes (Cover Matrix) We often use a matrix notation to represent a cover: Example: F = ac + cd = a b c d a b c d ac  or cd  Each row represents a cube 1 means that the positive literal appears in the cube 0 means that the negative literal appears in the cube The 2 (or -) here represents that the variable does not appear in the cube. It implicitly represents both 0 and 1 values.

20 Operations on Lists of Cubes AND operation: – –take two lists of cubes – –computes pair-wise AND between individual cubes and put result on new list – –represent cubes as pairs of computer words – –set operations are implemented as bit-vector operations Algorithm AND(List_of_Cubes C 1,List_of_Cubes C 2 ) { C =  foreach c 1  C 1 { foreach c 2  C 2 { c = c 1  c 2 C = C  c } return C }

21 Operations on Lists of Cubes OR operation: – –take two lists of cubes – –computes union of both lists Naive implementation: On-the-fly optimizations: – –remove cubes that are completely covered by other cubes complexity is O(m 2 ); m is length of list – –conjoin adjacent cubes – –remove redundant cubes? complexity is O(2 n ); n is number of variables too expensive for non-orthogonal lists of cubes Algorithm OR(List_of_Cubes C 1, List_of_Cubes C 2 ) { return C 1  C 2 }

22 Operations on Lists of Cubes Simple trick: – –keep cubes in lists orthogonal – –check for redundancy becomes O(m 2 ) – –but lists become significantly larger (worst case: exponential) Example: OR =

23 Operations on Lists of Cubes Adding cubes to orthogonal list: How can the above procedure be further improved? What about the AND operation, does it gain from orthogonal cube lists? Algorithm ADD_CUBE(List_of_Cubes C, Cube c) { if(C =  ) return {c} c’ = TOP(C) C res =  c-c’ /* chopping off minterms */ foreach c res  C res { C = ADD_CUBE(C\{c’},c res )  {c’} } return C }

24 Operation on Lists of Cubes Naive implementation of COMPLEMENT operation – –apply De’Morgan’s law to SOP – –complement each cube and use AND operation – –Example: Naive implementation of TAUTOLOGY check – –complement function using the COMPLEMENT operator and check for emptiness We will show that we can do better than that!! Input non-orth. orthogonal => =>

25 A Possible Solution? Let A be an orthogonal cover matrix. Let all cubes of A be pair-wise distinguished by at least two literals (this can be achieved by an on-the- fly resolution of cube pairs that are distinguished by only literal). Does the following conjecture hold? A  1  A has a row of all “-”s ? This would dramatically simplify the tautology check!!!

26 Generic Tautology Check Algorithm CHECK_TAUTOLOGY(List_of_Cubes C) { if(C ==  ) return FALSE; if(C == {-...-})return TRUE; // cube with all ‘-’ x i = SELECT_VARIABLE(C) C 0 = COFACTOR(C,^X i ) if(CHECK_TAUTOLOGY(C 0 ) == FALSE) { print x i = 0 return FALSE; } C 1 = COFACTOR(C,X i ) if(CHECK_TAUTOLOGY(C 1 ) == FALSE) { print x i = 1 return FALSE; } return TRUE; }

27 Improvements Variable ordering: – –pick variable that minimizes the two sub-cases (“-”s get replicated into both cases) Quick decision at leaf: – –return TRUE if C contains at least one complete “-” cube among others (case 1) – –return FALSE if number of minterms in onset is < 2 n (case 2) – –return FALSE if C contains same literal in every cube (case 3)

28 x1 ^x1 x2 ^x2 ^ ^ x3 ^x4 x4 x3 No tautology(case 3) tautology(case 1) Example ^x

29 Definition: A function f : B n  B is symmetric with respect to variables x i and x j iff f(x 1,…,x i,…,x j,…,x n ) = f(x 1,…,x j,…,x i,…,x n ) Definition: A function f : B n  B is totally symmetric iff any permutation of the variables in f does not change the function Some Special Functions Symmetry can be exploited in searching the binary decision tree because: - That means we can skip one of four sub-cases - used in automatic variable ordering for BDDs

30 Definition: A function f : B n  B is positive unate in variable x i iff This is equivalent to monotone increasing in x i : for all min-term pairs (m -, m + ) where For example, m - 3 =1001, m + 3 =1011(where i=3) Some Special Functions

31 Similarly for negative unate monotone decreasing: A function is unate in x i if it is either positive unate or negative unate in x i. Definition: A function is unate if it is unate in each variable. Definition: A cover F is positive unate in x i iff  x i  c j for all cubes c j  F Some Special Functions

32 c b a m+m+ m-m- f(m - )=1  f(m + )=0 positive unate in a,b negative unate in c Example

33 The Unate Recursive Paradigm Key pruning technique is based on exploiting the properties of unate functions – –based on the fact that unate leaf cases can be solved efficiently New case splitting heuristic – –splitting variable is chosen so that the functions at lower nodes of the recursion tree become unate

34 Unate covers F have many extraordinary properties: – –If a cover F is minimal with respect to single-cube containment, all of its cubes are essential primes. – –In this case F is the unique minimum cube representation of its logic function. – –A unate cover represents the tautology iff it contains a cube with no literals, i.e. a single tautologous cube. This type of implicit enumeration applies to many sub-problems (prime generation, reduction, complementation, etc.). Hence, we refer to it as the Unate Recursive Paradigm. The Unate Recursive Paradigm

35 Unate Recursive Paradigm Create cofactoring tree stopping at unate covers – –choose, at each node, the “most binate” variable for splitting – –recure till no binate variable left (unate leaf) “Operate” on the unate cover at each leaf to obtain the result for that leaf. Return the result At each non-leaf node, merge (appropriately) the results of the two children. Main idea: “Operation” on unate leaf is computationally less complex Operations: complement, simplify,tautology,generate-primes,... a c b merge

36 The Binate Select Heuristic Tautology and other programs based on the unate recursive paradigm use a heuristic called BINATE_SELECT to choose the splitting variable in recursive Shannon expansion. The idea is for a given cover F, choose the variable which occurs, both positively and negatively, most often in the cubes of F.

37 Example Unate and non-unate covers: a b c d G = ac+cd a b c d F = ac+cd+bcd => Choose c for splitting! The binate variables of a cover are those with both 1’s and 0’s in the corresponding column. In the unate recursive paradigm, the BINATE_SELECT heuristic chooses a (most) binate variable for splitting, which is thus eliminated from the sub-covers. is unate is not unate The Binate Select Heuristic

38 Example unate unate unate unate unate F= F= e c c FCFC F  C 0

39 Two Useful Theorems Theorem: Theorem: Let A be a unate cover matrix. Then A  1 if and only if A has a row of all “-”s. Proof: If. A row of all “-”s is the tautology cube. Only if. Assume no row of all “-”s. Without loss of generality, suppose function is positive unate. Then each row has at least one “1” in it. Consider the point (0,0,…,0). This is not contained in any row of A. Hence A  1.

40 Unate Reduction Let F(x) be a cover. Let (a,x’) be a partition of the variables x, and let where the columns of A correspond to variables a of x T is a matrix of all “-”s. Theorem: Assume A  1. Then F  1  F’  1

41 Example We pick for the partitioning unate variables because it is easy to decide that A  1

42 Result: Only have to look at D1 to test if this is a tautology. Note: A 1, A 2 has no row of all “-”s. Hence is a unate cover. Hence (A 1, A 2 )  1 A1A1A1A1 C2C2C2C2 D1D1D1D1 B2B2B2B2 C1C1C1C1 B1B1B1B1 A2A2A2A2 Unate Reduction

43 Proof Theorem: Assume A  1. Then F  1  F’  1 Proof: if: Assume F’  1. Then we can replace F’ by all -’s. Then last row of F becomes a row of all “-”s, so tautology. A  1 T=“-”s

44 Proof (contd) Only if: Assume F’  1. Then there is a minterm m 2 such that F’(m 2 )=0, i.e. m 2  cube of F’. Similarly, m 1 exists where A(m 1 )=0, i.e. m 1  cube of A. Now the minterm (m 1,m 2 ) in the full space satisfies F(m 1,m 2 )=0 since m 1 m 2  AX and m 1 m 2  TF’. (a, x’) is any row of first part a(m 1 ) ^ x’(m 2 )=0 ^ x’(m 2 )=0 (t,f’) is any row of the last part t(m 1 ) ^ f’(m 2 )=t(m 1 ) ^ 0 = 0 So m 1 m 2 is not in any cube of F.

45 Improved Tautology Check Algorithm CHECK_TAUTOLOGY(List_of_Cubes C) { if(C ==  ) return FALSE; if(C == {-...-})return TRUE; // cube with all ‘-’ C = UNATE_REDUCTION(C) x i = BINATE_SELECT(C) C 0 = COFACTOR(C,^x i ) if(CHECK_TAUTOLOGY(C 0 ) == FALSE) { return FALSE; } C 1 = COFACTOR(C,x i ) if(CHECK_TAUTOLOGY(C 1 ) == FALSE) { return FALSE; } return TRUE; }

46 x1 ^x1 x2 ^x2 ^ ^ x3 ^x4 x4 x3 No tautology(case 3) tautology(case 1) Previous Example ^x Unate reduction No tautology(case 2) 0---

47 Recursive Complement Operation We have shown how tautology check (SAT check) can be implemented recursively using the Binary Decision Tree Similarly, we can implement Boolean operations recursively Example COMPLEMENT operation: Theorem: Proof:

48 COMPLEMENT Operation Algorithm COMPLEMENT(List_of_Cubes C) { if(C contains single cube c) { C res = complement_cube(c) // generate one cube per return C res // literal l in c with ^l } else { x i = SELECT_VARIABLE(C) C 0 = COMPLEMENT(COFACTOR(C,^x i ))  ^x i C 1 = COMPLEMENT(COFACTOR(C,x i ))  x i return OR(C 0,C 1 ) }

49 Complement of a Unate Cover Complement of a unate cover can be computed more efficiently Idea: – –variables appear only in one polarity on the original cover (ab + bc + ac) = (a+b)(b+c)(a+c) – –when multiplied out, a number of products are redundant aba + abc + aca + acc + bba + bbc + bca + bcc = ab + ac + bc – –we just need to look at the combinations for which the variables cover all original cubes – –this works independent of the polarity of the variables because of symmetry to the (1,1,1,…,1) case

50 Complement on a Unate Cover Map cube matrix F into Boolean matrix B convert: “0”,”1” to “1” (literal is present) “-” to “0” (literal is not present)

51 Complement of a Unate Cover Find all minimal column covers of B. A column cover is a set of columns J such that for each row i,  j  J such that B ij = 1 Example: {1,4} is a minimal column cover for All rows “covered” by at least one 1.

52 Complement of a Unate Cover For each minimal column cover create a cube with opposite column literal from F. Example: {1,4}ad is a cube of f

53 Complement of a Unate Cover The set of all minimal column covers = cover of  f. Example: {(1,4), (2,3), (2,5), (4,5)} is the set of all minimal covers. This translates into:

54 Unate Complement Theorem Theorem: Let F be a unate cover of f. The set of cubes associated with the minimal column covers of B F is a cube cover of  f. Proof: We first show that any such cube c generated is in the offset of f, by showing that the cube c is orthogonal with any cube of F. – –Note, the literals of c are the complemented literals of F. Since F is a unate cover, the literals of F are just the union of the literals of each cube of F). – –For each cube m i  F,  j  J such that B ij =1. J is the column cover associated with c. – –Thus, (m i ) j =x j  c j =  x j and (m i ) j =  x j  c j =x j. Thus m i c = . Thus c   f.

55 Proof (cont.): We now show that any minterm m  f is contained in some cube c generated: First m must be orthogonal to each cube of F. – –For each row of F, there is at least one literal of m that conflicts with that row. The union of all columns (literals) where this happens is a column cover of B F Hence this union contains at least one minimal cover and the associated cube contains m. Unate Complement Theorem

56 Unate Covering Problem Definition: The problem, given a Boolean matrix B, find a minimum column cover, is called a unate covering problem. The unate complementation is one application that is based on the unate covering problem. Unate Covering Problem: Given B, B ij  {0,1} find x, x i  {0,1} such that Bx  1 and  j x j is minimum. Sometimes we want to minimize  j c j x j where c j is a cost associated with column j.

57 Incompletely Specified Functions F = (f, d, r) : B n  {0, 1, *} where * represents “don’t care”. f = onset function - f(x)=1  F(x)=1 r = offset function - r(x)=1  F(x)=0 d = don’t care function - d(x)=1  F(x)=* (f,d,r) forms a partition of B n. i.e. f + d + r = B n fd = fr = dr =  (pairwise disjoint)

58 A completely specified function g is a cover for F=(f,d,r) if f  g  f+d (Thus gr =  ). Thus, if x  d (i.e. d(x)=1), then g(x) can be 0 or 1, but if x  f, then g(x)=1 and if x  r, then g(x)=0. (We “don’t care” which value g has at x  d) Incompletely Specified Functions

59 Primes of Incompl. Spec. Functions Definition: A cube c is prime of F=(f,d,r) if c  f+d (an implicant of f+d), and no other implicant (of f+d) contains c, i.e. (i.e. it is simply a prime of f+d) Definition: Cube c j of cover F={c i } is redundant if f  F\{c j }. Otherwise it is irredundant. Note that c  f+d  cr = 

60 Example:Logic Minimization Consider F(a,b,c)=(f,d,r), where f={abc, abc, abc} and d ={abc, abc}, and the sequence of covers illustrated below: F 1 = abc + abc+ abc abc is redundant a is prime F 3 = a+abc Expand abc  bc Expand abc  a F 2 = a+abc + abc F 4 = a+bc off on Don’t care

61 Checking for Prime and Irredundant Let G={c i } be a cover of F=(f,d,r). Let D be a cover for d. c i  G is redundant iff c i  (G\{c i })  D  G i (1) (Since c i  G i and f  G  f+d then c i  c i f+c i d and c i f  G\{c i }. Thus f  G\{c i }.) A literal l  c i is prime if (c i \{ l }) ( = (c i ) l ) is not an implicant of F. A cube c i is a prime of F iff all literals l  c i are prime. Literal l  c i is not prime  (c i ) l  f+d (2) Note: Both tests (1) and (2) can be checked by tautology: (G i ) c i  1 (implies c i redundant) (F  D) ( c i) l  1 (implies l not prime)