1 Outline Division is central in many operations. –What is it (in the context of Boolean functions)? –What to divide (divisor) with? –How to divide (quotient.

Slides:



Advertisements
Similar presentations
Recap: Mining association rules from large datasets
Advertisements

Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Factored Forms.
Closure Properties of CFL's
CSE115/ENGR160 Discrete Mathematics 03/13/12 Ming-Hsuan Yang UC Merced 1.
ECE 667 Synthesis & Verification - Algebraic Division 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Multi-level Minimization Algebraic.
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 9 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Multi-level.
ECE Synthesis & Verification - Lecture 14 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems BDD-based.
Multilevel Logic Synthesis -- Algebraic Methods. ENEE 6442 Why Algebraic Methods? > What is our goal? minimization, maximally factored form. > Algebraic.
Logic Synthesis 3 Outline –Multi-Level Logic Optimization –Local Transformations –Weak Division Goal –Understand multi-level optimization –Understand local.
Using PQ Trees For Comparative Genomics - CPM Using PQ Trees For Comparative Genomics Gad M. Landau – Univ. of Haifa Laxmi Parida – IBM T.J. Watson.
Logic Synthesis 3 1 Logic Synthesis Part III Maciej Ciesielski Univ. of Massachusetts Amherst, MA.
ECE 667 Synthesis & Verification - Multi-level Optimization 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Multi-level Minimization (Kernel-based)
ECE 667 Synthesis and Verification of Digital Systems
1 Outline Division is central in many operations. –What is it (in the context of Boolean functions)? –What to divide (divisor) with? –How to divide (quotient.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
ECE 667 Synthesis and Verification of Digital Systems
ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Multi-level.
CSE Autumn Combinational Logic - 1 Multi-Level Optimization z1. Reduce number of literals yfewer literals means less transistors (less space)
CSCI 1900 Discrete Structures
Chapter 2 The Fundamentals: Algorithms, the Integers, and Matrices
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
Zvi Kohavi and Niraj K. Jha 1 Capabilities, Minimization, and Transformation of Sequential Machines.
CPSC 3730 Cryptography and Network Security
1 Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown Chapter 4 – Finite Fields.
Based on slides by: Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 9 – Multilevel Optimization.
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.
CS143 Review: Normalization Theory Q: Is it a good table design? We can start with an ER diagram or with a large relation that contain a sample of the.
Zvi Kohavi and Niraj K. Jha 1 Multi-level Logic Synthesis.
1 Multi-Level Logic Synthesis Slides courtesy of Andreas Kuehlmann (Cadence)
Fractional Factorial Design Full Factorial Disadvantages Full Factorial Disadvantages –Costly (Degrees of freedom wasted on estimating higher order terms)
The Integers. The Division Algorithms A high-school question: Compute 58/17. We can write 58 as 58 = 3 (17) + 7 This forms illustrates the answer: “3.
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Algebraic Division.
Converting to Minterms Form
Multi-Level Logic Optimization. Multi-Level Logic Synthesis Two Level Logic : –Espresso –Programmable Logic Array (PLA) Multilevel Logic : –Standard Cell.
Minimum Cover of F. Minimal Cover for a Set of FDs Minimal cover G for a set of FDs F: –Closure of F = closure of G. –Right hand side of each FD in G.
1 BOOLEAN ALGEBRA Basic mathematics for the study of logic design is Boolean Algebra Basic laws of Boolean Algebra will be implemented as switching devices.
Technology Mapping. 2 Technology mapping is the phase of logic synthesis when gates are selected from a technology library to implement the circuit. Technology.
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
AES Encryption FIPS 197, November 26, Bit Block Encryption Key Lengths 128, 192, 256 Number of Rounds Key Length Rounds Block.
Fundamental Concepts of Algebra
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.
Continuity and One- Sided Limits (1.4) September 26th, 2012.
BDS – A BDD Based Logic Optimization System Presented by Nitin Prakash (ECE 667, Spring 2011)
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect18: Multi Level Logic Minimization.
1 CS 352 Introduction to Logic Design Lecture 2 Ahmed Ezzat Boolean Algebra and Its Applications Ch-3 + Ch-4.
Capabilities, Minimization, and Transformation of Sequential Machines
Logic Synthesis Boolean Division.
Unit-III Algebraic Structures
CSE15 Discrete Mathematics 03/15/17
Lesson 2.9 Objective: Probability permutations and combinations
ECE 667 Synthesis and Verification of Digital Systems
Optimized Implementation of Logic Function
Combinations COURSE 3 LESSON 11-3
Optimized Implementation of Logic Function
ECE 667 Synthesis and Verification of Digital Systems
Lecture 13 Logistics Last lecture Today HW4 up, due on Wednesday PLDs
Optimization Algorithm
EECS150 - Digital Design Lecture 7 - Boolean Algebra II
AB AC AD AE AF 5 ways If you used AB, then, there would be 4 remaining ODD vertices (C, D, E and F) CD CE CF 3 ways If you used CD, then, there.
Exploring Partially ordered sets
2.5 Reasoning Using Properties from Algebra
VLSI CAD Flow: Logic Synthesis, Placement and Routing Lecture 5
ECE 352 Digital System Fundamentals
Copyright © Zeph Grunschlag,
Kruskal’s Algorithm AQR.
Presentation transcript:

1 Outline Division is central in many operations. –What is it (in the context of Boolean functions)? –What to divide (divisor) with? –How to divide (quotient and remainder)? Applications: factoring, resubstitution, extraction

2 Product Definition 1: An algebraic expression is a SOP representation of a logic function which is minimal w.r.t. single cube containment. Example: ab + abc + cd is not an algebraic expression, ab + cd is. Definition 2: The product of two algebraic expressions f and g, fg, is a  c i d j where {c i } = f, {d j } = g, made irredundant w.r.t single cube containment e.g. ab + a = a

3 Product Algebraic product: defined only when f and g have disjoint supports. –Boolean product: otherwise. Example: –(a+b)(c+d) = ac + ad + bc + bd is an algebraic product –(a+b)(a+c) = aa + ac + ab + bc = a + bc is a Boolean product.

4 Division Definition 3: g is a Boolean divisor of f if h and r exist such that f = gh + r, gh  0. g is said to be a factor of f if, in addition, r = 0, i.e., f = gh. –h is called the quotient. –r is called the remainder. –h and r may not be unique. If gh is restricted to an algebraic product, h is the algebraic quotient, denoted f//g. Otherwise, h is a (non- unique) Boolean quotient denoted f  g. (We will reserve the notation f/g for the more useful “weak division”, defined later).

5 Division ( f = gh+r ) If h  0, and h can be obtained using algebraic division, then g is an algebraic divisor of f. Otherwise, g is a Boolean divisor of f. Example: f = ad + ae + bcd + j g 1 = a + bc g 2 = a + b Algebraic division f//a = d + e, f//(bc) = d (Also, f//a = d or f//a = e, i.e. algebraic division is not unique) h 1 = f//g 1 = d, r 1 = ae + jAlgebraic division f//a = d + e, f//(bc) = d (Also, f//a = d or f//a = e, i.e. algebraic division is not unique) h 1 = f//g 1 = d, r 1 = ae + j Boolean division: h 2 = f  g 2 = (a + c)d, r 2 = ae + j. i.e. f = (a+b)(a+c)d + ae + jBoolean division: h 2 = f  g 2 = (a + c)d, r 2 = ae + j. i.e. f = (a+b)(a+c)d + ae + j

6 Division Definition 4: g is an algebraic factor of f if there exists an algebraic expression h such that f = gh (using algebraic multiplication).

7 Why Use Algebraic Methods? need spectrum of operations - Algebraic methods provide fast algorithmsneed spectrum of operations - Algebraic methods provide fast algorithms treat logic function like a polynomialtreat logic function like a polynomial fast methods for manipulation of polynomials availablefast methods for manipulation of polynomials available loss of optimality, but results quite goodloss of optimality, but results quite good can iterate and interleave with Boolean operationscan iterate and interleave with Boolean operations

8 Division Theorem 5: A logic function g is a Boolean factor of a logic function, f, if and only if f  g (i.e. fg’ = 0, i.e. g’  f’). f g

9 Division Proof:  : g is a Boolean factor of f. Then  h such that f = gh; Hence, f  g (as well as h).  : f  g  f = gf = g(f + r) = gh. (Here r is any function r  g’.) Notes: 1.h = f works fine for the proof. 2.Given f and g, h is not unique. 3.To get a small h is the same as getting a small f + r. Since rg = 0, this is the same as minimizing (simplifying) f with DC = g’.

10 Division Theorem 6: g is a Boolean divisor of f if and only if fg  0. gfg

11 Division Proof:  : f = gh + r, gh  0  fg = gh + gr. Since gh  0, fg  0.  : Assume that fg  0. f = fg + fg’ = g(f + k) + fg’. (Here k  g’.) Then f = gh + r, with h = f + k, r = fg’. Since gh = fg  0, then gh  0. Note: f has many divisors. We are looking for a g such that f = gh + r, where g, h, r are simple functions. (simplify f with DC = g’)

12 Algebraic Division Algebraic division, Alg_Div, is any operation, given F, G, returns H, R where –GH is an algebraic product and –GH + R and F are the same expression (having the same set of cubes). Weak division is a specific example of algebraic division. DEFINITION 16: Given two algebraic expressions F and G, a division is called weak division if 1.it is algebraic and 2.R has as few cubes as possible. The quotient H resulting from weak division is denoted by F/G. THEOREM 17: Given expressions F and G, H and R generated by weak division are unique.

13 Algorithm WEAK_DIV(F,G): G={ g 1, g 2,…, } 1.U = {u j } - cubes of F but only literals in G kept. 2.V = {v j } - cubes of F but literals in G removed. /* note that u j v j is the j-th cube of F */ 3.V g i = { v j  V : u j = g i } /* one set for each cube of G */ 4.H =  V g i /* those cubes found in all V g i */ 5.R = F \ GH 6.return (H,R) Note: Time complexity of WEAK_DIV = O(n log n), n = number of product terms in F and G.

14 Example of WEAK_DIV Example: F = ace + ade + bc + bd + be +a’b + ab G = ae + b U = ae + ae + b + b + b + b + ab V = c + d + c + d a’ + 1 V ae = c + d V g i = { v j  V : u j = g i } V b = c + d a’ H = c + d = F/G H =  V g i R = be + a’b + ab R = F \ GH F = (ae + b)(c + d) + be + a’b + ab

15 Efficiency Issues We use filters to prevent trying a division. The cover G is not an algebraic divisor of F if 1.G contains a literal not in F. 2.G has more terms than F. 3.For any literal, its count in G exceeds that in F. 4.F is in the transitive fanin of G. Proof. If G were an algebraic divisor of F, F = GH + E.

16 Division - What do we divide with? So far, we learned how to divide a given expression F by another expression G. But how do we find G ? –Too many Boolean divisors –Restrict to algebraic divisors. Problem: Given a set of functions { F i }, find common weak (algebraic) divisors.

17 Kernels and Kernel Intersections DEFINITION 18: An expression is cube-free if no cube divides the expression evenly (i.e. there is no literal that is common to all the cubes). (e.g., ab + c is cube-free; ab + ac and abc are not cube-free). Note: a cube-free expression must have more than one cube. DEFINITION 19: The primary divisors of an expression F are the set of expressions D(F) = {F/c | c is a cube}.

18 Kernels and Kernel Intersections DEFINITIONS 20: The kernels of an expression F are the set of expressions K(F) = {G | G  D(F) and G is cube-free}. In other words, the kernels of an expression F are the cube-free primary divisors of F. DEFINITION 21: A cube c used to obtain the kernel K = F/c is called a co-kernel of K. C(F) is used to denote the set of co-kernels of F.

19 Example Example: x = adf + aef + bdf + bef + cdf + cef + g = (a + b + c)(d + e)f + g kernelsco-kernels a+b+cdf, ef d+eaf, bf, cf (a+b+c)(d+e)f+g1

20 Fundamental Theorem THEOREM 22: If two expressions F and G have the property that  k F  K(F),  k G  K(G)  | k G  k F |  1 (k G and k F have at most one term in common), then F and G have no common algebraic multiple divisors (i.e. with more than one cube). Important: If we “kernel” all functions and there are no nontrivial intersections, then the only common algebraic divisors left are single cube divisors.

21 The Level of a Kernel It is nearly as effective to compute a certain subset of K(F). This leads to the definition for the level of a kernel: Notes: 1.K 0 (F)  K 1 (F)  K 2 (F) ...  K n (F)  K(F). 2.level-n kernels = K n (F) \ K n-1 (F) 3.K n (F) is the set of kernels of level k or less. 4.A level-0 kernel has no kernels except itself. 5.A level-n kernel has at least one level n-1 kernel but no kernels (except itself) of level n or greater.

22 Level of a Kernel Example Example: F = (a + b(c + d))(e + g) k 1 = a + b(c + d)  K 1  K 0 ==> level-1 k 2 = c + d  K 0 k 3 = e + g  K 0

23 Kerneling Algorithm R  KERNEL( j, G ) R  0 if (G is cube-free) R  {G} For i = j + 1,..., n { if (l i appears only in one term) continue else if (  k  i, l k  all cubes of G/l i ), continue else, R  R  KERNEL( i, cube_free(G/l i ) ) } return R

24 Kerneling Algorithm KERNEL(0, F) returns all the kernels of F. Notes: 1.The test (  k  i, l k  all cubes of G/l i ) is a major efficiency factor. It also guarantees that no co-kernel is tried more than once. 2.This algorithm has stood up to all attempts to find faster ones. 3.Can be used to generate all co-kernels.

25 Kerneling Illustrated abcd + abce + adfg + aefg + adbe + acdef + beg a b c (a) c d e (a) (a) ac+d+g g d+ecd+g f ce+g f b+cf e d b+df e b+ef d c d+e c+e c+d b c d e (bc + fg)(d + e) + de(b + cf) c(d+e) + de a(d+e)

26 Kerneling Illustrated co-kernelskernels 1a((bc + fg)(d + e) + de(b + cf))) + beg a(bc + fg)(d + e) + de(b + cf) abc(d+e) + de abcd + e abdc + e abec + d acb(d + e) + def acdb + ef Note: f/bc = ad + ae = a(d + e)

27 Applications - Factoring FACTOR ( F ): 1.if (F has no factor) return F /* e.g. if |F| = 1, or an OR of literals or no literal appears more that once */ 1.D = CHOOSE_DIVISOR (F) 2.(Q, R) = DIVIDE (F, D) 3.return FACTOR (Q) FACTOR (D) + FACTOR (R)

28 Improving the Divisor Various kinds of factoring can be obtained by choosing different forms of DIVISOR and DIVIDE. CHOOSE_DIVISOR: LITERAL - chooses most frequent literal QUICK_DIVISOR - chooses the first level-0 kernel BEST_DIVISOR - chooses the best kernel DIVIDE: Algebraic Division Boolean Division

29 Factoring algorithms x = ac + ad + ae + ag + bc + bd +be + bf + ce + cf + df + dg LITERAL_FACTOR: x = a(c + d + e + g) + b(c + d + e + f) + c(e + f) + d(f + g) QUICK_FACTOR: x = g(a + d) + (a + b)(c + d + e) + c(e + f) + f(b + d) GOOD_FACTOR: (c + d + e)(a + b) + f(b + c + d) + g(a + d) + ce

30 Application - Decomposition Recall: decomposition is the same as factoring except: 1.divisors are added as new nodes in the network. 2.the new nodes may fan out elsewhere in the network in both positive and negative phases DECOMP(f i ) k = CHOOSE_KERNEL(f i ) if (k == 0) return f m+j = k /* create new node m + j */ f i = (f i /k) y m+j + (f i /k’) y’ m+j + r /* change node i */ DECOMP(f i ) DECOMP(f m+j ) Similar to factoring, we can define QUICK_DECOMP: pick a level 0 kernel and improve it. GOOD_DECOMP: pick the best kernel.

31 Re-substitution (resub) Idea: An existing node in a network may be a useful divisor in another node. If so, no loss in using it (unless delay is a factor). Algebraic substitution consists of the process of algebraically dividing the function f i at node i in the network by the function f j (or by f’ j ) at node j. During substitution, if f j is an algebraic divisor of f i, then f i is transformed into f i = qy j + r (or f i = q 1 y j + q 0 y’ j + r ) In practice, this is tried for each node pair of the network. n nodes in the network  O(n 2 ) divisions. fifififi fjfjfjfj yjyjyjyj

32 Extraction-I Recall: Extraction operation identifies common sub- expressions and manipulates the Boolean network. We can combine decomposition and substitution to provide an effective extraction algorithm. EXTRACT(  ) For each node n {  = DECOMP(n,  ) } For each node n { RESUB(n,  ) } Eliminate nodes with small value

33 Extraction-II Kernel Extraction: 1. Find all kernels of all functions 2. Choose kernel intersection with best “value” 3. Create new node with this as function 4. Algebraically substitute new node everywhere 5. Repeat 1,2,3,4 until best value  threshold New Node

34Example-Extraction f 1 = ab(c(d + e) + f + g) + h f 2 = ai(c(d + e) + f + j) + k only level-0 kernels used in this example Extraction: K 0 (f 1 ) = K 0 (f 2 ) = {d + e} l = d + e f 1 = ab(cl + f + g) + h f 2 = ai(cl + f + j) + k Extraction: K 0 (f 1 ) = {cl + f + g} K 0 (f 2 ) = {cl + f + j} K 0 (f 1 )  K 0 (f 2 ) = cl + f m = cl + f f 1 = ab(m + g) + h f 2 = ai(m + j) + k Note: no kernel intersections at this point. cube extraction: n = am f 1 = b(n + ag) + h f 2 = i(n + aj) + k