EDA CS286'5b - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

EDA CS286'5b

Description:

ab(c d e)(f g) abcf abdf abef abcg abdg abeg. 6 product terms. 3 gates: and4,or3,or2 ... f=abc abd ef, p=ab. q=c d, r=ef. Algebraic Division ... – PowerPoint PPT presentation

Number of Views:92
Avg rating:3.0/5.0
Slides: 48
Provided by: andre576
Category:
Tags: eda | ab | brigade | cs286

less

Transcript and Presenter's Notes

Title: EDA CS286'5b


1
EDA (CS286.5b)
  • Day 16
  • Logic Synthesis
  • Multi-Level

2
Today
  • Multilevel Synthesis/Optimization
  • Why
  • Transforms
  • Division/extraction
  • Boolean Division
  • Dont care

3
Multi-level
  • General circuit netlist
  • May have
  • sums within products
  • products within sum
  • arbitrarily deep
  • y((a (bc)e)fgh)i

4
Why multi-level?
  • ab(cde)(fg)

5
Why multi-level?
  • ab(cde)(fg)
  • abcfabdfabefabcgabdgabeg
  • 6 product terms
  • 3 gates and4,or3,or2
  • Cannot share sub-expressions

6
Why Multilevel
  • a?b
  • a/b/ab
  • a?b?c
  • a/bc/abc/a/b/cab/c
  • a?b?c?d
  • a/bcd/abcd/a/b/cdab/cd/ab/c/da/b/c/dabc/d/a
    /bc/d

7
Why Multilevel
  • a?b
  • x1a/b/ab
  • a?b?c
  • x2x1/c/x1c
  • a?b?c?d
  • x3x2/dx2d
  • Multi-level
  • exploit common sub-expressions
  • linear complexity
  • Two-level
  • exponential complexity

8
Multi-level Transformations
  • Decomposition
  • Extraction
  • Factoring
  • Substitution
  • Collapsing

9
Decomposition
  • Fabcabd/a/c/d/b/c/d
  • FXY/X/Y
  • Xab
  • Ycd

10
Decomposition
  • Fabcabd/a/c/d/b/c/d
  • 4 3-input 1 4-input
  • FXY/X/Y
  • Xab
  • Ycd
  • 5 2-input gates
  • Note use X and /X, use at multiple places

11
Extraction
  • F(ab)cde
  • G(ab)/e
  • Hcde
  • FXYe
  • Gx/e
  • HYe
  • Xab
  • Ycd

12
Extraction
  • F(ab)cde
  • G(ab)/e
  • Hcde
  • 2-input 4
  • 3-input 2
  • FXYe
  • Gx/e
  • HYe
  • Xab
  • Ycd
  • 2-input 6

Common sub-expressions over multiple output
13
Factoring
  • Facadbcbde
  • F(ab)(cd)e

14
Factoring
  • Facadbcbde
  • 4 2-input, 1 5-input
  • 9 literals
  • F(ab)(cd)e
  • 4 2-input
  • 5 literals

15
Substitution
  • Gab
  • Fabc
  • Substitute G into F
  • FG(ac)
  • (verify) F(ab)(ac)aaabacbcabc
  • useful if also have Hac? (FGH)

16
Collapsing
  • FGa/Gb
  • Gcd
  • Facadb/c/d
  • opposite of substitution
  • sometimes want to collapse and refactor
  • especially for delay optimization

17
Division
  • Given function (f) and divisor (p)
  • Find quotient and remainder
  • fpqr
  • E.g.
  • fabcabdef, pab
  • qcd, ref

18
Algebraic Division
  • Use basic rules of algebra, rather than full
    boolean properties
  • Computationally simple
  • Weaker than boolean division
  • fabc p(ab)
  • Algebra not divisible
  • Boolean q(ac), r0

19
Algebraic Division
  • f and p are expressions (lists of cubes)
  • pa1,a2,
  • hi cj ai cj?f
  • f/p h1?h2 ?h3

20
Algebraic Division Example
  • fabcabdde
  • gabe

21
Algebraic Division Example
  • fabcabdde
  • pabe
  • pab,e
  • h1c,d h2d
  • h1?h2d
  • f/gd
  • rf-f/gabcabdde-(abe)dabc

22
Algebraic Division Time
  • O(fp) as described
  • compare every cube pair
  • Sort cubes first
  • O((fp)log(fp)

23
Primary Divisor
  • f/c such that c is a cube
  • f abcabde
  • f/abcbde is a primary divisor

24
Cube Free
  • The only cube that divides p is 1
  • cde is cube free
  • bcbde is not cube free

25
Kernel
  • Kernels of f are
  • cube free primary divisors of f
  • fabcabde
  • f/ab cde is a kernel
  • ab is cokernel of f to (cde)
  • cokernels always cubes

26
Kernel Extraction
  • Find c largest cube factor of f
  • KKernel1(0,f/c)
  • if (f is cube-free)
  • return(f?K)
  • else
  • return(K)
  • Kernel1(j,g)
  • Rg
  • N max index in g
  • for(ij1 to N)
  • if (li in 2 or more cubes)
  • clargest cube divide g/li
  • if (forall k?I,lk?c)
  • RR ? KERNEL1(I,g/(li?c))
  • return(R)

27
Kernel Extract Example
  • fabcdabceabef
  • cab
  • f/ccdceef
  • Rcdceef
  • N6
  • a,b not present
  • (cdceef)/ced
  • largest cube 1
  • recurse-gted
  • Rcdceef,ed
  • only 1 d
  • (dceef)/ecf
  • recurse-gtcf
  • Rcdceef,ed,cf

28
Factoring
  • Gfactor(f)
  • if (terms1) return(f)
  • pCHOOSE_DIVISOR(f)
  • (h,r)DIVIDE(f,p)
  • fGfactor(h)Gfactor(p)Gfactor(r)
  • return(f) // factored

29
Factoring
  • Trick is picking divisor
  • pick from kernels
  • goal minimize literals after resubstitution

30
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
  • update functions (resubstitute)
  • (similar for common cubes)

31
Extraction Example
  • Xab(c(de)fg)g
  • Yai(c(de)fj)k

32
Extraction Example
  • Xab(c(de)fg)g
  • Yai(c(de)fj)k
  • de kernel of both
  • Lde
  • Xab(cLfg)h
  • Yai(cLfj)k

33
Extraction Example
  • Lde
  • Xab(cLfg)h
  • Yai(cLfj)k
  • kernels(cLfg), (cLfj)
  • extract McLf
  • Xab(Mg)h
  • Yai(Mf)h

34
Extraction Example
  • Lde
  • McLf
  • Xab(Mg)h
  • Yai(Mj)h
  • no kernels
  • common cube aM
  • NaM
  • McLf
  • Lde
  • Xb(Nag)h
  • YI(Naj)k

35
Extraction Example
  • NaM
  • McLf
  • Lde
  • Xb(Nag)h
  • YI(Naj)k
  • Can collapse
  • L into M into N
  • Get larger common kernel N
  • maybe useful if components becoming too small for
    efficient gate implementation

36
Resubstitution
  • Also useful to try complement on new factors
  • fabac/b/cd
  • Xbc
  • faX/b/cd
  • /X/b/c
  • faX/Xd
  • extracting complements not a direct target

37
Good Divisors?
  • Key to CHOOSE_DIVISOR in GFACTOR
  • Variations to improve
  • e.g. rectangle covering

38
Boolean Division
  • f//p assuming sup(p)?sup(f)
  • add input P to f (for p)
  • new function F
  • DC-set DP/p/Pp
  • ON-set f?/D
  • OFF-set /(f?D)
  • minimize F for minimum literals in sum-of-products

39
Boolean Division (check)
  • Sanity (FPpF/P/p)pFp

40
Boolean Division Example
  • fabca/b/c/ab/c/a/bc
  • gab/a/b
  • F-DCab/G/a/b/G/abGa/bG
  • F-OnabcG/a/bcG/ab/cGa/b/c/G
  • minimize
  • FcG/c/G

41
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 reuslts

42
Dont Care
  • Mentioned last time
  • Structure of logic restricts values intermediates
    can take on

43
Dont Care Example
  • e/a/b
  • g/c/d
  • f/e/g
  • e0, a0, b0 cannot occur
  • DC e(ab)/e/a/b

44
Satisfiability DC
  • In general
  • yF(x,y)
  • y/F(x,y) /yF(x,y) is dont care

45
Observability DC
  • If F output not differentiated by input y,
  • then dont care value of y
  • FyF/y
  • ODC ?(FyF/y)
  • (product over all outputs)

46
Summary
  • Want to exploit structure in problems to reduce
    (contain) size
  • common subexpressions
  • structural dont cares
  • Identify component elements
  • decomposition, factoring, extraction
  • Division

47
Todays Big Ideas
  • Exploit freedom
  • form
  • dont care
  • Exploit structure/sharing
  • common sub expressions
Write a Comment
User Comments (0)
About PowerShow.com