Weikang Qian
Outline Intersection Pattern and the Problem Motivation Solution 2
Intersection Pattern of Cubes Sum-of-product Boolean function: A set of cubes Example: Notation V( f ) : number of minterms covered by f Intersection pattern: numbers of minterms covered by the intersections of all subsets of cubes 3
Example of Intersection Pattern 4 3 cubeson 4 variables Intersection pattern depends on the total number of variables!
Reverse Problem Given the number of variables and an intersection pattern, synthesize cubes to satisfy that pattern 5 Example: Synthesize 3 cubes on 4 variables so that Sol.: One solution is
Reverse problem (cont.) Sometimes, these is no solution! 6 Example: Synthesize 2 cubes on 4 variables so that Sol.: No solution! Why? c0c0 No way to put the rectangle of 4 ones so the intersection has 1 minterms!
Outline Intersection Pattern and the Problem Motivation Solution 7
Why Intersection Pattern? Probabilistic computation Digital circuit operating on random bit streams Transform probabilities into probabilities Application In test: Weighted random pattern generation Hardware implementation of probabilistic algorithms 8 P(x = 1) = 0.4 P(z = 1) = 0.2 P(y = 1) = 0.5 0,1,0,1,0,0,1,1,0,0 1,0,1,1,0,0,1,0,0,1 0,0,0,1,0,0,1,0,0,0
A Fundamental Synthesis Problem 9 Independent Combinational Logic 0.5 q ?
Output Probability: Analysis If the number of inputs is n, then q = m/2 n Each input combination has probability 1/2 n If the Boolean function has m minterms, then q = m/2 n 10 5 minterms q = 5/8
Output Probability: Synthesis Implement m/2 n Choose m minterms But, which m minterms to choose? 11 Example: q = 7/
Two Level Logic Synthesis Problem Given number of inputs n and m, find a SOP Boolean function with minimum cubes to cover m minterms. 12 Optimization Flow λ = Lower bound on the number of cubes to cover m minterms Exist λ cubes to cover m interms? end Y λ = λ + 1 N Related
Exist λ cubes to cover m miterms? Step 1 : Construct an intersection pattern so that it covers m minterms by Inclusion-Exclusion Principle: Step 2 : Synthesize cubes to satisfy the intersection pattern (Focus of this work) 13
Outline Intersection Pattern and the Problem Motivation Solution 14
Preliminaries Literals: If cube c has k literals, then V(c) = 2 n − k Empty cube: c = 0, V(c) = 0 For a cube c, 15
Cube-Variable Matrix D λ rows, each corresponding to a cube n columns, each corresponding to a variable 16 Example: If a row vector has k * ’s, V(c) = 2 k Synthesis a cube-variable matrix to satisfy the intersection pattern V(c) = 2
Properties Negation Column negation and column permutation of matrix maintain the intersection pattern. 17 exchange column 1 & 2 negate column 1 Same pattern:
Key Ideas of Solution Determine what each column should be Each column has 3 λ candidate choices: Only need to consider a subset of candidate choices For example, by column negation invariability, choice equivalent to choice Column permutation invariability: position does not matter; only number of occurrence of each candidate choice in cube-variable matrix matters 18
A Special Case A case where all-cube intersection is non-empty Candidate choices: those columns that do not contain both a 0 and a 1 Further reduction on candidate choices: only consider columns without 0 ’s 19 X Intersection Empty! } By column negation invariability: Replaced by
Special Case: Illustration with λ = 3 Candidate choices: Number of occurrences in cube-variable matrix matters Set equations between unknowns and knowns 20 y0y0 y1y1 y2y2 y3y3 y4y4 y5y5 y6y6 y7y7 unknowns: knowns: n, V(c 0 ), V(c 1 ), V(c 0 c 1 ), V(c 2 ), V(c 0 c 2 ), V(c 1 c 2 ), V(c 0 c 1 c 2 ) c0c0 c1c1 c2c2
Set up Equations 21 knowns: n, V(c 0 ), V(c 1 ), V(c 0 c 1 ), V(c 2 ), V(c 0 c 2 ), V(c 1 c 2 ), V(c 0 c 1 c 2 ) y0y0 y1y1 y2y2 y3y3 y4y4 y5y5 y6y6 y7y7 unknowns: c0c0 c1c1 c2c2 Equation on n Equation on V(c 0 ) If a row vector of c has k * ’s, V(c) = 2 k Relates to total number of columns with first entry * y 0 + y 1 + y 2 + y 3 + y 4 + y 5 + y 6 + y 7 = n Each column belongs to one of the candidate choices y 1 + y 3 + y 5 + y 7 = k 1 = log 2 V(c 0 ) y 2 + y 3 + y 6 + y 7 = log 2 V(c 1 ) Equation on V(c 1 ) y 4 + y 5 + y 6 + y 7 = log 2 V(c 2 ) Equation on V(c 2 )
Set up Equations (cont.) 22 knowns: n, V(c 0 ), V(c 1 ), V(c 0 c 1 ), V(c 2 ), V(c 0 c 2 ), V(c 1 c 2 ), V(c 0 c 1 c 2 ) y0y0 y1y1 y2y2 y3y3 y4y4 y5y5 y6y6 y7y7 unknowns: c0c0 c1c1 c2c2 Equation on V(c 0 c 1 ) If a row vector of c has k * ’s, V(c) = 2 k Relates to total number of columns with 1 st and 2 nd entry both * c0c0 c1c1 c2c2 c0c1c0c1 contribute to * in c 0 c 1 y 3 + y 7 = k 3 = log 2 V(c 0 c 1 ) Equation on V(c 0 c 2 ) y 5 + y 7 = log 2 V(c 0 c 2 ) Equation on V(c 1 c 2 ) y 6 + y 7 = log 2 V(c 1 c 2 )
Set up Equations (cont.) 23 knowns: n, V(c 0 ), V(c 1 ), V(c 0 c 1 ), V(c 2 ), V(c 0 c 2 ), V(c 1 c 2 ), V(c 0 c 1 c 2 ) y0y0 y1y1 y2y2 y3y3 y4y4 y5y5 y6y6 y7y7 unknowns: c0c0 c1c1 c2c2 Equation on V(c 0 c 1 c 2 ) Relates to total number of columns with 1 st, 2 nd, and 3 rd entry all * y 7 = log 2 V(c 0 c 1 c 2 )
System of Linear Equations 24 y 0 + y 1 + y 2 + y 3 + y 4 + y 5 + y 6 + y 7 = n = k 0 y 1 + y 3 + y 5 + y 7 = log 2 V(c 0 ) = k 1 y 2 + y 3 + y 6 + y 7 = log 2 V(c 1 ) = k 2 y 4 + y 5 + y 6 + y 7 = log 2 V(c 2 ) = k 4 y 3 + y 7 = log 2 V(c 0 c 1 ) = k 3 y 5 + y 7 = log 2 V(c 0 c 2 ) = k 5 y 6 + y 7 = log 2 V(c 1 c 2 ) = k 6 y 7 = log 2 V(c 0 c 1 c 2 ) = k 7 Matrix form Solution
Solution of the Special Case Solution If all entries of are non-negative, then we find one set of cubes satisfying the intersection pattern Otherwise, there is no set of cubes satisfying the intersection pattern 25
Example of Special Case 26 Synthesize 3 cubes on 5 variables so that V(c 0 ) = V(c 1 ) = 16, V(c 0 c 1 ) = V(c 2 ) = 8, V(c 0 c 2 ) = V(c 1 c 2 ) = 4, V(c 0 c 1 c 2 ) = 2 Sol.: y0y0 y1y1 y2y2 y3y3 y4y4 y5y5 y6y6 y7y7 Cube-variable matrix
General Cases Cases where all-cube intersection could be empty Same ideas Reduce candidate choices Take numbers of occurrences as unknowns Set up equations between unknowns and knowns A system of linear equalities and inequalities 27
Conclusion Problem: Synthesize a set of cubes to satisfy a given intersection pattern Important step in the two-level logic synthesis for probabilistic computation Solution: Determine the number of occurrences of each candidate choice Future work: integrate into the optimization problem 28
Thank You! 29