Proof: Synthesize cubes so that cube c k has n − i k literals and cubes c k and c l are disjoint, for any 0 ≤ k < l ≤ λ − 1. Weikang Qian and Marc D. Riedel.

Slides:



Advertisements
Similar presentations
Three Special Functions
Advertisements

Shortest Vector In A Lattice is NP-Hard to approximate
KU College of Engineering Elec 204: Digital Systems Design
1 Combinational Logic Design&Analysis. 2 Introduction We have learned all the prerequisite material: – Truth tables and Boolean expressions describe functions.
Weikang Qian Ph.D. Candidate Electrical & Computer Engineering
ECE 301 – Digital Electronics Circuit Design and Analysis (Lecture #9A) The slides included herein were taken from the materials accompanying Fundamentals.
ECE 331 – Digital System Design
EDA (CS286.5b) Day 15 Logic Synthesis: Two-Level.
Xin Li, Weikang Qian, Marc Riedel, Kia Bazargan & David Lilja A Reconfigurable Stochastic Architecture for Highly Reliable Computing Electrical & Computer.
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
CSE 830: Design and Theory of Algorithms
Circuit Optimization Goal: To obtain the simplest implementation for a given function Optimization is a more formal approach to simplification that is.
Weikang Qian The Synthesis of Stochastic Logic to Perform Multivariate Polynomial Arithmetic Abstract Ph.D. Student, University of Minnesota Marc D. Riedel.
ECE 667 Synthesis and Verification of Digital Systems
Combinational Digital Circuits. Measurement Our world is an analog world. Measurements that we make of the physical objects around us are never in discrete.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Constructing A Truth Table XYZF1F InputsOutput Input Combinations 3 – Inputs 8 – Combinations (8 = 2 3 ) Note the binary counting order.
BOOLEAN FUNCTION PROPERTIES
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
KU College of Engineering Elec 204: Digital Systems Design
CS 1308 – Computer Literacy and the Internet. It’s Not Magic  The goal of the next series of lectures is to show you exactly how a computer works. 
Boolean Algebra and Digital Circuits
2-Level Minimization Classic Problem in Switching Theory
Department of Computer Engineering
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Optimization Algorithm
2-Level Minimization Classic Problem in Switching Theory Tabulation Method Transformed to “Set Covering Problem” “Set Covering Problem” is Intractable.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
DISCRETE COMPUTATIONAL STRUCTURES CS Fall 2005.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
Boolean Minimizer FC-Min: Coverage Finding Process Petr Fišer, Hana Kubátová Czech Technical University Department of Computer Science and Engineering.
ECE 331 – Digital System Design Circuit Design and Analysis (Lecture #9A) The slides included herein were taken from the materials accompanying Fundamentals.
Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Weikang Qian. Outline Intersection Pattern and the Problem Motivation Solution 2.
Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.
Lecture 3. Combinational Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
CS 1308 – Computer Literacy and the Internet Building the CPU.
Why consider ND-MV networks? Multi-Values: Multi-valued domains can be used to explore larger optimization spaces. Several interesting direct applications.
Lecture 11 Combinational Design Procedure
ece Parity Used to check for errors Can be either ODD or EVEN Left most bit used as the indicator For EVEN, insert a 0 or a 1 so as to make the.
The parity bits of linear block codes are linear combination of the message. Therefore, we can represent the encoder by a linear system described by matrices.
A multi-objective synthesis of optimal control system by the network operator method 1 A.I. Diveev Institution of Russian Academy of Sciences Dorodnicyn.
Copied with Permission from prof. Mark PSU ECE
Monte Carlo Analysis of Uncertain Digital Circuits Houssain Kettani, Ph.D. Department of Computer Science Jackson State University Jackson, MS
CSE 140: Components and Design Techniques for Digital Systems Lecture 3: Incompletely Specified Functions and K Maps CK Cheng Dept. of Computer Science.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
Boolean Functions 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Boolean Functions Basics Maciej Ciesielski Univ.
Output Grouping-Based Decomposition of Logic Functions Petr Fišer, Hana Kubátová Department of Computer Science and Engineering Czech Technical University.
Digital Design Module 2 Decoder Amit Kumar AP SCSE, GU Greater Noida.
Standard & Canonical Forms COE 202 Digital Logic Design Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd University of Petroleum.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 7 – Karnaugh Maps.
ICS 252 Introduction to Computer Design Lecture 8 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.
Approximation Algorithms based on linear programming.
1 CS 352 Introduction to Logic Design Lecture 2 Ahmed Ezzat Boolean Algebra and Its Applications Ch-3 + Ch-4.
UNIT 4 APPLICATIONS OF BOOLEAN ALGEBRA MINTERM AND MAXTERM EXPANSIONS Click the mouse to move to the next page. Use the ESC key to exit this chapter. This.
Discrete Systems I Lecture 09 Minterms and Decoders Profs. Koike and Yukita.
Digital Systems Design 1 Signal Expressions Multiply out: F = ((X + Y)  Z) + (X  Y  Z) = (X  Z) + (Y  Z) + (X  Y  Z)
EE5393, Circuits, Computation, and Biology Computing with Probabilities 1,1,0,0,0,0,1,0 1,1,0,1,0,1,1,1 1,1,0,0,1,0,1,0 a = 6/8 c = 3/8 b = 4/8.
P & NP.
Prof. Sin-Min Lee Department of Computer Science
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
A Deterministic Approach to Stochastic Computation
Lecture #6 EGR 277 – Digital Logic
King Fahd University of Petroleum and Minerals
Overview Part 2 – Circuit Optimization
Presentation transcript:

Proof: Synthesize cubes so that cube c k has n − i k literals and cubes c k and c l are disjoint, for any 0 ≤ k < l ≤ λ − 1. Weikang Qian and Marc D. Riedel Two-Level Logic Synthesis for Probabilistic Computation Abstract ECE Department, University of Minnesota Probabilistic Computation A classical problem in logic synthesis is to find a sum-of-product (SOP) Boolean expression with the minimum number of product terms that implements a Boolean function. In this work, we focus on a related yet different synthesis problem targeted toward probabilistic computation. In our scenario, we want to synthesize a Boolean function that covers an exact number of minterms, say m minterms. This is the only requirement; which m minterms are covered does not matter. The objective is to find a SOP Boolean expression with the minimum number of product terms with this property. Solving this problem provides a solution to the problem of generating arbitrary probability values from unbiased input probabilities values of 0.5 with combinational logic. We first show a method for constructing a set of product terms to cover exactly m minterms; this gives an upper bound. Then, as our major contribution, we propose a method for deriving a lower bound. We show that the problem of finding such a lower bound can be converted into an optimization problem which we call the optimal subtraction problem. We solve it with dynamic programming. Experiments on benchmarks show that for some numbers m, the lower bound meets the upper bound, indicating that the solution corresponding to the upper bound is optimal. For some other numbers m, the gap between the lower bound and the upper bound is small, indicating that the solution corresponding to the upper bound is nearly optimal. Digital circuit operating on random bit streams Transform probabilities into probabilities How to design it? Two-Level Logic Synthesis In test: Weighted random pattern generation Hardware implementation of probabilistic algorithm A Hard Question: Which m minterms to choose? P(z = 1) = P(x = 1) P(y = 1) 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 Probability Generator Deterministic Hardware 0, 1, 1, 0, 1, 0 1, 1, 0, 1, 0, 1 Stochastic Bit Streams: Probability 3/6 Probability 4/6 … Why need it? Random Sources Digital Circuit p2p2 p3p3 p1p1 q2q2 q1q1 q3q3 q4q4 Input Probabilities Other Probabilities Needed ? Problem: A Special One Independent Combinational Logic 0.5 q Each input combination has probability 1/2 n If the Boolean function has m minterms, then q = m/2 n Answer: q = m/2 n What is it? ? Question 1: What could q be? Question 2: How to implement q = m/2 n ? Answer: choose m minterms, BUT … Example: q = 7/ Ultimate Question: Given number of inputs n and integer m, find a SOP expression with the minimum number of products to cover m minterms. Optimization Flow λ = Lower bound on the number of cubes to cover m minterms Exists λ cubes to cover m interms? end Y λ = λ + 1 N Focus of this work Definitions and Preliminaries V( f ): number of minterms covered by f B(m): number of ones of binary number m B((1011) 2 ) = 3 Boolean product, also known as cube, denoted by c If cube c contains k literals, V(c) = 2 n − k How to count number of minterms? Inclusion-Exclusion Principle Upper Bound Theorem 1: If B(m) = λ, then an upper bound is λ Example: m = (1011) 2, n = 4 Mutually Disjoint Lower Bound and Optimal Subtraction Problem (OSP) Theorem 2: If there exists λ cubes to cover m minterms, then we can find a, b ≥ 0 such that: m = a − b; B(a) ≤ 2 λ − 1 ; B (b) ≤ 2 λ − 1 − 1 Proof: In equation of Inclusion-Exclusion Principle, put “plus” terms together to get a; put “minus” terms together to get b We can show B(a) ≤ 2 λ − 1, B (b) ≤ 2 λ − 1 − 1 m = a − b Lower bound is the minimum λ satisfying the above property Example: m = (101101) 2 a − b = (101101) 2 B(a) ≤ 2 λ − 1 = 2 B(b) ≤ 2 λ − 1 − 1 = 1 No solution! B(a) ≤ 2 λ − 1 = 4 B(b) ≤ 2 λ − 1 − 1 = 3 a = (110001) 2, b = (100) 2 Generalization of Optimal Subtraction Problem λ = 2 λ = 3 X Lower bound: λ = 3 Optimal Subtraction Problem Given m, t ≥ 0, find a, b ≥ 0 to minimize B(a) such that B(b) ≤ t m = a − b Find lower bound by solving optimal subtraction problem: Set t = 2 λ − 1 − 1 If min B(a) > 2 λ − 1, then lower bound > λ Experimental Results (… 000 m k …m 0 ) 2 + (… ??? b* k …b* 0 ) 2 Carry 0 Then, ??? = 000 Case 1: 0 & carry 0 (… 000 m k …m 0 ) 2 + (… ??? b* k …b* 0 ) 2 Carry 1 Then, ??? = 000 or 111 Case 2: 0 & carry 1 (… 111 m k …m 0 ) 2 + (… ??? b* k …b* 0 ) 2 Carry 0 Then, ??? = 000 or 001 Case 3: 1 & carry 0 (… 111 m k …m 0 ) 2 + (… ??? b* k …b* 0 ) 2 Carry 1 Then, ??? = 000 Case 4: 1 & carry 1 Observation of Optimal Solution of OSP (a*, b* denotes optimal solution) Optimization Problem Q Given m = (m d …m 0 ) 2, 0 ≤ i ≤ d, l, ξ in {0, 1}, define problem Q(i, l, ξ) as: Find a, b ≥ 0 to minimize B(a) such that B(b) ≤ l a = (m d …m i ) 2 + b + ξ Optimal solution a*(i, l, ξ) and b*(i, l, ξ). Optimal cost: A(i, l, ξ) = B(a*(i, l, ξ)) Optimal Subtraction Problem: Q(0, t, 0) Optimal Structure of Problem Q Treat m as alternating zeros and ones: Exist 0 = i 0 < i 1 < < i 2q = d + 1 m[i 2r + 1 − 1, i 2r ] = (1…1), m[i 2r + 2 − 1, i 2r + 1 ] = (0…0) Solving Optimal Subtraction Problem by Dynamic Programming Case (m j − 1 …m i ) = (0…0) Q(i, l, 0) Q(j, l, 0) Q(i, l, 1) Q(j, l, 0) Q(j, l − j + i, 1) Case (m j − 1 …m i ) = (1…1) Q(i, l, 1) Q(j, l, 1) Q(i, l, 0) Q(j, l, 0) Q(j, l − 1, 1) (A(i, l, 1) = min{A(j, l, 0) + 1, A(j, l − j + i, 1)}) (A(i, l, 0) = min{A(j, l, 0) + j − i, A(j, l − 1, 1)}) Q(i 2r, l, 0) Q(i 2r + 1, l, 0) Q(i 2r + 1, l − 1, 1) Q(i 2r + 2, l, 0) Q(i 2r − 1, l, 1) Q(i 2r, l, 0)Q(i 2r, l − i 2r + i 2r − 1, 1) Q(i 2r + 1, l − i 2r + i 2r − 1, 1) Case: m[i 2r + 2 − 1, i 2r + 1 ] = (0…0) m[i 2r + 1 − 1, i 2r ] = (1…1) Case: m[i 2r + 1 − 1, i 2r ] = (1…1) m[i 2r − 1, i 2r − 1 ] = (0…0) A(i 2r, l, 0) = min{A(i 2r + 1, l − 1, 1), A(i 2r + 2, l, 0) + i 2r + 1 − i 2r } A(i 2r − 1, l, 1) = min{A(i 2r, l, 0) + 1, A(i 2r + 1, l − i 2r + i 2r − 1, 1)} Recursive Relation 012…t 2q − 1111…1 2q − 2y11…1 2q − 3***…* 2q − 4***…* 0***…* Optimal Cost Table T Base Case: T(2q − 1, *) and T(2q − 2, *) General Cases: T(2r, l) = min{T(2r + 1, l − 1), T(2r + 2, l) + i 2r + 1 − i 2r } T(2r − 1, l) = min{T(2r, l) + 1, T(2r + 1, l − i 2r + i 2r − 1 )} T(2r, l) = A(i 2r, l, 0) T(2r − 1, l) = A(i 2r − 1, l, 1) Example: m = ( ) 2, t = q = 6 i 0 = 0, i 1 = 4, i 2 = 5, i 3 = 6, i 4 = 8, i 5 = 10 Optimal Cost: 2 b* = ( ) 2 a* = ( ) 2 Optimal Solution: circuit#cubes#inputs #minterms (hex) lower bound upper bound newapla exp shift21197FF01212 newcond in in bca x1dn802749E0D80310 ts FFF8216 Results on modified Espresso benchmarks: Upper Bound Optimal! Q(i 0, t, 0) Q(i 1, t 1, 1) Q(i 2, t 2, 0) Q(i 3, t 3, 1) Q(i 2q − 4, t 2q − 4, 0) Q(i 2q − 3, t 2q − 3, 1)Q(i 2q − 1, t 2q − 1, 1) Q(i 2q − 2, t 2q − 2, 0) Q(0, t, 0)