1 Multi-Level Logic Synthesis Slides courtesy of Andreas Kuehlmann (Cadence)

Slides:



Advertisements
Similar presentations
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Factored Forms.
Advertisements

Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
FPGA-Based System Design: Chapter 4 Copyright  2004 Prentice Hall PTR Topics n Logic synthesis. n Placement and routing.
ECE Synthesis & Verification 1 ECE 667 Synthesis and Verification of Digital Systems Formal Verification Combinational Equivalence Checking.
Multilevel Logic Synthesis -- Introduction. ENEE 6442 Multilevel Logic Synthesis: Outline > Introduction =What is multilevel logic? =Why we need it? =Problems.
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 - 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 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 Circuits Introduction.
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.
Logic Synthesis Part II
ELEN 468 Lecture 121 ELEN 468 Advanced Logic Design Lecture 12 Synthesis of Combinational Logic I.
CSE241 L5 Synthesis.1Kahng & Cichy, UCSD ©2003 CSE241 VLSI Digital Circuits UC San Diego Winter 2003 Lecture 05: Logic Synthesis Cho Moon Cadence Design.
Logic Synthesis 1 Outline –Logic Synthesis Problem –Logic Specification –Two-Level Logic Optimization Goal –Understand logic synthesis problem –Understand.
Boolean Functions and their Representations
ECE Synthesis & Verification - Lecture 14 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems BDD-based.
DAG-Aware AIG Rewriting Alan Mishchenko, Satrajit Chatterjee, Robert Brayton Department of EECS, University of California Berkeley Presented by Rozana.
ECE Synthesis & Verification - Lecture 10 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Binary.
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 & Verification - BDD 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Binary Decision Diagrams (BDD)
 2000 M. CiesielskiPTL Synthesis1 Synthesis for Pass Transistor Logic Maciej Ciesielski Dept. of Electrical & Computer Engineering University of Massachusetts,
ECE 667 Synthesis and Verification of Digital Systems
ICS 252 Introduction to Computer Design Multi-level Logic Optimization Fall 2006 Eli Bozorgzadeh Computer Science Department-UCI.
Intro to Logic Synthesis 1 Introduction to Logic Synthesis Maciej Ciesielski Univ. of Massachusetts Amherst, MA.
FPGA Technology Mapping. 2 Technology mapping:  Implements the optimized nodes of the Boolean network to the target device library.  For FPGA, library.
ECE Synthesis & Verification, Lecture 17 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Technology.
Logic Decomposition ECE1769 Jianwen Zhu (Courtesy Dennis Wu)
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.
1 VLSI CAD Flow: Logic Synthesis, Lecture 13 by Ajay Joshi (Slides by S. Devadas)
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
KU College of Engineering Elec 204: Digital Systems Design
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Department of Computer Engineering
Combinatorial Algorithms Unate Covering Binate Covering Graph Coloring Maximum Clique.
Electrical and Computer Engineering Archana Rengaraj ABC Logic Synthesis basics ECE 667 Synthesis and Verification of Digital Systems Spring 2011.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect19: Multi Level Logic Minimization.
Zvi Kohavi and Niraj K. Jha 1 Multi-level Logic Synthesis.
ECE 260B – CSE 241A Static Timing Analysis 1http://vlsicad.ucsd.edu ECE260B – CSE241A Winter 2005 Logic Synthesis Website:
Optimization Algorithm
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
1 EECS 219B Spring 2001 Timing Optimization Andreas Kuehlmann.
UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.
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.
Why consider ND-MV networks? Multi-Values: Multi-valued domains can be used to explore larger optimization spaces. Several interesting direct applications.
Technology Mapping. 2 Technology mapping is the phase of logic synthesis when gates are selected from a technology library to implement the circuit. Technology.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Multi-Level Logic Synthesis.
Ch.5 Logic Design Standard Cell Design TAIST ICTES Program VLSI Design Methodology Hiroaki Kunieda Tokyo Institute of Technology 1.
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
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)
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Timing Optimization.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect18: Multi Level Logic Minimization.
ICS 252 Introduction to Computer Design
ICS 252 Introduction to Computer Design
Computer Organisation
ECE 667 Synthesis and Verification of Digital Circuits
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Reconfigurable Computing
ICS 252 Introduction to Computer Design
ECE 667 Synthesis and Verification of Digital Systems
Topics Logic synthesis. Placement and routing..
Sungho Kang Yonsei University
Technology Mapping I based on tree covering
VLSI CAD Flow: Logic Synthesis, Placement and Routing Lecture 5
Circuit Simplification and
Presentation transcript:

1 Multi-Level Logic Synthesis Slides courtesy of Andreas Kuehlmann (Cadence)

2 Finite State Machine Model X=(x 1,x 2,…,x n ) Y=(y 1,y 2,…,y n )  S=(s 1,s 2,…,s n ) S’=(s’ 1,s’ 2,…,s’ n ) D M(X,Y,S,S 0, , ): X: Inputs Y: Outputs S: Current State S 0 : Initial State(s)  : X  S  S (next state function)  : X  S  Y (output function) Delay element: Clocked: synchronous single-phase clock, multiple-phase clocks Unclocked: asynchronous

3 General Logic Structure Combinational optimization –keep latches/registers at current positions, keep their function –optimize combinational logic in between Sequential optimization –change latch position/function

4 Optimization Criteria for Synthesis The optimization criteria for multi-level logic is to minimize some function of: 1.Area occupied by the logic gates and interconnect (approximated by literals = transistors in technology independent optimization) 2.Critical path delay of the longest path through the logic 3.Degree of testability of the circuit, measured in terms of the percentage of faults covered by a specified set of test vectors for an approximate fault model (e.g. single or multiple stuck-at faults) 4.Power consumed by the logic gates 5.Noise Immunity 6.Place-ability, Wire-ability while simultaneously satisfying upper or lower bound constraints placed on these physical quantities

5 Example: Area-Delay Trade-off

6 Two-Level (PLA) vs. Multi-Level PLA control logic constrained layout highly automatic technology independent multi-valued logic input, output, state encoding Very predictable Multi-level Logic all logic general (e.g. standard cell, regular blocks,..) automatic partially technology independent some ideas part of multi-level logic Very hard to predict E.g. Standard Cell Layout

7 General Approaches to Synthesis PLA Synthesis: –theory well understood –predictable results in a top-down flow Multi-Level Synthesis: –optimization criteria very complex except niches, no general theory available –greedy optimization approach incrementally improve along various dimensions of the criteria attempt a change, accept if criteria improves, otherwise reject –works on common design representation (circuit or network representation)

8 Transformation-based Synthesis all modern synthesis systems are built that way –set of transformations that change network representation work on uniform network representation –“script” of “scenario” that can combine those transformations transformations differ in: –the scope they are applied local scope versus global restructuring –the domain they optimize combinational versus sequential timing versus area technology independent versus technology dependent – the underlying algorithms they use BDD based, SAT based, structure based

9 Network Representation Boolean network: directed acyclic graph (DAG) node logic function representation f j (x,y) node variable y j : y j = f j (x,y) edge (i,j) if f j depends explicitly on y i Inputs x = (x 1, x 2,…,x n ) Outputs z = (z 1, z 2,…,z p ) External don’t cares d 1 (x), d 2 (x),…, d p (x)

10 Typical Synthesis Scenario RTL to Network TransformationTechnology independent OptimizationsTechnology MappingTechnology Dependent Optimizations - read Verilog - control/data flow analysis - basic logic restructuring - crude measures for goals - use logic gates from target cell library - timing optimization - physically driven optimizations Test Preparation - improve testability - test logic insertion

11 Local versus Global Transformations Local transformations optimize the function of one node of the network –smaller area –faster performance –map to a particular set of cells Global transformations restructure the entire network –merging nodes –splitting nodes –removing/changing connections between nodes Node representation: –SOP, POS –BDD –Factored forms –keep size bounded to avoid blow-up of local transformations

12 Sum of Products (SOP) Example: abc’+a’bd+b’d’+b’e’f (sum of cubes) Advantages: easy to manipulate and minimize many algorithms available (e.g. AND, OR, TAUTOLOGY) two-level theory applies Disadvantages: Not representative of logic complexity. For example f=ad+ae+bd+be+cd+cef’=a’b’c’+d’e’ These differ in their implementation by an inverter. hence not easy to estimate logic; difficult to estimate progress during logic manipulation

13 Reduced Ordered BDDs like factored form, represents both function and complement like network of muxes, but restricted since controlled by primary input variables not really a good estimator for implementation complexity

14 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

15 Factored Forms Note: literal count  transistor count  area however, area also depends on –wiring –gate size etc. therefore very crude measure

16 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.

17 Factored Forms 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’

18 Factored Forms 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.

19 Factored Forms SOPs forms are used as the internal representation of logic functions in most multi-level logic optimization systems. Advantages good algorithms for manipulating them are available Disadvantages performance is unpredictable - they may accidentally generate a function whose SOP form is too large factoring algorithms have to be used constantly to provide an estimate for the size of the Boolean network, and the time spent on factoring may become significant Possible solution avoid SOP representation by using factored forms as the internal representation this is not practical unless we know how to perform logic operations directly on factored forms without converting to SOP forms extensions to factored forms of the most common logic operations have been partially provided

20 Manipulation of Boolean Networks Basic Techniques: structural operations (change topology) –algebraic –Boolean node simplification (change node functions) –don’t cares –node minimization

21 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 minimizing, 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)) decompose, f 1 = c(x+a’)+ac’x’ f 2 = gx x = d(b+f)+d’(b’+e) Two problems: find good common subfunctions effect the division

22 Structural Operations Basic Operations: 1. Decomposition (single function) f = abc+abd+a’c’d’+b’c’d’  f = xy+x’y’x = aby = 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

23 Structural Operations 4. Substitution g = a+bf = a+bc  f = g(a+c) 5. Collapsing (also called elimination) f = ga+g’bg = c+d  f = ac+ad+bc’d’g = c+d Note: “division” plays a key role in all of these

24 Factoring vs. Decomposition Factoring f=(e+g’)(d(a+c)+a’b’c’)+b(a+c) Decomposition: y(b+dx)+xb’y’ Note: this is similar to BDD collapsing of common nodes and using negative pointers. But not canonical, so don’t have perfect identification of common nodes. Tree DAG

25 Value of a Node and Elimination where n i = number of times literals y j and y j ’ occur in factored form f i l j = number of literals in factored f j with factoring without factoring value = (without factoring) - (with factoring) Can treat y j and y j ’ the same since  ( F j ) =  ( F j ’ ).

26 Literals before = =17 Literals after = 9+15 = Value of a Node and Elimination Difference after - before = value = 7 But we may not have the same value if we were to eliminate, simplify and then re-factor. x

27 Value of a Node and Elimination Note: value of a node can change during elimination value=3

28 Why Use Algebraic Methods? need spectrum of operations – algebraic methods provide fast algorithms treat logic function like a polynomial –efficient data structures –fast methods for manipulation of polynomials available loss of optimality, but results quite good can iterate and interleave with Boolean operations in specific instances slight extensions available to include Boolean methods

29 Weak Division Weak division is a specific example of algebraic division. DEFINITION: Given two algebraic expressions F and G, a division is called weak division if it is algebraic and R has as few cubes as possible. The quotient H resulting from weak division is denoted by F/G. THEOREM: Given expressions F and G, H and R generated by weak division are unique.

30 Division - What do we divide with? Weak_Div provides a methods to divide an expression for a given divisor How do we find a “good” divisor? –Restrict to algebraic divisors –generalize to Boolean divisors Problem: –Given a set of functions { F i }, find common weak (algebraic) divisors.

31 Application - Decomposition Decomposition is the same as factoring except: –divisors are added as new nodes in the network. –the new nodes may fan out elsewhere in the network in both positive and negative phases Algorithm 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 using new // node for kernel 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.

32 Re-substitution 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 j, 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

33 Extraction Recall: Extraction operation identifies common sub-expressions and manipulates the Boolean network. Combine decomposition and substitution to provide an effective extraction algorithm. Algorithm EXTRACT foreach node n { DECOMP(n) // decompose all network nodes } foreach node n { RESUB(n) // resubstitute using existing nodes } ELIMINATE_NODES_WITH_SMALL_VALUE }

34 Extraction 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