ECE 667 - Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Multi-level.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Factored Forms.
Logical Systems Synthesis.
Multilevel Logic Synthesis -- Introduction. ENEE 6442 Multilevel Logic Synthesis: Outline > Introduction =What is multilevel logic? =Why we need it? =Problems.
ECE 667 Synthesis & Verification - Algebraic Division 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Multi-level Minimization Algebraic.
ECE 667 Synthesis & Verification - Boolean Functions 1 ECE 667 Spring 2013 ECE 667 Spring 2013 Synthesis and Verification of Digital Circuits Boolean Functions.
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
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
ECE 331 – Digital System Design
ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Circuits Introduction.
Logic Synthesis Part II
Circuit Optimization Goal: To obtain the simplest implementation for a given function Optimization is a more formal approach to simplification that is.
Boolean Functions and their Representations
Lecture 5 Multilevel Logic Synthesis
ECE Synthesis & Verification - Lecture 9b 1 ECE 697B (667) Fall 2004 ECE 697B (667) Fall 2004 Synthesis and Verification of Digital Systems Boolean.
ECE Synthesis & Verification - Lecture 14 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems BDD-based.
ECE Synthesis & Verification - Lecture 10 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Binary.
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
Intro to Logic Synthesis 1 Introduction to Logic Synthesis Maciej Ciesielski Univ. of Massachusetts Amherst, MA.
ECE Synthesis & Verification, Lecture 17 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Technology.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Boolean Algebra and Logic Simplification. Boolean Addition & Multiplication Boolean Addition performed by OR gate Sum Term describes Boolean Addition.
Chapter 2: Boolean Algebra and Logic Functions
ECE 667 Synthesis and Verification of Digital Systems
EEE324 Digital Electronics Ian McCrumRoom 5B18, Lecture 4: Boolean Algebra.
Department of Computer Engineering
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect19: Multi Level Logic Minimization.
1 Multi-Level Logic Synthesis Slides courtesy of Andreas Kuehlmann (Cadence)
ECE 331 – Digital System Design NAND and NOR Circuits, Multi-level Logic Circuits, and Multiple-output Logic Circuits (Lecture #9) The slides included.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
ETE 204 – Digital Electronics
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Multi-Level Logic Optimization. Multi-Level Logic Synthesis Two Level Logic : –Espresso –Programmable Logic Array (PLA) Multilevel Logic : –Standard Cell.
05 BA2 Page 1 ECEn/CS 224 Boolean Algebra – Part 2.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Multi-Level Logic Synthesis.
ECE 171 Digital Circuits Chapter 4 Boolean Algebra Herbert G. Mayer, PSU Status 2/1/2016 Copied with Permission from prof. Mark PSU ECE.
CSE 140: Components and Design Techniques for Digital Systems Lecture 3: Incompletely Specified Functions and K Maps CK Cheng Dept. of Computer Science.
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.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Standard & Canonical Forms COE 202 Digital Logic Design Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd University of Petroleum.
BDS – A BDD Based Logic Optimization System Presented by Nitin Prakash (ECE 667, Spring 2011)
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect18: Multi Level Logic Minimization.
Lecture 3: Incompletely Specified Functions and K Maps
Chapter 2: Boolean Algebra and Logic Functions
Computer Organisation
ECE 3110: Introduction to Digital Systems
CS 352 Introduction to Logic Design
ECE 331 – Digital System Design
Optimized Implementation of Logic Function
Propositional Calculus: Boolean Algebra and Simplification
Lecture 3: Incompletely Specified Functions and K Maps
Boolean Algebra.
Optimized Implementation of Logic Function
BASIC & COMBINATIONAL LOGIC CIRCUIT
Combinatorial Logic Circuit
Optimization Algorithm
EECS150 - Digital Design Lecture 7 - Boolean Algebra II
Karnaugh Maps Introduction Venn Diagrams 2-variable K-maps
Optimized Implementation of Logic Function
Technology Mapping I based on tree covering
VLSI CAD Flow: Logic Synthesis, Placement and Routing Lecture 5
Analysis of Logic Circuits Example 1
Laws & Rules of Boolean Algebra
Lecture 3: Incompletely Specified Functions and K Maps
Presentation transcript:

ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Multi-level Minimization Factored forms Slides adopted (with permission) from A. Kuehlmann, UC Berkeley 2003

ECE Synthesis & Verification - Lecture 8 2 Outline Factored forms – –Definitions – –Examples Manipulation of Boolean networks – –Algebraic (structural) vs Boolean methods Decomposition Extraction Factorization Substitution (elimination) Collapsing

ECE Synthesis & Verification - Lecture 8 3 Factored Forms Example: (ad+b’c)(c+d’(e+ac’))+(d+e)fg Advantages good representative of logic complexity f=ad+ae+bd+be+cd+cef’=a’b’c’+d’e’  f=(a+b+c)(d+e) in many designs (e.g. complex gate CMOS) the implementation of a function corresponds directly to its factored form good estimator of logic implementation complexity doesn’t blow up easily Disadvantages not as many algorithms available for manipulation hence often just convert into SOP before manipulation

ECE Synthesis & Verification - Lecture 8 4 Factored Forms and CMOS Design Note: literal count  transistor count  area however, area also depends on –wiring –gate size etc. therefore a very crude measure

ECE Synthesis & Verification - Lecture 8 5 Algebraic Expressions Definition 1: f is an algebraic expression if f is a set of cubes (SOP), such that no single cube contains another (minimal with respect to single cube containment) Example: ab+ac is an algebraic expression a+ab is not an algebraic expression (a contains ab ) Definition 2: The product of two expressions f and g is a set defined by fg = {cd | c  f and d  g and cd  0} Example: (a+b)(c+d+a’)=ac+ad+bc+bd+a’b Definition 3: fg is an algebraic product if f and g are algebraic expressions and have disjoint support (that is, they have no input variables in common) Example: (a+b)(c+d)=ac+ad+bc+bd is an algebraic product

ECE Synthesis & Verification - Lecture 8 6 Factored Forms Definition 4: The factored form can be defined recursively by the following rules. A factored form is either a product or sum where: a product is either a single literal or a product of factored forms a sum is either a single literal or a sum of factored forms A factored form is a parenthesized algebraic expression. In effect a factored form is a product of sums of products … or a sum of products of sums … Any logic function can be represented by a factored form, and any factored form is a representation of some logic function.

ECE Synthesis & Verification - Lecture 8 7 Factored Form Examples Examples of factored forms: x y’ abc’ a+b’c ((a’+b)cd+e)(a+b’)+e’ (a+b)’c is not a factored form since complementation is not allowed, except on literals. Three equivalent factored forms (factored forms are not unique): ab+c(a+b)bc+a(b+c)ac+b(a+c)

ECE Synthesis & Verification - Lecture 8 8 Factorization Value Definition 5: The factorization value of an algebraic factorization F=G 1 G 2 +R is defined to be fact_val(F,G 2 ) = lits(F)-( lits(G 1 )+lits(G 2 )+lits(R) ) = (|G 1 |-1) lits(G 2 ) + (|G 2 |-1) lits(G 1 ) G 1, G 2 and R are algebraic expressions, and |G| = number of cubes in the SOP form of G, lits(G) = number of literals of G. Example: The expression F = ae+af+ag+bce+bcf+bcg+bde+bdf+bdg can be expressed in the form F = (a+bc+bd))(e+f+g), which requires 8 literals, rather than 24 (gain = 16). That is: for G 1 =(a+bc+bd), G 2 =(e+f+g) and R= , fact_val(F,G 2 ) = 2  3+2  5=16. Recursive factorization applied to G 1 = a+bc+bd = a + b(c+d) saves one extra literal.

ECE Synthesis & Verification - Lecture 8 9 Factored Forms Factored forms are more compact representations of logic functions than the traditional sum of products form. Example: factored form F = (a+b)(c+d(e+f(g+h+i+j) while its SOP represented is: F = ac+ade+adfg+adfh+adfi+adfj+bc+bde+bdfg+ bdfh+bdfi+bdfj Every SOP is a factored form, but it may not be a good factorization.

ECE Synthesis & Verification - Lecture 8 10 Factored Forms When measured in terms of number of inputs, there are functions whose size is exponential in sum of products representation, but polynomial in factored form. Example: Achilles’ heel function There are n literals in the factored form and (n/2)  2 n/2 literals in the SOP form. Factored forms are useful in estimating area and delay in a multi-level synthesis and optimization system. In many design styles (e.g. complex gate CMOS design) the implementation of a function corresponds directly to its factored form.

ECE Synthesis & Verification - Lecture 8 11 Factored Forms as Trees Factored forms cam be graphically represented as labeled trees, called factoring trees, in which each internal node including the root is labeled with either + or , and each leaf has a label of either a variable or its complement. Example: factoring tree of ((a’+b)cd+e)(a+b’)+e’

ECE Synthesis & Verification - Lecture 8 12 Factored Forms - Size Definition 6: The size of a factored form F (denoted  (F )) is the number of literals in the factored form. Example:  (( a+b)ca’) = 4  ((a+b+cd)(a’+b’)) = 6 A factored form is optimal if no other factored form (for that function) has fewer literals. A factored form is positive unate in x, if x appears in F, but x’ does not. A factored form is negative unate in x, if x’ appears in F, but x does not. F is unate in x if it is either positive or negative unate in x, otherwise F is binate in x. Example: (a+b’)c+a’ is positive unate in c, negative unate in b, and binate in a.

ECE Synthesis & Verification - Lecture 8 13 Manipulation of Boolean Networks Basic Techniques: structural operations (change topology) –algebraic –Boolean node simplification (change node functions) –don’t cares –node minimization

ECE Synthesis & Verification - Lecture 8 14 Structural Operations Restructuring Problem: Given initial network, find best network. Example:f 1 = abcd+abce+ab’cd’+ab’c’d’+a’c+cdf+abc’d’e’+ab’c’df’ f 2 = bdg+b’dfg+b’d’g+bd’eg minimization f 1 = bcd+bce+b’d’+a’c+cdf+abc’d’e’+ab’c’df’ f 2 = bdg+dfg+b’d’g+d’eg factoring f 1 = c(b(d+e)+b’(d’+f)+a’)+ac’(bd’e’+b’df’) f 2 = g(d(b+f)+d’(b’+e)) decomposition f 1 = c(x+a’)+ac’x’ f 2 = gx x = d(b+f)+d’(b’+e) Two main problems: find good common subfunctions effect the division

ECE Synthesis & Verification - Lecture 8 15 Structural Operations Basic Operations: 1. Decomposition (single function) f = abc+abd+a’c’d’+b’c’d’  f = xy+x’y’, x = ab, y = c+d 2. Extraction (multiple functions) f = (az+bz’)cd+e g = (az+bz’)e’ h = cde  f = xy+e, g = xe’, h = ye, x = az+bz’, y = cd 3. Factoring (series-parallel decomposition) f = ac+ad+bc+bd+e  f = (a+b)(c+d)+e

ECE Synthesis & Verification - Lecture 8 16 Structural Operations 4. Substitution g = a+b f = ac+bc + d  f = gc+d 5. Collapsing (also called elimination) f = ga+g’b g = c+d  f = ac+ad+bc’d’ Note: division plays a key role in all of these

ECE Synthesis & Verification - Lecture 8 17 Factoring vs. Decomposition Factoring: f = (e+g’)(d(a+c)+a’b’c’)+b(a+c) Decomposition: y(b+dx)+xb’y’, where : x = a+c, y = e+g’ Note:: this is similar to BDD collapsing of common nodes and using negative pointers. But it is not canonical, so don’t have perfect identification of common nodes. Tree DAG

ECE Synthesis & Verification - Lecture 8 18 Value of Node Elimination No. of literals with factoring: No. of literals without factoring: value (gain) of node j = cost(without factoring) - cost(with factoring) Note: we can treat y j and y j ’ the same way since  ( F j ) =  ( F j ’ ). These nodes are expressed in terms of node y j (contain literal y j ) n i = number of times literal y j or y j ’ occurs in factored form f i l j = number of literals in factored form f j

ECE Synthesis & Verification - Lecture 8 19 Literals before = =17 Literals after = 9+15 = Gain = 7 Gain = 7 Value of Node Elimination Difference after - before = value = 7 But we may not have the same value if we were to eliminate, simplify and then re-factor. Node elimination value depends on the sequence of operations. x Node to be eliminated, present as literal x in its fanout

ECE Synthesis & Verification - Lecture 8 20 Value of a Node and Elimination Note: value of a node can change during elimination value=3

ECE Synthesis & Verification - Lecture 8 21 Optimum Factored Forms Definition 7: –Let f be a completely specified Boolean function, and  (f) be the minimum number of literals in any factored form of f. Definition 8: –Let sup(f) be the true variable support of f, i.e. the set of variables f depends on. Two functions f and g are orthogonal (f  g), if sup(f)  sup(g)= .

ECE Synthesis & Verification - Lecture 8 22 Optimum Factored Forms Lemma: Let f=g+h such that g  h, then  (f)=  (g)+  (h). Proof: Let F, G and H be the optimum factored forms of f, g and h. Since G+H is a factored form,  (f)=  (F)  (G+H)=  (g)+  (h). Let c be a minterm, on sup(g), of g’. Since g and h have disjoint support, we have f c =(g+h) c =g c +h c =0+h c =h c =h. Similarly, if d is a minterm of h’, f d =g. Because  (h)=  (f c )  (F c ) and  (g)=  (f d )  (F d ),  (h)+  (g)  (F c )+  (F d ). Let m (n) be the number of literals in F that are from SUPPORT(g) (SUPPORT(h)). When computing F c (F d ), we replace all the literals from SUPPORT(g) (SUPPORT(h)) by the appropriate values and simplify the factored form by eliminating all the constants and possibly some literals from sup(g) (sup(h)) by using the Boolean identities. Hence  (F c )  n and  (F d )  m. Since  (F)=m+n,  (F c )+  (F d )  m+n=  (F). We have  (f)  (g)+  (h)   (F c )+  (F d )  (F)   (f)=  (F).

ECE Synthesis & Verification - Lecture 8 23 Note: the previous result does not imply that all minimum literal factored forms of f are sums of the minimum literal factored forms of g and h. Corollary: Let f=gh such that g h, then  (f)=  (g)+  (h). Proof: Let F’ denote the factored form obtained using DeMorgan’s law. Then  (F)=  (F’), and therefore  (f)=  (f’). From the above lemma, we have  (f)=  (f’)=  (g’+h’)=  (g’)+  (h’)=  (g)+  (h). Theorem: Let such that f ij f kl,  i  j or k  l, then Proof: Use induction on m and then n, and lemma 1 and corollary 1. Optimum Factored Forms