Boolean Functions and their Representations

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Boolean Functions and Circuits.
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
CSEE 4823 Advanced Logic Design Handout: Lecture #2 1/22/15
Logical Systems Synthesis.
Chapter 2 Logic Circuits.
ECE 667 Synthesis & Verification - SAT 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Boolean SAT CNF Representation Slides adopted (with.
ECE Synthesis & Verification 1 ECE 667 Spring 2011 ECE 667 Spring 2011 Synthesis and Verification of Digital Circuits Introduction to Logic Synthesis.
ECE 667 Synthesis & Verification - Boolean Functions 1 ECE 667 Spring 2013 ECE 667 Spring 2013 Synthesis and Verification of Digital Circuits Boolean Functions.
ECE 667 Synthesis and Verification of Digital Systems
ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic.
ECE 301 – Digital Electronics Minterm and Maxterm Expansions and Incompletely Specified Functions (Lecture #6) The slides included herein were taken from.
ECE 331 – Digital System Design
Logic Gate Level Part 2. Constructing Boolean expression from truth table First method: write nonparenthesized OR of ANDs Each AND is a 1 in the result.
ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Circuits Introduction.
DATE-2002TED1 Taylor Expansion Diagrams: A Compact Canonical Representation for Symbolic Verification M. Ciesielski, P. Kalla, Z. Zeng B. Rouzeyre Electrical.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
ECE Synthesis & Verification - Lecture 18 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Word-level.
Rolf Drechlser’s slides used
ECE Synthesis & Verification - Lecture 0 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Circuits Boolean.
ECE Synthesis & Verification - Lecture 9b 1 ECE 697B (667) Fall 2004 ECE 697B (667) Fall 2004 Synthesis and Verification of Digital Systems Boolean.
Taylor Expansion Diagrams (TED): Verification EC667: Synthesis and Verification of Digital Systems Spring 2011 Presented by: Sudhan.
ECE Synthesis & Verification - Lecture 10 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Binary.
 2001 CiesielskiBDD Tutorial1 Decision Diagrams Maciej Ciesielski Electrical & Computer Engineering University of Massachusetts, Amherst, USA
ECE 667 Synthesis & Verification - BDD 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Binary Decision Diagrams (BDD)
CS150 Newton5.2.1 Outline mLast time: ÜImplementation of logic functions: TTL, CMOS ÜDelay models: Transition time, propagation delay ÜHazards and "Glitches"
By Tariq Bashir Ahmad Taylor Expansion Diagrams (TED) Adapted from the paper M. Ciesielski, P. Kalla, Z. Zeng, B. Rouzeyre,”Taylor Expansion Diagrams:
Propositional Calculus Math Foundations of Computer Science.
Chapter 2: Boolean Algebra and Logic Functions
ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Multi-level.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: BDD BDDs applied in equivalence checking.
Logic Function Optimization. Combinational Logic Circuit Regular SOP and POS designs Do not care expressions Digital logic circuit applications Karnaugh.
Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary.
Boolean Algebra and Digital Circuits
ECE 331 – Digital System Design
 Seattle Pacific University EE Logic System DesignSOP-POS-1 The Connection: Truth Tables to Functions abcF abcF
UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
LOGIC GATES & BOOLEAN ALGEBRA
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
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.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
BDDs1 Binary Tree Representation The recursive Shannon expansion corresponds to a binary tree Example: Each path from the root to a leaf corresponds to.
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.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect10: Two-level Logic Minimization.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
Binary Decision Diagrams Prof. Shobha Vasudevan ECE, UIUC ECE 462.
Lecture 3: Incompletely Specified Functions and K Maps
Logic Gates and Boolean Algebra
Chapter 2: Boolean Algebra and Logic Functions
CS 105 Digital Logic Design
CHAPTER 1 : INTRODUCTION
Princess Sumaya University
ECE 331 – Digital System Design
Reading: Hambley Chapters
ECE 667 Synthesis and Verification of Digital Systems
Lecture 3: Incompletely Specified Functions and K Maps
Alan Mishchenko University of California, Berkeley
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION Part (a)
Chapter 2 Introduction to Logic Circuits
Lecture 5 Logistics Last lecture Today’s lecture
A logic function f in n inputs x1, x2, ...xn and
Technology Mapping I based on tree covering
A logic function f in n inputs x1, x2, ...xn and
Lecture 3: Incompletely Specified Functions and K Maps
Presentation transcript:

Boolean Functions and their Representations ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Circuits Boolean Functions and their Representations Slides adopted (with permission) from A. Kuehlmann, UC Berkeley 2003 ECE 667

The Boolean Space Bn B = { 0,1}, B2 = {0,1} X {0,1} = {00, 01, 10, 11} Karnaugh Maps: Boolean Cubes: B0 B1 B2 B3 B4 ECE 667 - Synthesis & Verification - Lecture 9a

Boolean Functions x2 x1 ECE 667 - Synthesis & Verification - Lecture 9a

Boolean Functions Literal x1 represents the logic function f, where f = {x| x1 = 1} Literal x1 represents the logic function g where g = {x| x1 = 0} x1 x3 x2 f = x1 x1 x2 x3 f = x1 Notation: x’ = x ECE 667 - Synthesis & Verification - Lecture 9a

Set of Boolean Functions Truth Table or Function Table: x1x2x3 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0  1 1 0 1 0 1 1 0 1 1 1 1 0 x3 x2 x1 There are 2n vertices in input space Bn There are 22n distinct logic functions. Each subset of vertices is a distinct logic function: f  Bn ECE 667 - Synthesis & Verification - Lecture 9a

Boolean Operations - AND, OR, COMPLEMENT Given two Boolean functions: f : Bn  B g : Bn  B AND operation f × g = {x | f(x)=1 Ù g(x)=1} The OR operation f + g = {x | f(x)=1 Ú g(x)=1} The COMPLEMENT operation (^f or f’ ) f’ = {x | f(x) = 0} ECE 667 - Synthesis & Verification - Lecture 9a

Cofactor and Quantification Given a Boolean function: f : Bn  B, with the input variables (x1,x2,…,xi,…,xn) Positive Cofactor of function f w.r.t variable xi fxi = {x | f(x1,x2,…,1,…,xn)=1} Negative Cofactor of f w.r.t variable xi fxi’ = {x | f(x1,x2,…,0,…,xn)=1} Existential Quantification of function f w.r.t variable xi, $xi f = {x | f(x1,x2,…,0,…,xn)=1 Ú f(x1,x2,…,1,…,xn)=1} Universal Quantification of function f w.r.t variable xi, "xi f = {x | f(x1,x2,…,0,…,xn)=1 Ù f(x1,x2,…,1,…,xn)=1} ECE 667 - Synthesis & Verification - Lecture 9a

Representations of Boolean Functions We need representations for Boolean Functions for two reasons: to represent and manipulate the actual circuit we are “synthesizing” as mechanism to do efficient Boolean reasoning Forms to represent Boolean Functions Truth table List of cubes: Sum of Products, Disjunctive Normal Form (DNF) List of conjuncts: Product of Sums, Conjunctive Normal Form (CNF) Boolean formula Binary Decision Tree, Binary Decision Diagram Circuit (network of Boolean primitives) Canonicity – which forms are canonical? ECE 667 - Synthesis & Verification - Lecture 9a

Truth Table Truth table (Function Table): ab’c’d + ab’cd + abc’d + The truth table of a function f : Bn  B is a tabulation of its values at each of the 2n vertices of Bn. (all mintems) Example: f = a’b’c’d + a’b’cd + a’bc’d + ab’c’d + ab’cd + abc’d + abcd’ + abcd (Notation for complement: a’ = a ) The truth table representation is - intractable for large n - canonical Canonical means that if two functions are the same, then the canonical representations of each are isomorphic (identical). abcd f 0 0000 0 1 0001 1 2 0010 0 3 0011 1 4 0100 0 5 0101 1 6 0110 0 7 0111 0 8 1000 0 9 1001 1 10 1010 0 11 1011 1 12 1100 0 13 1101 1 14 1110 1 15 1111 1 ECE 667 - Synthesis & Verification - Lecture 9a

Boolean Formula A Boolean formula is defined as an expression with the following syntax: formula ::= ‘(‘ formula ‘)’ | <variable> | formula “+” formula (OR operator) | formula “×” formula (AND operator) | ^ formula (complement) Example: f = (x1×x2) + (x3) + ^^(x4 × (^x1)) typically the “×” is omitted and the ‘(‘ and ‘^’ are simply reduced by priority, e.g. f = x1x2 + x3 + x4^x1 ECE 667 - Synthesis & Verification - Lecture 9a

Cubes A cube is defined as the product (AND) of a set of literal functions (“conjunction” of literals). Example: C = x1x’2x3 represents the following function f = (x1=1)(x2=0)(x3=1) x1 x2 x3 c = x1 f = x1x2 f = x1x2x3 ECE 667 - Synthesis & Verification - Lecture 9a

Cubes If C  f, C a cube, then C is an implicant of f. If C  Bn, and C has k literals, then |C| covers 2n-k vertices. Example: C = xy  B3 k = 2 , n = 3 => |C| = 2 = 23-2. C = {100, 101} In an n-dimensional Boolean space Bn, an implicant with n literals is a minterm. ECE 667 - Synthesis & Verification - Lecture 9a

List of Cubes Sum of Products (SOP) F = {ab, ac, bc} 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. F1={ab, ac, bc} and F2={abc, abc, abc, abc} are covers of f = ab + ac + bc. ECE 667 - Synthesis & Verification - Lecture 9a

Binary Decision Diagram (BDD) f = ab+a’c+a’bd Graph representation of a Boolean function - vertices represent decision nodes for variables - two children represent the two subfunctions f(x = 0) and f(x = 1) (cofactors) - restrictions on ordering and reduction rules can make a BDD representation canonical c a b d 1 c+bd root node c+d 1 ECE 667 - Synthesis & Verification - Lecture 9a

Boolean Networks Used for two main purposes as representation for Boolean reasoning engine as target structure for logic implementation which gets restructured in a series of logic synthesis steps until result is acceptable Efficient representation for most Boolean problems memory complexity is same as the size of circuits we are actually building Close to input representation and output representation in logic synthesis ECE 667 - Synthesis & Verification - Lecture 9a

Definitions – fanin, fanout, support A Boolean circuit is a directed graph C(G,N) where G are the gates and N Í G´G is the set of directed edges (nets) connecting the gates. Some of the vertices are designated: Inputs: I Í G Outputs: O Í G, I Ç O = Æ Each gate g is assigned a Boolean function fg which computes the output of the gate in terms of its inputs. ECE 667 - Synthesis & Verification - Lecture 9a

Definitions – fanin, fanout, support The fanin FI(g) of a gate g are all predecessor vertices of g: FI(g) = {g’ | (g’,g) Î N} The fanout FO(g) of a gate g are all successor vertices of g: FO(g) = {g’ | (g,g’) Î N} The cone CONE(g) of a gate g is the transitive fanin of g and g itself. The support SUPPORT(g) of a gate g are all inputs in its cone: SUPPORT(g) = CONE(g) Ç I ECE 667 - Synthesis & Verification - Lecture 9a

Example – Boolean Network 6 1 5 3 4 7 8 9 2 O I FI(6) = {2,4} FO(6) = {7,9} CONE(6) = {1,2,4,6} SUPPORT(6) = {1,2} Nodes = logic functions of arbitrary complexity ECE 667 - Synthesis & Verification - Lecture 9a

Boolean Network Representations Vertices can have arbitrary number of inputs and outputs typically single-output functions are used Vertices can represent any Boolean function stored in different ways, such as: other circuits (hierarchical representation) truth tables or cube representation Boolean expressions read from a library description BDDs, AIGs, etc. Data structure allow very general mechanisms for insertion and deletion of vertices, pins (connections to vertices), and nets ECE 667 - Synthesis & Verification - Lecture 9a

AND-INVERTER Circuits Base data structure uses two-input AND function for vertices and INVERTER attributes at the edges (individual bit) use De’Morgan’s law to convert OR operation etc. Hash table to identify and reuse structurally isomorphic circuits f g g f Means complement ECE 667 - Synthesis & Verification - Lecture 9a

Data Representation Vertex: Edge: pointers (integer indices) to left and right child and fanout vertices collision chain pointer other data Edge: pointer or index into array one bit to represent inversion Global hash table holds each vertex to identify isomorphic structures Garbage collection to regularly free un-referenced vertices ECE 667 - Synthesis & Verification - Lecture 9a

Data Representation Hash Table one 8456 6423 …. ... …. 0455 0456 0456 Constant One Vertex zero left 0457 1 right ... 1345 …. next 7463 …. fanout hash value left pointer complement bits right pointer 0456 left next in collision chain right array of fanout pointers next fanout ECE 667 - Synthesis & Verification - Lecture 9a