CALTECH CS137 Winter2004 -- DeHon CS137: Electronic Design Automation Day 5: January 21, 2004 Multi-level Synthesis.

Slides:



Advertisements
Similar presentations
ENGG3190 Logic Synthesis “Multi Level Logic” (Part II) Winter 2014 S. Areibi School of Engineering University of Guelph.
Advertisements

FPGA-Based System Design: Chapter 4 Copyright  2004 Prentice Hall PTR Topics n Logic synthesis. n Placement and routing.
Timing Optimization. Optimization of Timing Three phases 1globally restructure to reduce the maximum level or longest path Ex: a ripple carry adder ==>
ECE 667 Synthesis & Verification - Algebraic Division 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Multi-level Minimization Algebraic.
ECE 667 Synthesis and Verification of Digital Systems
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
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.
Multilevel Logic Minimization -- Introduction. ENEE 6442 Outline > Multi-level minimization: technology independent local optimization. > What to optimize:
Logic Synthesis Part II
Penn ESE353 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: February 5, 2008 Multi-level Synthesis.
EDA (CS286.5b) Day 15 Logic Synthesis: Two-Level.
Caltech CS184a Fall DeHon1 CS184a: Computer Architecture (Structures and Organization) Day10: October 25, 2000 Computing Elements 2: Cascades, ALUs,
EDA (CS286.5b) Day 17 Sequential Logic Synthesis (FSM Optimization)
Technology Mapping.
Logic Synthesis Outline –Logic Synthesis Problem –Logic Specification –Two-Level Logic Optimization Goal –Understand logic synthesis problem –Understand.
Logic Synthesis 5 Outline –Multi-Level Logic Optimization –Recursive Learning - HANNIBAL Goal –Understand recursive learning –Understand HANNIBAL algorithms.
Logic Synthesis 1 Outline –Logic Synthesis Problem –Logic Specification –Two-Level Logic Optimization Goal –Understand logic synthesis problem –Understand.
Penn ESE353 Spring DeHon 1 ESE535: Electronic Design Automation Day 14: March 16, 2009 Multi-level Synthesis.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 11, 2008 Static Timing Analysis and Multi-Level Speedup.
ECE Synthesis & Verification - Lecture 14 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems BDD-based.
Gate Logic: Two Level Canonical Forms
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: March 2, 2009 Sequential Optimization (FSM Encoding)
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.
CS294-6 Reconfigurable Computing Day 15 October 13, 1998 LUT Mapping.
EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.
EDA (CS286.5b) Day 16 Logic Synthesis: Multi-Level.
Logic Synthesis 3 Outline –Multi-Level Logic Optimization –Local Transformations –Weak Division Goal –Understand multi-level optimization –Understand local.
ECE 667 Synthesis and Verification of Digital Systems
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 18, 2009 Static Timing Analysis and Multi-Level Speedup.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 13, 2008 Retiming.
Logic Decomposition ECE1769 Jianwen Zhu (Courtesy Dennis Wu)
ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Multi-level.
EEE324 Digital Electronics Ian McCrumRoom 5B18, Lecture 4: Boolean Algebra.
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.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 24: April 18, 2011 Covering and Retiming.
Two Level and Multi level Minimization
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 5: October 7, 2005 Multi-level Synthesis.
Penn ESE353 Spring DeHon 1 ESE535: Electronic Design Automation Day 22: April 15, 2015 Multi-level Synthesis.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 18, 2015 Architecture Synthesis (Provisioning, Allocation)
2-1 Introduction Gate Logic: Two-Level Simplification Design Example: Two Bit Comparator Block Diagram and Truth Table A 4-Variable K-map for each of the.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 7: February 3, 2002 Retiming.
Multi-Level Logic Optimization. Multi-Level Logic Synthesis Two Level Logic : –Espresso –Programmable Logic Array (PLA) Multilevel Logic : –Standard Cell.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: February 20, 2002 Routing 1.
Penn ESE534 Spring DeHon 1 ESE534: Computer Organization Day 2: January 20, 2010 Universality, Gates, Logic Work Preclass Exercise.
Technology Mapping. 2 Technology mapping is the phase of logic synthesis when gates are selected from a technology library to implement the circuit. Technology.
CALTECH CS137 Spring DeHon 1 CS137: Electronic Design Automation Day 5: April 12, 2004 Covering and Retiming.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 15: March 4, 2002 Two-Level Logic-Synthesis.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 6: January 26, 2004 Sequential Optimization (FSM Encoding)
Boolean Functions 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Boolean Functions Basics Maciej Ciesielski Univ.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 17: March 11, 2002 Sequential Optimization (FSM Encoding)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 4, 2011 Static Timing Analysis and Multi-Level Speedup.
CBSSS 2002: DeHon Universal Programming Organization André DeHon Tuesday, June 18, 2002.
ICS 252 Introduction to Computer Design Lecture 8 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.
1 CS 352 Introduction to Logic Design Lecture 4 Ahmed Ezzat Multi-level Gate Circuits and Combinational Circuit Design Ch-7 + Ch-8.
State university of New York at New Paltz Electrical and Computer Engineering Department Logic Synthesis Optimization Lect18: Multi Level Logic Minimization.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 2: September 28, 2005 Covering.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
CS137: Electronic Design Automation
CS137: Electronic Design Automation
ESE535: Electronic Design Automation
ECE 667 Synthesis and Verification of Digital Systems
Topics Logic synthesis. Placement and routing..
Timing Optimization.
ESE535: Electronic Design Automation
Technology Mapping I based on tree covering
VLSI CAD Flow: Logic Synthesis, Placement and Routing Lecture 5
CS137: Electronic Design Automation
Presentation transcript:

CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 5: January 21, 2004 Multi-level Synthesis

CALTECH CS137 Winter DeHon Today Multilevel Synthesis/Optimization –Why –Transforms -- defined –Division/extraction How we support transforms –Boolean Division Higher quality division –Speedup sketch

CALTECH CS137 Winter DeHon Multi-level General circuit netlist May have –sums within products –products within sum –arbitrarily deep y=((a (b+c)+e)fg+h)i

CALTECH CS137 Winter DeHon Why multi-level? ab(c+d+e)(f+g)

CALTECH CS137 Winter DeHon Why multi-level? ab(c+d+e)(f+g) abcf+abdf+abef+abcg+abdg+abeg 6 product terms vs. 3 gates: and4,or3,or2 Cannot share sub-expressions

CALTECH CS137 Winter DeHon Why Multilevel a xor b –a/b+/ab a xor b xor c –a/bc+/abc+/a/b/c+ab/c a xor b xor c xor d –a/bcd+/abcd+/a/b/cd+ab/cd+/ab/c/d+a/b/c/d+abc/d+/a/bc/d

CALTECH CS137 Winter DeHon Why Multilevel a xor b –x1=a/b+/ab a xor b xor c –x2=x1/c+/x1*c a xor b xor c xor d –x3=x2/d+x2*d Multi-level –exploit common sub-expressions –linear complexity Two-level –exponential complexity

CALTECH CS137 Winter DeHon Goal Find the structure Exploit to minimize gates –Total (area) –In path (delay)

CALTECH CS137 Winter DeHon Multi-level Transformations Decomposition Extraction Factoring Substitution Collapsing [copy these to board so stay up as we move forward]

CALTECH CS137 Winter DeHon Decomposition F=abc+abd+/a/c/d+/b/c/d F=XY+/X/Y X=ab Y=c+d

CALTECH CS137 Winter DeHon Decomposition F=abc+abd+/a/c/d+/b/c/d –4 3-input input F=XY+/X/Y X=ab Y=c+d –5 2-input gates Note: use X and /X, use at multiple places

CALTECH CS137 Winter DeHon Extraction F=(a+b)cd+e G=(a+b)/e H=cde F=XY+e G=x/e H=Ye X=a+b Y=cd

CALTECH CS137 Winter DeHon Extraction F=(a+b)cd+e G=(a+b)/e H=cde 2-input: 4 3-input: 2 F=XY+e G=X/e H=Ye X=a+b Y=cd 2-input: 6 Common sub-expressions over multiple output

CALTECH CS137 Winter DeHon Factoring F=ac+ad+bc+bd+e F=(a+b)(c+d)+e

CALTECH CS137 Winter DeHon Factoring F=ac+ad+bc+bd+e –4 2-input, 1 5-input –9 literals F=(a+b)(c+d)+e –4 2-input –5 literals

CALTECH CS137 Winter DeHon Substitution G=a+b F=a+bc Substitute G into F F=G(a+c) –(verify) F=(a+b)(a+c)=aa+ab+ac+bc=a+bc useful if also have H=a+c? (F=GH)

CALTECH CS137 Winter DeHon Collapsing F=Ga+/Gb G=c+d F=ac+ad+b/c/d opposite of substitution –sometimes want to collapse and refactor –especially for delay optimization

CALTECH CS137 Winter DeHon Moves These transforms define the “moves” we can make to modify our network. Goal is to apply, usually repeatedly, to minimize gates –…then apply as necessary to accelerate design MIS/SIS –Applies to canonical 2-input gates –Then covers with target gate library (back to day2)

CALTECH CS137 Winter DeHon Division

CALTECH CS137 Winter DeHon Division Given: function (f) and divisor (p) Find: quotient and remainder f=pq+r E.g. f=abc+abd+ef, p=ab q=c+d, r=ef

CALTECH CS137 Winter DeHon Algebraic Division Use basic rules of algebra, rather than full boolean properties Computationally simple Weaker than boolean division f=a+bc p=(a+b) Algebra: not divisible Boolean: q=(a+c), r=0

CALTECH CS137 Winter DeHon Algebraic Division f and p are expressions (lists of cubes) p={a 1,a 2,…} h i ={c j | a i * c j  f} f/p = h 1  h 2  h 3 …

CALTECH CS137 Winter DeHon Algebraic Division Example (stay on alg.; work ex on board) f=abc+abd+de g=ab+e

CALTECH CS137 Winter DeHon Algebraic Division Example f=abc+abd+de, p=ab+e p={ab,e} h1={c,d} h2={d} h1  h2={d} f/g=d r=f- p *(f/g) r=abc+abd+de-(ab+e)d r=abc

CALTECH CS137 Winter DeHon Algebraic Division Time O(|f||p|) as described –compare every cube pair Sort cubes first –O((|f|+|p|)log(|f|+|p|)

CALTECH CS137 Winter DeHon Primary Divisor f/c such that c is a cube f =abc+abde f/a=bc+bde is a primary divisor

CALTECH CS137 Winter DeHon Cube Free The only cube that divides p is 1 c+de is cube free bc+bde is not cube free

CALTECH CS137 Winter DeHon Kernel Kernels of f are –cube free primary divisors of f –Informally: sums w/ cubes factored out f=abc+abde f/ab = c+de is a kernel ab is cokernel of f to (c+de) –cokernels always cubes

CALTECH CS137 Winter DeHon Kernel Extraction Find c f = largest cube factor of f K=Kernel1(0,f/c f ) if (f is cube-free) –return(f  K) else –return(K) Kernel1(j,g) –R=g –N max index in g –for(i=j+1 to N) if (l i in 2 or more cubes) –c f =largest cube divide g/l i –if (forall k  i, l k  c f ) »R=R  KERNEL1(i,g/(l i  c f )) –return(R) Must be to Generate Non-trivial kernel Consider each literal for cofactor once (largest kernels will already have been found)

CALTECH CS137 Winter DeHon Kernel Extract Example (stay on prev. slide, ex. on board) f=abcd+abce+abef c f =ab f/c f =cd+ce+ef R={cd+ce+ef} N=6 a,b not present (cd+ce+ef)/c=e+d largest cube 1 Recurse  e+d R={cd+ce+ef,e+d} only 1 d (d+ce+ef)/e=c+f Recurse  c+f R={cd+ce+ef,e+d,c+f}

CALTECH CS137 Winter DeHon Factoring Gfactor(f) if (terms==1) return(f) p=CHOOSE_DIVISOR(f) (h,r)=DIVIDE(f,p) f=Gfactor(h)*Gfactor(p)+Gfactor(r) return(f) // factored

CALTECH CS137 Winter DeHon Factoring Trick is picking divisor –pick from kernels –goal minimize literals after resubstitution Re-express design using new intermediate variables Variable and complement

CALTECH CS137 Winter DeHon Extraction Identify cube-free expressions in many functions (common sub expressions) Generate kernels for each function select pair such that k1  k2 is not a cube new variable from intersection –v= k1  k2 update functions (resubstitute) –f i = v*(f i /v)+ r i –(similar for common cubes)

CALTECH CS137 Winter DeHon Extraction Example X=ab(c(d+e)+f+g)+g Y=ai(c(d+e)+f+j)+k

CALTECH CS137 Winter DeHon Extraction Example X=ab(c(d+e)+f+g)+g Y=ai(c(d+e)+f+j)+k d+e kernel of both L=d+e X=ab(cL+f+g)+h Y=ai(cL+f+j)+k

CALTECH CS137 Winter DeHon Extraction Example L=d+e X=ab(cL+f+g)+h Y=ai(cL+f+j)+k kernels:(cL+f+g), (cL+f+j) extract: M=cL+f X=ab(M+g)+h Y=ai(M+f)+h

CALTECH CS137 Winter DeHon Extraction Example L=d+e M=cL+f X=ab(M+g)+h Y=ai(M+j)+h no kernels common cube: aM N=aM M=cL+f L=d+e X=b(N+ag)+h Y=I(N+aj)+k

CALTECH CS137 Winter DeHon Extraction Example N=aM M=cL+f L=d+e X=b(N+ag)+h Y=I(N+aj)+k Can collapse –L into M into N –Only used once Get larger common kernel N –maybe useful if components becoming too small for efficient gate implementation

CALTECH CS137 Winter DeHon Resubstitution Also useful to try complement on new factors f=ab+ac+/b/cd X=b+c f=aX+/b/cd /X=/b/c f=aX+/Xd …extracting complements not a direct target

CALTECH CS137 Winter DeHon Good Divisors? Key to CHOOSE_DIVISOR in GFACTOR Variations to improve –e.g. rectangle covering (Devadas 7.4)

CALTECH CS137 Winter DeHon Boolean Division

CALTECH CS137 Winter DeHon Don’t Care Mentioned last time Structure of logic restricts values intermediates can take on

CALTECH CS137 Winter DeHon Don’t Care Example e=/a/b g=/c/d f=/e/g e=0, a=0, b=0 cannot occur DC: e(a+b)+/e/a/b

CALTECH CS137 Winter DeHon Satisfiability DC In general:  z=F(x,y)  z/F(x,y) + /zF(x,y) is don’t care

CALTECH CS137 Winter DeHon Observability DC If output F not differentiated by input y, –then don’t care value of y –i.e. input conditions where (F y =F /y ) ODC =  (F y =F /y ) –(product over all outputs)

CALTECH CS137 Winter DeHon Don’t Care Optimization Select a node in Boolean network Compute ODC for all outputs wrt node Compute SDC in terms of local inputs Minimize wrt ODC  SDC

CALTECH CS137 Winter DeHon Boolean Division f//p assuming sup(p)  sup(f) add input P to f (for p) new function F = f//p –DC-set D=P/p+/Pp –ON-set f  /D –OFF-set /(f  D) minimize F for minimum literals in sum- of-products (last time)

CALTECH CS137 Winter DeHon Boolean Division (check) F ON-set f  /D D=P/p+/Pp /D = Pp+/P/p F = f  /D = F(Pp+/P/p) f = F(Pp+/P/p)p = Fp –Goal since want F=f//p

CALTECH CS137 Winter DeHon Boolean Division Example f=abc+a/b/c+/ab/c+/a/bc p=ab+/a/b F-DC=ab/P+/a/b/P+/abP+a/bP F-On=abcP+/a/bcP+/ab/cP+a/b/c/P After minimization get:  F=cP+/c/P  P=ab+/a/b

CALTECH CS137 Winter DeHon Boolean Division Trick is finding boolean divisors Not as clear how to find –(not as much work on) Can always use boolean division on algebraic divisors –give same or better results

CALTECH CS137 Winter DeHon Speed Up (sketch flavor)

CALTECH CS137 Winter DeHon Speed Up Start with area optimized network Know target arrival times –Or know critical path Want to reduce delay of node

CALTECH CS137 Winter DeHon Basic Idea Improve speed by: –Collapsing node(s) –Refactoring collapsed subgraph to reduce height

CALTECH CS137 Winter DeHon Speed Up While (delay decreasing, timing not met) –Compute delay (slack) –Generate network close to critical path –Weight nodes in network –Compute mincut of nodes on weighted network –Partial collapse and timing redecompose on cut nodes

CALTECH CS137 Winter DeHon Weighted Cut Want to minimize area expansion Want to maximize likely benefit –Prefer nodes with varying input times –Prefer nodes with critical path on longer paths

CALTECH CS137 Winter DeHon Timing Decomposition Extract area saving kernels that do not include critical inputs to node When decompose (e.g. into nand2’s) similarly balance with critical inputs closest to output

CALTECH CS137 Winter DeHon Example

CALTECH CS137 Winter DeHon Example

CALTECH CS137 Winter DeHon Example New factor

CALTECH CS137 Winter DeHon Summary Want to exploit structure in problems to reduce (contain) size –common subexpressions –structural don’t cares Identify component elements –decomposition, factoring, extraction Division key to these operations Speedup refactoring

CALTECH CS137 Winter DeHon Admin Reading for next lecture on web –(exact state assignment TRCAD91)

CALTECH CS137 Winter DeHon Big Ideas Exploit freedom –form –don’t care Exploit structure/sharing –common sub expressions Techniques –Iterative Improvement –Refinement/relaxation