Technology Independent Logic Optimization Outline

Technology Independent Logic Optimization Outline

Technology Independent Logic Optimization Prof. Kurt Keutzer EECS University of California Berkeley, CA Thanks to R. Rudell, S. Malik 1 Outline • Motivation for Multilevel • Overview of Techniques • Details on multilevel techniques Kurt Keutzer 2 Copyright © 2001 K. Keutzer 1 2-Level =>Programmable Logic Arrays (PLAs) We can represent any Boolean function in a 2-level/SOP form Any such representation can be implemented in a PLA 4 inputs 3 outputs 6 product terms Kurt Keutzer 3 Early “Synthesis” Flow STI/Restart LTI+Sen STI Highway-green Farmroad-yellow FSM 100001 001010 LTI Sen/Restart Initialize/Restart LTI+Sen/Restart Highway-yellow Farmroad-green 010001 001100 STI LTI Sen FSM STI/Restart Synthesis logic F1 = B + D + A C + A C SOP logic optimization I1 I2 PLA O1 physical O2 design layout Kurt Keutzer 4 Copyright © 2001 K. Keutzer 2 Why Multilevel Combinational Circuits? There are many functions that are too “expensive” to implement in two-level form Try 16-bit adder ⇒ 32 input lines and 216 product terms! 2-level: control logic design multi-level: datapath logic or random logic Kurt Keutzer 5 Two-Level versus Multilevel Even simple functions expressed in 2-Level: f1 = AB + AC + AD f2 = AB+ AC + AE 6 product terms which cannot be shared. 24 transistors in static CMOS May be more efficient in multi-level: Note that B + C is a common term in f1 and f2 K = B + C 3 Levels 20 transistors in static CMOS not counting inverters f1 =ΑΚ+AD f2 = AK + AE Kurt Keutzer 6 Copyright © 2001 K. Keutzer 3 Outline • Motivation for Multilevel • Overview of Techniques • Details on multilevel techniques Kurt Keutzer 7 RTL Design Flow HDL RTL Manual Module Synthesis Design Generators a 0 d netlist q Library b 1 s clk logic optimization a 0 d q netlist b 1 s clk physical design layout Kurt Keutzer 8 Copyright © 2001 K. Keutzer 4 Logic Optimization a 0 d q netlist b 1 Perform a variety of s clk transformations and optimizations Structural graph logic transformations Library optimization Boolean transformations Mapping into a physical library a 0 d q 1 netlist b s clk smaller, faster less power Kurt Keutzer 9 Reduce to Combinational Optimization B Flip-flops inputs Combinational outputs Logic input arrival times output required times input drive output load Kurt Keutzer 10 Copyright © 2001 K. Keutzer 5 Representation: Boolean Network y5 = H5 = y1 y2 v v y = H = y y A Boolean network is designatedη = (y , H ) where: 6 6 3 4 v y7 = H7 = y1y6 + y2 y = (y1 ,K ,yn+m+r ) is a vector of variables v y8 = H8 = y5 + y6 H = (H1 ,K ,Hn+m+r ) is a vector of functions y9 = H9 = y7 y H y 10 = 10 = 8 y1 ,K , yn are the primary input variables yn+1,K ,yn+r are the intermediate variables y y yn+r+1,K yn+m+r are the primary output variables 9 10 yi = Hi (y1,K yn+m+r ) y 7 y 8 A Boolean network has an associated graph which shows the function dependencies; i.e., the edge (i, j) is present if yi ∈sup(H j ). y y 5 6 y 1 y 2 y 3 y 4 Kurt Keutzer 11 Combinational Logic Optimization Input: Initial Boolean network Timing characterization for the module - input arrival times and drive factors - output loading factors Optimization goals - output required times Target library description Output: Minimum-area net-list of library gates which meets timing constraints A very difficult optimization problem ! Kurt Keutzer 12 Copyright © 2001 K. Keutzer 6 Modern Approach to Logic Optimization Divide logic optimization into two subproblems: • Technology-independent optimization - determine overall logic structure - estimate costs (mostly) independent of technology - simplified cost modeling • Technology-dependent optimization (technology mapping) - binding onto the gates in the library - detailed technology-specific cost model Orchestration of various optimization/transformation techniques for each subproblem Kurt Keutzer 13 Formats Boolean Network, Boolean equations Generic library – technology independent • Has standard functions – ND2, ND4, AOI22, pos-edge- FF • only an estimate of timing Actual technology library • Represents logic functions and their physical characteristics of a library cells offered by a particular silicon vendor – e.g. TSMC • E.g. captured in .lib file • Contains complete logical, timing information Kurt Keutzer 14 Copyright © 2001 K. Keutzer 7 Logic Optimization 2-level Logic opt netlist tech multilevel independent Logic opt logic Library optimization tech dependent Generic Library netlist Real Library Kurt Keutzer 15 Tech.-Independent Optimization Involves: Minimizing two-level logic functions. Finding common subexpressions. Substituting one expression into another. Factoring single functions. Factored versus Disjunctive forms f = ac + ad + bc + bd + ae sum-of-products or disjunctive form f = ()a + b ()+c + d ae factored form multi-level or complex gate Kurt Keutzer 16 Copyright © 2001 K. Keutzer 8 Decomposition G is a Boolean divisor of F if F = G⋅ H + R for functions H ≠ 0, R ≠ 0 Searching for divisors which are common to many functions in the network Decomposition: identify divisors which are common to several functions introduce common divisor as a new node re-express existing nodes using the new divisor Technology-independent measure of cost to measure goodness area cost: total number of literals delay cost: levels of logic on the critical path Kurt Keutzer 17 Division • 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 g1 = a + bc g2 = 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) h1 = f//g1 = d, r1 = ae + j • Boolean division: h2 = f ÷ g2 = (a + c)d, r2 = ae + j. i.e. f = (a+b)(a+c)d + ae + j Kurt Keutzer 18 Copyright © 2001 K. Keutzer 9 Strong (or Boolean) Division Given a function f to be strong divided by g Add an extra input to f corresponding to g, namely G and obtain function h as follows hDC = Gg+ G g hON = fON − hDC hOFF = fON + hDC Minimize h using two-level minimizer Kurt Keutzer 19 Algebraic vs. Boolean Methods Algebraic techniques view equations as polynomials and attempt to factor equations or “divide” them Do not exploit Boolean identities e.g., a a = 0 In algebraic substitution (or division) if a function f = f(a, b, c) is divided by g = g(a, b), a and b will not appear in f / g Algebraic division: O(n log n) time Boolean division: unmanageable number of divisors Kurt Keutzer 20 Copyright © 2001 K. Keutzer 10 Comparison of factorization f = ab+ ac+ ba+ bc + ca + cb Algebraic factorization procedures f = ab()+ c + a ()+b + c bc + cb Boolean factorization produces f = ()a + b + c ()a + b + c Kurt Keutzer 21 Comparison Substitution is the factoring of one node in the Boolean Network (e.g. l) by another (e.g. r) Algebraic substitution of l into r fails Boolean substitution yields results l = ()bf+ bf ()a + e + ae()b f + bf r = ()bf+ b f ()a + e + ae() b f + bf After resub: r = ael()+ el + ae()l + el l = aer()+ e r + a (e r + er) Kurt Keutzer 22 Copyright © 2001 K. Keutzer 11 Algebraic Decomposition Algebraic approximation (informal definition) - simplify Boolean function using two-level minimization - treat result as a polynomial; i.e., xi and xi are different variables i.e., xi ⋅ x i ≠ 0 and xi ⋅ xi ≠ xi - identify common divisors as algebraic divisors of the polynomials Kurt Keutzer 23 Algebraic Decomposition Algebraic approximation (informal definition) - simplify Boolean function using two-level minimization - treat result as a polynomial; i.e., xi and xi are different variables i.e., xi ⋅ x i ≠ 0 and xi ⋅ xi ≠ xi - identify common divisors as algebraic divisors of the polynomials Motivation - manipulating polynomials is fast (linear time algorithms) - # algebraic divisors still exponential, but usually manageable - loss of optimality, but experimentally shows good results - interleave Boolean simplification procedures to improve results Kurt Keutzer 24 Copyright © 2001 K. Keutzer 12 Algebraic Decomposition Algebraic approximation (informal definition) - simplify Boolean function using two-level minimization - treat result as a polynomial; i.e., xi and xi are different variables i.e., xi ⋅ x i ≠ 0 and xi ⋅ xi ≠ xi - identify common divisors as algebraic divisors of the polynomials Techniques - single-cube algebraic divisors (common-cube decomposition) - multiple-cube algebraic divisors (kernel decomposition) Kurt Keutzer 25 Decomposition? F = a d e + b d e + c d e + f G = b g + c g + d g + a e f H = a e g + b c How can this logic be further simplified? Kurt Keutzer 26 Copyright © 2001 K. Keutzer 13 Common Cube Decomposition F = X d + b d e + c d e + f F = a d e + b d e + c d e + f G = b g + c g + d g + X f G = b g + c g + d g + a e f H = X g + b c H = a e g + b c X = a e Finds algebraic divisors which are single cubes "Common cubes" are easy to detect Greedy algorithm: – enumerate all maximal common cubes – select cube which saves the most literals – add node to the network and re-express affected nodes – repeat until no common cubes remain References: [Dietmeyer-69], [Brayton-82], [Rudell-89] Kurt Keutzer 27 Kernel Decomposition F = a d e + b d e + c d e + f F = (a + b + c) d e + f F = (a + X) d e + f G = b g + c g + d g + a e f G = (b + c + d) g + a e f G = (X + d) g + a e f H = a e g + b c H = a e g + b c H = a e g + b c X = b + c cube-free: an expression is cube-free if no literal appears in every cube kernel: A kernel of an expression is a cube-free divisor which is not contained in any other cube-free divisor (e.g., a + b + c is a kernel of F, while b + c is not a kernel because it is contained in a + b + c) Kernels are useful because: -if f and g share a common multiple-cube divisor, then the intersection of some kernel from f and some kernel from g yields a common multiple- cube divisor [Brayton-82].

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    25 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us