dominator-based algorithms in logic synthesis and verification

Upload: mahmoud-atef-al-bayoumi

Post on 04-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    1/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    2/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    3/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    4/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    5/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    6/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    7/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    8/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    9/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    10/165

    f = ( x1 x2) (x1 x3) (x2 x3) v fanin (v) v fanin + (v)

    v fanin (v) v fanout (v) v fanout + (v)

    v fanout (v) x1 x2

    x1 x4 x2 x3

    x1 x4 x2 x3

    f (x0, x1) = 7 (x0 x1) 3 (x0 x1) ( 2) (x0 x1) 0 (x0 x1)

    g f g + f g f

    o1 D(o1) o2 D(o2) D (h)

    DR (h)

    v V D (i)

    l l j k

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    11/165

    l l j k

    T ( j ) D ( j )

    U v U e e U e e U e

    U v ={a, b} U v = {c} U v = {a} U e = { a, c } U v = {c} U e = U v = {b,c,d,e,f } U e = { a, h , g, l } U v = {b,i ,j }

    U e = { a, h , g, l } U v = {h,i ,l } U e = U v = {k, l} U e =

    DR (k) DR (k) DER (k)

    DR (h)

    f =a(b + c) f = ab + ac

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    12/165

    C a1 , . . . , a n

    DR (m).

    A

    C a1, . . . , a n

    a b c D R (f ) DER (f )

    {d, e}

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    13/165

    f = ( x1 x2) (x1 x3) (x2 x3)

    f

    f

    B F

    B ={0, 1} F

    v V j k

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    14/165

    n

    N Mdom D ER (root ) tD ER (root )

    DER (root ) maxN DDt DER (root )

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    15/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    16/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    17/165

    A B

    A B

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    18/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    19/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    20/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    21/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    22/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    23/165

    {a,b,c,d} {,, , } A

    |A| a A a A

    A B a A a B

    A B A B A = B

    a A a / A a U U

    C = A B a C a A a B

    C = A B a C a A a B

    C = A B C = A B A B

    A B = {(x, y) : x A and y B}.

    A B A B A = {a, b} B = {, }

    A B = {(a, ), (a, ), (b, ), (b, )}.

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    24/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    25/165

    a + b (a, b) (a, b)

    a b

    a a = a + a = a

    a b = b a a + b = b + a

    a + a b = a a (a + b) = a

    a (b c) = ( a b) c a + ( b + c) = ( a + b) + c

    a + 0 = a a 0 = 0 a 1 = a a + 1 = 1

    a a a a = 0 a + a = 1

    a + ( b c) = ( a + b) (a + c) a (b + c) = ( a b) + ( a c)

    (A, + , )

    a b = b a a + b = b + a

    a + 0 = a a 1 = a

    a a a a = 0 a + a = 1

    a + ( b c) = ( a + b) (a + c) a (b + c) = ( a b) + ( a c)

    B = {0, 1}

    n x1, x2, . . . , x n B = {0, 1}

    n Bn |B |n = 2 n f

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    26/165

    f : Bn B Bn B f

    f x1 x2 x3

    f

    f = ( x1 x2) (x1 x3) (x2 x3)

    f = x1 x2 f = ( x1 x2) (x1 x2) =(x1 x2) (x1 x2) (x1 x2) = ( x1 x2) (x1 x2) . . . (x1 x2)

    f

    1 2 3x /\ x /\ x

    1 2 3x /\ x /\ x

    1 2 3x /\ x /\ x

    1 2 3x /\ x /\ x

    1 2 3x /\ x /\ x

    1 2 3x /\ x /\ x 1 2 3x /\ x /\ x

    1 2 3x /\ x /\ x

    f = ( x1 x2) (x1 x3) (x2 x3)

    n 2n 22n

    {AND,NOT } {OR,NOT }

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    27/165

    x1 x2 x3 f

    f = ( x1 x2) (x1 x3) (x2 x3)

    x1 x2 f 0 f 1 f 2 f 3 f 4 f 5 f 6 f 7

    x1 x2 f 8 f 9 f 10 f 11 f 12 f 13 f 14 f 15

    f

    f

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    28/165

    f

    f (x1, x2, x3) = ( x1 x2)(x1 x3) (x2 x3)

    f

    x1 x2 x3 f M 1 = x1 x2 x3 M 2 = x1 x2 x3 M 3 = x1 x2 x3 m1 = x1 x2 x3 M 4 = x1 x2 x3 m2 = x1 x2 x3

    m3 = x1 x2 x3 m4 = x1 x2 x3

    f

    f

    f = m1 m2 m3 m4 (DN F )

    f = M 1 M 2 M 3 M 4 (CNF )

    f

    f = x f |x =1 x f |x =0 .

    f |x =1 f |x =0 f x

    C C = ( V,E, I ,O )

    V E V V v1, v2 E v1 v2

    v1 , . . . , vn vi , vi+1 E, 1 i < n

    I V O V v V fanin (v) =

    {v V : v , v E } v fanin + (v)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    29/165

    v1, . . . , vn , v1 I vn fanin (v) v fanin (v)

    v1, . . . , vn , v1 I vn = v fanin (v) ins (v) v I

    fanin (v) = fanin + (v) = fanin (v) = v

    v / I fanin (v) V

    000000000111111111000000000000111111111111 0000000001111111110000000011111111

    0000000011111111000000000111111111000000111111

    cba

    v 000000111111000000000111111111000000111111000000000111111111

    v v

    v fanin (v) v fanin + (v) v fanin (v)

    v V fanout (v) ={v V : v, v E } v fanout + (v)

    v1, . . . , vn , v1 fanout (v) vn O v fanout (v)

    v1, . . . , vn , v1 = v vn O v O fanout (v) = fanout + (v) = fanout (v) =

    v

    v V v1, . . . , vn v1 I vn O

    C m n {0, 1}n

    {0, 1} n m

    x0, x1, . . . xa , xb, . . .

    xa xb (xa xb) xa xb

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    30/165

    vv

    cba

    000000000000111111111111 00000000011111111100000000111111110000000011111111000000111111000000111111000000111111

    0000000011111111000000000

    0001111111111110000000011111111000000000111111111000000000111111111000000111111000000000111111111

    000000000111111111v

    v fanout (v) v fanout + (v) v fanout (v)

    e = v, v E inv (e) { 0, 1} inv (e) = 1 inv (e) = 0 v

    x1 x2

    x

    x

    1

    2

    x1 x

    2

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    31/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    32/165

    1 01 01 001

    x3

    x 1

    x 2

    x 3 x 3

    x 4 x 4

    x 2 x /\ x2 3

    x x4 4

    4 3x \/ x

    1 4 3x /\ x \/ x /\ x2

    4x \/ x /\ x2 3

    x1 x4 x2 x3

    x4

    f f f (x0, . . . ) =

    (x0 f |x 0 =1 ) (x0 f |x 0 =0 ) f |x 0=1 = f |x 0 =0 f |x 0 =1 f |x 0 =0

    n 2n 1 n

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    33/165

    0 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 0

    1 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 1

    0 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 0

    1 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 11 1 1 1 1

    1 01 01 001

    x 1

    x 2

    x 3 x 3

    x 4 x 4

    x 2

    0

    x 1

    x 2

    x 3 x 3

    x 2

    x 4

    1

    (a) (b)

    0 x

    f f

    x 0

    f

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    34/165

    0

    x 1

    x 2

    x 3 x 3

    x 2

    x 4

    1 0

    x 1

    1

    x 2

    x 4

    x 3

    x1 x4 x2 x3

    G f |G| G

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    35/165

    O(|G| log|G|) f 1 < op > f 2 O(|G1 | | G2 |)

    f |x i = b, b { 0, 1} O(|G|) f 1|x i = f 2 O(|G1 |2 |G2 |)

    B n F B = {0, 1} F F 2n

    n F

    f F x0 x1 x0 x1 0 7

    f (x0, x1) = 7 (x0 x1) 3 (x0 x1) 2 (x0 x1) 0 (x0 x1) x

    x0 x1 f (x0, x1)

    f B F B = {0, 1} F

    g(x0 , x1) = 3 x0 0 (x0 x1) ( 2) (x0, x1)

    f (x0, x1) = 5 (x0 x1) ( 1) (x0 x1) 7 (x0 , x1) 0 (x0, x1)

    g + f g f

    g + f = 8 (x0 x1) 2 (x0 x1) 7 (x0, x1) ( 2) (x0 , x1)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    36/165

    x x

    x 0

    1 1

    072 3

    f (x0, x1) = 7 (x0 x1) 3 (x0 x1) ( 2) (x0 x1) 0 (x0 x1)

    g f = 15 (x0 x1) ( 3) (x0 x1) 0 (x0)

    x0 x1 g f g + f g f

    3

    x

    x 0

    1

    0 2

    x x

    x 0

    1 1

    075 1 0

    x

    x 0

    1

    15 3

    g f g + f g f

    A B A B

    A B A B

    A B = xi (A|x i =1 B|x i =1 ) xi (A|x i =0 B|x i =0 ) xi

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    37/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    38/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    39/165

    O(n4) n

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    40/165

    O(m (m, n )) m n

    C (V,E, I ,O )

    v V w V z V w z v

    b b e o1 o1 Doms (v, z ) v

    z Dominated (v, z ) u V v z b

    o2 b o2 v V

    w V iDoms (v, w) z iDoms (v, w) Doms (v, w)

    I O z iDoms (v, w) : z Doms (v, w) z / I O

    o

    o

    2

    1

    a

    b

    c

    d

    e

    f

    g

    h

    i

    o

    o

    2

    1

    a

    b

    c

    d

    e

    f

    g

    h

    i

    (b)(a)

    v w = v z v = idom(w, z ) v w v Doms (w, z )

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    41/165

    w v Doms (w, z ) u = v : u Doms (w, z ) v /Doms (u, z ) u Doms (v, z )

    { idom (w, z ), w : w fanin + (z)} z D(z)

    D (o1) D(o2)

    o

    o

    2

    1

    a

    b

    c

    d

    e

    f

    g

    h

    i

    o2

    h

    i

    b

    c

    fd

    ea

    c

    b o1

    a

    e

    g

    h

    (b)(a) (c)

    o1 D(o1) o2 D(o2)

    D R (z) D (z)

    v V DR (z) v z u DR (z) v = idom(u, z )

    D R (z)

    z D R (z) v D(z)

    v

    u DR (z) v = idom(u, z )

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    42/165

    b

    a

    c

    d

    e

    li

    j

    k

    n

    m

    h

    a

    b

    c

    d

    n

    e e

    a

    b

    c

    dj,k

    h,i

    n

    b

    a

    c

    d

    e

    n

    a

    b

    c

    d

    ej,k

    h,i

    l,m n

    (a) (c)

    (b)

    m

    li

    k

    j

    f

    g

    h

    (d)

    (e)

    f

    g

    D (h) D R (h)

    u v z u

    v v Doms (v, z ) v

    v Doms (v, z ) = {v} p fanout (v) Doms ( p, z)

    C = ( V,E,I , {root }) V E V V root V

    (V,E,I , {root })Doms (root,root ) = {root }

    v V { root }Doms (v) = {root,v 1, v2 , . . . , v |V | 1}

    v V { root }Doms (v,root ) = {v} p fanout (v) Doms ( p, root )

    v V

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    43/165

    D (i) Doms (v, i ) v V { i} V

    i Doms (i, i ) = {i} i

    Doms (v, i ) D(i) Doms (v, i ) i v D(i)

    a

    b

    c

    e

    d

    f

    g

    hi b

    d

    g

    hi

    e

    f

    a

    c

    (a) (b)

    D (i)

    {i} Doms (i, i ) = {i} {g} Doms (i, i ) Doms (g, i) = {g, i}

    {h} Doms (i, i ) Doms (h, i ) = {h, i } {e} Doms (g, i) Doms (h, i ) Doms (e, i ) = {e, i}

    {f } Doms (g, i) Doms (f, i ) = {f ,g , i } {a} Doms (e, i ) Doms (a, i ) = {a,e,i }

    {b} Doms (e, i ) Doms (f, i ) Doms (b, i) = {b, i} {c} Doms (f, i ) Doms (c, i) = {c,f ,g , i }

    {d} Doms (h, i ) Doms (d, i ) = {d,h,i }

    T O(m logn)

    m n

    O(m (m, n )) (m, n )

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    44/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    45/165

    a

    b

    c

    e

    d

    f

    g

    hi

    u V { root }

    sdom (w) w u sdom(u,root ) T (root )

    idom(u, root ) = sdom(u, root ) sdom(u,root ) = sdom(w, root ),

    idom (w,root ) otherwise.

    C root

    n n 1

    u

    u A fanout (u) a Adfs a < dfs u

    dfs u

    T (root ) w w f anout (u) dfs u < dfs w

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    46/165

    u sdom(u,root ) T (root ) u sdom(u, root ) sdom (u, root ) sdom(u,root )

    u idom(u,root )

    w T (root )

    dfs sdom (w,root ) dfs sdom (u,root ) w w

    idom (u, root ) = idom(w,root )

    u sdom (u,root )

    u dfs sdom (u,root )

    u sdom(u,root ) = idom(u, root ) u sdom(u,root ) = idom(u, root )

    v w sdom(w, root )

    u sdom(u,root ) u sdom(u,root ) root

    idom (w,root ) u

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    47/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    48/165

    C (V,E, I ,O ) w V v V w

    v o O vw absDoms (v, O ) : o (fanout + (v) O) w Doms (v, o)

    g d f b

    v V C T (r ) o O (o)

    v V O o O v (v, T (o))

    v r v

    o

    T (o)

    w v v

    o O w v

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    49/165

    (V, E , I , O )

    o O

    T (o) = (o) v V O

    absDoms (v, O ) =o fanout + (v ) O (v, T (o))

    c

    f

    g

    i

    h

    k

    l

    j ha

    c

    d

    jf

    l

    k

    i

    g

    e

    b

    a

    b

    c

    d g

    f h

    j

    b

    c

    f

    g

    e

    i

    d k

    (a) (b)

    (c) (d)

    e

    a

    b

    d

    l l j k

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    50/165

    O fanout + (v)

    C C

    T (l) C v V C T (l) v l

    T (l) C (V,E, I ,O )

    O = {r 1, r 2} C C (V , E , I , O ) O = {o} V = V { o}

    E = E { r 1 , o , r 2 , o }

    l j k

    C T (l) C

    C C w V { o}

    v C v v C

    v V { r 1, r 2}

    r1

    r 2 v V : v fanin + (r 1) v fanin + (r 2) v V { r 1, r 2} r1 r2

    v V : v fanin + (r 1) v fanin + (r 2)

    v v r r1 v r1

    C v r1 C v C v C

    v

    v C v C r1 r2 u C v r1

    r 2 v o C

    P v o C r 1 r2 w

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    51/165

    v o w Doms (v, o) v r1 v r2 v

    o C v r1 r2 C

    u v r1 r2 C u v r C C v o

    u C v o r1 r2 v u

    r 1 r2 u v r1 r 2 u v o C

    (O) l j k l

    (l)

    v V O absDoms (v, O ) T (l)

    l l

    (V, E , I , O )l = (O)T (l) = (l)

    v V O absDoms (v, O ) =

    (v, T (l)) { l}

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    52/165

    absDoms (v, O ) = absDoms (v, O ) =v Doms (v, j ) Doms (v, k ) o O fanout + ( v ) Doms (v, o ) Doms (v, l ) { l}

    {a,h, j } {a,h, j } {a,h, j } {b,f,h , j } {b , f , i ,k } {b, f } {b, f }

    {c, j } {c, j } {c} {c}

    {d,g, j } {d,g, i ,k } {d, g } {d, g } {e, k } {e, k } {e, k }

    {f ,h , j } {f , i ,k } {f } {f } {g, j } {g , i ,k } {g} {g}

    {h, j } {h, j } {h, j } {i, k } {i, k } {i, k }

    { j } { j } { j } {k} {k} {k}

    v V j k

    l

    j

    k

    T (l) T ( j )

    T (k)

    T ( j ) T (k) T (l) v V l j

    v o T (o) v o T (o) v

    l k

    T (l) C

    l b j k Doms (b, j ) =

    {b,f,h,j } Doms (b, k) = {b,f,i ,k } {b, f } = Doms (b, j ) Doms (b, k)

    absDoms (v, R ) {b, f } b k b j

    b f

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    53/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    54/165

    s p e e

    d u p =

    1 0

    absolute dominator computation

    a l g o r i

    t h m

    b y K i r k l a n

    d a n

    d M e r c e r

    new algorithm

    s p e e d u p = 1 0 0 0

    runtime in seconds

    0.0001

    0.001

    0.01

    0.1

    1

    0.0001 0.001 0.01 0.1

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    55/165

    number of absolute dominatorsper vertex

    p141k

    n u m

    b e r o f v e r t

    i c e s

    number of absolute dominatorsper vertex

    p267k

    n u m

    b e r o f v e r t

    i c e s

    number of absolute dominatorsper vertex

    p269k

    n u m

    b e r o f v e r t

    i c e s

    number of absolute dominatorsper vertex

    p279k

    n u

    m b e r o f v e r t

    i c e s

    number of absolute dominatorsper vertex

    n u m

    b e r o f v e r t

    i c e s

    p330k

    number of absolute dominatorsper vertex

    n u m

    b e r o f v e r t

    i c e s

    p388k

    number of absolute dominatorsper vertex

    n u m

    b e r o f v e r t

    i c e s

    p286k

    number of absolute dominatorsper vertex

    n u m

    b e r o f v e r t

    i c e s

    p418k

    number of absolute dominatorsper vertex

    p951k

    n u m

    b e r o f v e r t

    i c e s

    1

    10

    100

    1000

    10000

    100000

    0 2 4 6 8 10 1 2 1 4 1 6

    1

    10

    100

    1000

    10000

    100000

    0 2 4 6 8 10 12 1 4 16

    1

    10

    100

    1000

    10000

    100000

    0 2 4 6 8 10 12 14 16

    1

    10

    100

    1000

    10000

    100000

    0 5 10 15 20 25

    1

    10

    100

    1000

    10000

    100000

    0 5 10 15 20 25

    1

    10

    100

    1000

    10000

    100000

    0 5 10 15 20

    1

    10

    100

    1000

    10000

    100000

    0 5 10 15 20

    1

    10

    100

    1000

    10000

    100000

    0 5 10 15 20 25 30 1

    10

    100

    1000

    10000

    100000

    0 5 10 15 20 25

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    56/165

    l l

    C (V,E, I ,O ) C (V , E , I , O ) O = {l} V = V { l}

    E = o O { o, l } E P O C p v V idom (v, l) = l

    { p, q } P : idom(v, p) = idom(v, q )idom (v, p), p P

    v l l P v

    v p P l

    p P l

    v

    v idom(v, l) = l idom(v, l) absDoms (v, O)

    idom (v, l) = l { p, q } P : idom(v, p) = idom(v, q ) w v l

    v p P idom(v, l ) = l p P idom (v, p) = idom(v, l)

    C C P O

    v V O v l l { p, q } P

    idom(v, p) = idom(v, q )

    idom(v, l ) = l w = l C v l

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    57/165

    C C E = E o O { o, l } w V

    v p P C

    v p P

    { p, q } P idom (v, p) = idom(v, q )

    idom(v, l ) = l { p, q } : idom(v, p) =idom(v, q )

    idom(v, l ) = l p P idom (v, l ) =idom (v, p) idom(v, l) =l { p, q } : idom(v, p) = idom(v, q ) idom (v, l) = l v P idom (v, p) = idom(v, l )

    C C P

    v V O C v l C l { p, q } P

    idom (v, p) = idom(v, q )

    { p, q } P idom(v, p) = idom(v, q ) idom (v, l ) = l

    u = idom(v, p) u v p fanin ( p)

    idom (v, p) = idom(v, q ) v idom(v, p) v idom(v, q )

    fanin ( p) fanin (q )

    fanin (q ) fanin ( p)

    v p q q p

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    58/165

    C v u v

    u

    v

    u w v u v / fanin (u) w fanout (v) : w /

    fanin (u)

    v

    p q

    l P

    l

    { p, q } P

    idom(v, p) =idom (v, q ) v C l

    C C P

    v V O C idom(v, l) = l p P idom (v, p) = idom(v, l)

    v V O idom(v, l ) = w = l E = E o O { o, l } v

    p P C C v l C v p P C

    idom(v, l ) = l p P idom (v, p) = idom(v, l)

    l j k

    D (l) (l)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    59/165

    c

    f

    g

    i

    h

    k

    l

    j ha

    c

    d

    jf

    lk

    i

    g

    e

    b

    a

    b

    c

    d g

    f h

    j

    b

    c

    f

    g

    e

    i

    d k

    (a) (b)

    (c) (d)

    e

    a

    b

    d

    l l j k

    o O o T (o) (o)

    v v (v, o)

    v o

    v v l l l = idom(v, l )

    u v o u Doms (v, o)

    u w f anout (v) o w o u

    v o u w f anout (v) : u Doms (w, o) u Doms (v, o)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    60/165

    C o o u

    v = u u Doms (v, o) { v} v

    v = o v oP = v = w0, . . . , wk = o wi , i = {1, . . . , k }

    dfs w i dfs v u = v v v o u u

    P u v v

    v w o v = idom(w, o) v w

    v = idom(w, o) v Doms (w, o) u Doms (w, o) {w, v} u Doms (v, o)

    u w v v v = idom(w, z ) v

    w

    v, w1, . . . , wk = u u v u w1 , . . . , wk

    u wi 1 i k o wi o u

    v o u u / Doms (v, o) u Doms (v, o) wi 1 i k u Doms (wi , o)

    v w ov = idom(w, o)

    Z z x f anout (w)

    z x fanout (w) z Doms (x, o)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    61/165

    z w dfs u < dfs w

    z x w dfs x = max (dfs u : u

    Doms (x, o) dfs u < dfs w ) D (o) x o

    v Doms (x, o) z D (o) x o

    z dfs z < dfs w (x,w,o ) x fanout (w) x T (o)

    z = (x,w,o ) x fanout (w) zmin

    P w wanc zmin T (o) x f anout (w) x x f anout (w) u P : u Doms (x, o)

    wanc zmin v

    P w v w v Doms (w, o) D(o)

    wanc o v dfs v dfs zmin wanc v x f anout (w)

    v v w o v = idom(w, o)

    a

    b

    c

    d

    f

    e

    g

    h

    i

    jh

    7

    2

    g10 i

    e4

    3a

    5b

    c

    9d

    1j8f6

    a

    b

    d

    e h

    i

    j

    gf

    c

    (a) (c)(b)

    T ( j ) D ( j )

    c D ( j )

    c {e,f ,g } T ( j )

    c zmin

    e j (x,c,j ) x f anout (c) dfs e = 4

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    62/165

    dfs j = 1 zmin = j v c e j zmin

    c j j = idom(c, j ) j e dfs j dfs zmin

    (V, E , I , O )l = fake node(O)

    (l) o O

    T (o) = (o) w T (o) o in BFS order

    idom (w, l ) = l idom (w, o) = idom(w, l )

    Z = ; x f anout (w) x T (o)

    Z = Z { (w,v,r )};zmin = z : min (dfs (z, o), z Z )idom (w, o) = ( (w, o), zmin , o);

    (x,w,o) (x, o) (w, o)

    return x ;

    return (idom (x, o), w, o);

    l j k

    D ( j ) j

    j h a f b c g d h

    h,g,a,f ,b,c,d h,a,b d l

    D (l) D ( j )

    g

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    63/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    64/165

    0 1 2 3 4

    S p e e

    d u p

    Number of primary outputs 10 10 10 10

    10

    0.1

    1

    10

    N u m

    b e r o

    f e x a m p

    l e s

    Percentage of maintained dominators

    0

    5

    10

    15

    20

    25

    30

    20% 40% 60% 80%

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    65/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    66/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    67/165

    v V { root } O(k 2k |n | + |n |k )

    k n

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    68/165

    v u v u

    C O(|n | | m |)

    u Mdom (u, z ) V z

    Mdom (u, z ) V u V Mdom (u, z ) z

    u z v Mdom(u, z )

    v Mdom(u, z ) u z v w Mdom(u, z )

    u z Imdom (u, z ) u

    Mdom (u, z ) u Imdom (u, z ) fanout (u)

    U V Cmdom (U, z) Cmdom (U, z) V u U Mdom(u, z ) Cmdom (U, z)

    D ER (z) D R (z)

    DR (n) I DR (n)

    D R (n) {h, i } { j, k } DR (n)

    DER (n) DER (n)

    {l, m }

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    69/165

    Imdom (v,root ) v root v

    v Imdom (v,root ) = fanout (v) u fanout (v) Imdom (v,root )

    fanout (v) {u} u u fanout (v) Mdom (u, root ) fanout (v) { u} u / Imdom (v,root )

    v u fanout (v)

    v v v

    |fanout (v)| = 1 f anout (v) = Imdom (v,root )

    u Imdom (v,root ) z Imdom (v,root )

    v z Imdom (v,root )

    Imdom (v,root ) { z} |Imdom (v,root )| z Imdom (v,root )

    v Mdoms (v,root )

    v V V { root } V

    V =

    u

    Imdom (v,root )

    U Mdoms (u, root ) U Imdom (v,root ) { u}

    Imdom (v,root ) Mdoms (u,root )

    u Imdom (v,root ) v v V

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    70/165

    u Imdom (v,root ) v V

    v Mdom(v,root ) u Mdom(v,root ) W

    u W Mdoms (u,root ) z Mdom(v,root ) W

    O(|V |n ) n

    a

    bc

    e

    df

    a d e

    c

    d

    e

    d

    e c

    fanout (c) = Imdom (c, f ) c d e b w f anout (b)

    u f anout (b) v fanout (b)

    {d, e} c b {c,d,e} {d, e} c c

    b Imdom (b, f ) = {d, e}

    C (V,E,I , {root }) x V v V U V { x} root

    x u U U fanout (v) x v

    v V {root } root

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    71/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    72/165

    D R (root ) D ER (root )

    DER (root )

    C (V,E, I ,O ) o O i I

    o O v fanin + (o) : v V I

    U v V (I O)

    u U v w U v w U v u U v : w = u u

    fanout + (w) fanin + (w)

    u U v v V I u U v :v fanin (u) fanout (u)

    u U v

    U e

    U e E p1, p2 U e p1 fanin + (u) p2 fanout + (w) w, u U v

    w = u

    U v U e U v U e U v = {e, f } U e =

    { a, g , d, h } U v U e

    P C u U v w U v P P in C : u P, u U v w P :

    w = u w U v

    w P C u u u

    w P : w = u P w fanout + (u) w fanin + (u)

    U v u U v w U v u

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    73/165

    u U v P P w U v

    P C e U e d U e P

    v u u w v

    w v fanin + (u) u fanin + (w) v fanin + (w)

    v u u w v

    w v fanout+

    (u) u f anout+

    (w) v f anout+

    (w) P e = p1, p2 U e v1, . . . , v i = p1, vi+1 =

    p2, . . . , vn p1 fanin + (u) p2 f anout + (w) w, u U v vy 1 y i

    U v vy i + 1 y n U v

    e U e P d U e P

    a

    c

    d

    f

    e

    h

    gb

    U v U e

    U v

    U e

    C (V,E, I ,O )

    P i I o O u U v p1, p2 U e P in C ( 1u U v : u P 1e

    U e : e P ) C i I o O P C

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    74/165

    P P C ( 1u U v : u P 1e U e : e P ) P P C ( u U v : u P e U e : e P )

    u U v P P C P e U e P P C :u P u U v e P e U e

    P P C : u P u U v e P e U e e P e U e u P u U v

    e P e U e u P u U v u P u U v e P e U e

    P P C : u P u U v e P e U e u P u U v e P e U e

    C i I o O u U v

    P C P C v P C e P P C v u U v P C e

    P C e = P C P C v

    P P C v e P e U e P P C e e P e U e

    P P C v u U v v1 I, . . . , v i =u , . . . , v n O vy 1 y < i

    u vy i < y n u

    e U e P P C v u U v

    P P C u U v

    P P C e p1, p2

    p1 fanin+

    (u) p2 fanin+

    (u) : u U v p1 fanin+

    (u) p2 fanout + (w) : u, w U v p1 f anout + (u) p2 fanout + (u) : u U v

    P P C e i I o O e = p1, p2 P

    p1 fanin + (u) p2 f anout + (w) : u, w U v e U e

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    75/165

    P C u U v e U e

    C U e p1, p2 p1, px , p2 fanin ( px ) = { p1} fanout ( px ) = { p2}

    px u U v

    a, g d, h a, x 1 , g d, x2, h

    a

    c

    d

    f

    e

    h

    gbx

    x2

    1

    e U e

    U c u U v px p1, px , p2 p1, p2 U e

    U c

    u U c w U c

    i I o O u U c

    U c

    U c I o o O I o fanin + (o)

    {x1, e} {a,b,c} g {f, x 2} {c, d} h

    U c C

    U v U e

    U e U c

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    76/165

    U v S U v U e S

    i I o O U v = U e = u S

    u u S u U v S

    u U v S w S w

    u v U v u

    c

    b

    a

    d g

    f

    eh

    i

    j

    c

    b

    a

    d g

    f

    eh

    i

    j

    c

    b

    a

    dg

    f

    eh

    i

    j

    c

    b

    a

    dg

    f

    eh

    i

    j

    (a) (b)

    (c) (d)

    e U e

    U v U e u S U v

    e = p1, p2 p1 fanin + (v) p2 fanout + (u) p1 fanin + (u) p2 f anout + (v) v U v e U e

    U v U e

    U e U v

    S S e

    e h {e, h}

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    77/165

    S a h U e

    f S f S S

    g U v U e g S U v U v = {e,f ,g }

    U e = { a, h }

    S U v U e

    a, h a, h a, h

    V E I V O V S U v

    U e i I fanout + (i) o O f anin + (o)

    S U u U v U v :u fanin (v) fanout (v) (I O) S U = U v U = S = i I f anout

    + (i) o O fanin + (o) S S = U = i I f anout

    + (i) o O f anin + (o)

    U v S

    S U e

    v U v S U v U v U e

    |U v | + |U e |

    a, b U v

    fanout (a) = {c} P = b = v1 , . . . , c = vn

    vi P 1 < i < n vi / fanout + (u), u U v {b} p1, p2 U e : p1 = vi

    vi 1 i < n

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    78/165

    (V, E , I , O )S = i I f anout

    + (i) o O fanin + (o)U v = U e =

    S =

    v = (S )S = S (fanin (v) fanin (v))U v = U v { v}

    p1 , p2 E : p1 I p2 f anout + (v) U e = U e { p1 , p2 } u U v

    p1 , p2 E : p1 fanin + (v) p2 f anout + (u) p1 , p2 E : p1 fanin + (u) p2 f anout + (v)

    U e = U e { p1 , p2 }U c = (U v , U e )

    U c

    U v = ( U v { a, b}) { c}

    U e = U e { a, c } U v = ( U v { b}) { c} b U v a, c U e

    P = b = v1 , . . . , c = vn

    vi P 1 < i < n vi / fanout+

    (u), u U v {b} p1, p2 U e : p1 = vi vi 1 i < n

    p1, p2 U e p1, px , p2

    {c, d} {e, f } a, h b g, j j

    {h, i } U c = {k, l}

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    79/165

    (b)

    ac

    a

    bbc

    (c)

    le

    a

    c

    n

    b

    d

    fg

    h

    i

    j

    k

    m

    (d)

    le

    a

    c

    n

    b

    d

    fg

    h

    i

    j

    k

    m

    (f)

    le

    a

    c

    n

    b

    d

    fg

    h

    i

    j

    k

    m

    (e)

    le

    a

    c

    n

    b

    d

    fg

    h

    i

    j

    k

    m

    b

    (a)

    bc

    ac

    a

    U v ={a, b} U v = {c} U v = {a} U e = { a, c } U v = {c} U e =

    U v = {b,c,d,e,f } U e = { a, h , g, l } U v = {b,i,j } U e ={ a, h , g, l } U v = {h,i,l } U e = U v = {k, l} U e =

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    80/165

    U c

    D ER (root ) U i

    U i DER (root )

    v U i y U i

    U i = {root }

    v DER (root ) v

    i U i

    U i U i = {g, e} U o = { j } DR (k)

    U i root (V,E,U i , U o) U i U o root U c

    (V,E,U i , U o) U i U o U c = {i, h } U c

    {e, g} j

    {e, g} k

    D R (k)

    D ER (k) U i U o

    U c i U i U o i, U c U c , U o DER (k) DER (k)

    U i U o

    C (V,E,I , {root }) V E I root

    D R (root ) C

    D R (root ) DER (root ) v V

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    81/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    82/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    83/165

    |V | |V |

    |V | |V | e U e

    O(|V |2) O(|V |3)

    v V

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    84/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    85/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    86/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    87/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    88/165

    f

    f

    f (X ) g h

    f (X ) = h(g(Y ), Z )

    Y Z X ={x1, x2, . . . , x n } f g h

    Y f

    g Y

    f(X)

    Y

    Z

    g(Y)

    h(g(Y), Z)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    89/165

    f (I ) C = ( V,E,I , {root }) v V

    g(Y ) f (I ) = h(g(Y ), Z )

    |I | |Y | 1 + |Z |

    Pcut (root ) C root

    v V root v Pcut (root ) v Pcut (root ) i

    I fanin (v) v Doms (i,root )

    v V root v

    v DR (v)

    v Pcut (root ) DR (root ) v Pcut (root ) v DR (root )

    v V

    v v V i I : i fanin (v)

    v Pcut (root )

    DR (root ) v P cut (root )

    DR (root )

    Pcut (root )

    C (V,E,I , {root }) Rpath (v) v V i I v

    z Rpath (v) z Doms (i,root )

    v V i I fanin (v) 1z Rpath (v) : z Doms (i,root ).

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    90/165

    Rpath (v) |I | DR (root )

    Pcut (root ) Pcut (root ) = Rpath (v) v V Rpath (v) =

    v V v

    Rpath (v) Rpath (w) w fanin (v) v DR (root ) v

    Rpath (v) v Rpath (v) w V Rpath (v)

    D R (root ) v Pcut (root ) DR (root )

    Rpath (v) DR (root )

    Rpath (v) v V

    i I fanin (v) 1z Rpath (v) : z Doms (i, root )

    i I fanin (v) z Rpath (v) : z Doms (i,root )

    i I i I fanin (i) =

    i I DR (root )

    i I Rpath (i) = {i}

    C i I

    v V w fanin (v) i I fanin (w) z Rpath (w) : z Doms (i,root )

    i I fanin (v) z Rpath (v) : z Doms (i,root )

    fanin (v) = {w1 , w2} w fanin (v) i

    I fanin (w) z Rpath (w) : z Doms (i,root )

    i I fanin (w1) z Rpath (w1) : z Doms (i,root ) i I fanin (w2) z Rpath (w2) : z Doms (i, root )

    u1 P 1 u2 P 2 u1 u2 P 1 P 2 i I (fanin (w1) fanin (w2)) z Rpath (w1) : z

    Doms (i,root ) z Rpath (w2) : z Doms (i, root )

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    91/165

    u1 P 1 u2 P 1 u1 u2 P 1 i I (fanin (w1) fanin (w2)) z (Rpath (w1) Rpath (w2)) : z

    Doms (i,root )

    Rpath (v) = w fanin (v) Rpath (w)

    i I (fanin (w1) fanin (w2)) z Rpath (v) : z Doms (i,root )

    v V I fanin (v) = I fanin + (v)

    fanin (v) = {w1, w2} fanin + (v) = fanin (w1)fanin (w2)

    I fanin (v) = I (fanin (w1) fanin (w2)) v V

    v i I fanin (v) z Rpath (v) : z Doms (i, root )

    i I fanin (v) ( z Rpath (v) : z Doms (i, root )) ( u Rpath (v) u = z u / Doms (i, root ))

    i I Rpath (i) = {i}

    i I 1z Rpath (i) : z Doms (i, root )

    v V I fanin (v) = {w1 , w2}, w1 = w2 i I v i I fanin + (v)

    i w1 w2 i fanin (w1) i fanin (w2)

    i w1 w2i fanin (w1) fanin (w2)

    i fanin (w1) Rpath (w1) Rpath (v)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    92/165

    x1 Rpath (w1) : x1 Doms (i,root ) x2 Rpath (w2) : x2 Doms (i,root ) x1 = x2

    fanin (v) = {w1 , w2}, w1 = w2 i x1 x2

    x1 x2 i root x1 = x2

    w1 w2 v

    Rpath (v) v V

    D R (root ) v DR (root ) DR (root )

    v V Rpath (v) = {v}

    v

    v DR (root )Rpath (v) = ( Rpath (v) Dominated (v,root )) { v}

    Rpath (v) v v v V : v Pcut (root ) Rpath (v) = {v}

    Rpath (v) v V |I | O(|V | | I |)

    Rpath (v) = w fanin (v) Rpath (w) |V | 1 Rpath (w) w fanin (v) O(|I |2 |V |)

    v V O(|I |2 |V |2)

    DR (h) Rpath (v)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    93/165

    (V,E,I , {root })DR (root ) = (V,E,I,root )Pcut (root ) =

    v V Rpath (v) =

    v V Rpath (v) = w fanin (v) Rpath (w) v DR (root )

    Rpath (v) = ( Rpath (v) Dominated (v,root )) { v} v DR (root )

    Rpath (v) = {v} Pcut (z) = P cut (z) { v}

    Pcut (z)

    v Pcut (h) v V DR (h) Rpath (v) =

    (Rpath (v) Dominated (v,root )) { v} Rpath (v) v V Pcut (h)

    a b c d i I Rpath (i) ={i} Pcut (h) = {a,b,c,d}

    e Rpath (b) Rpath (c) {b, c} e b c Rpath (e) = {e} f

    f e e Rpath (f ) Rpath (f ) ={e, f } f g Rpath (g)

    {e, g} g Pcut (h) h V h

    Pcut (h)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    94/165

    b

    c

    d

    a

    e

    f

    g h

    b

    c

    d

    a

    ef

    gh

    (a) (b)

    DR (h)

    v Dominated (v, h ) Rpath (v) Pcut (h) {a} {a} {a}

    {b} {b} {a, b} {c} {c} {a,b,c}

    {d} {d} {a,b,c,d} {b,c,e} {e} {a,b,c,d,e}

    {a, f } {e, f } {a,b,c,d,e } {g, d} {e, g} {a,b,c,d,e}

    {e,f ,g ,h } {h} {a,b,c,d,e,h }

    N DO

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    95/165

    f = a(b + c) {b, c}

    f

    f (X ) = h(g(Y ), Z )

    f : {0, 1}n {0, 1} g : {0, 1}|Y | {0, 1,...,m 1} h : {0, 1,...,m 1} {0, 1}|Z | {0, 1} m h

    k = log2 m g1, g2 , . . . , gk

    f (X ) = h(g1(Y ), g2(Y ), . . . , gk (Y ), Z )

    f (X ) = h(g1(Y ), g2(Y ), Z )

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    96/165

    N N DO N DO N DO

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    97/165

    (a)

    N u m

    b e r o

    f c

    i r c u

    i t s

    41010 10 10

    0 1 210

    3

    Sum of all proper cuts in a circuit graph

    (b)30 40 50 60 70 80 9010 20

    N u m

    b e r o

    f o u

    t p u

    t s

    respect to all inputs in the circuit graphPercentage of inputs in a proper cut with

    2

    6

    8

    10

    12

    14

    16

    0

    4

    20

    18

    0

    2000

    3000

    4000

    5000

    6000

    1000

    (a)

    a

    bc

    f

    (b)

    b

    a

    c

    f

    f =a(b + c) f = ab + ac

    f(X)

    Y

    Z

    g (Y)1

    2g (Y)

    h(g (Y), g (Y), Z)1 2

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    98/165

    4 3 2 1

    2

    1

    0

    1

    2

    0 2

    B D D

    b a s e

    d a p p r o a c

    h

    10

    10

    10

    10

    10

    10

    10

    3

    4

    10 10 10 10 10 10 101

    Combined approach

    Time in seconds

    u v v o

    u u v o

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    99/165

    c, g g Doms (g, k) = {g,j ,k }

    k

    b

    a

    c

    d

    e

    f

    gh

    ij

    kxstuckat fault

    B (v) v i I B(i) B(i) = Doms (i, o)

    B (v) v V I B (w) w f anout (v) v B(v) v v

    w

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    100/165

    (V,E,I,root ) i I

    B (i) = Doms (i,root ) v V I

    B (v) = w fanin (v) B (w) v V v B (v)

    v

    w w w

    w w

    k p g

    j l m i l m

    o1

    o2

    o1

    o2

    c

    b

    d

    h

    k

    e

    g

    da

    bf

    i

    (a) (b)

    b

    dk

    e

    g

    c

    a

    bf

    h

    i

    j

    mn ppnl

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    101/165

    1/true 0/false

    true false

    false

    true

    false

    a = 0 b = 1 c = 0

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    102/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    103/165

    x1 = ( z + d)x2 = ( a + z + e)x3 = ( e+ e+ f )x4 = ( b+ f + g)x5 = ( c+ f + h)x6 = ( h + g)

    x1

    2x

    x3

    x5

    x4

    x6

    d3

    d2d1

    d4

    a = 0/1

    f = 0/4z = 1/4

    d = 0/4

    e = 1/4

    c = 0/3h = 0/4

    b = 1/2g = 1/4

    k (conflict)

    I

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    104/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    105/165

    A B

    A B

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    106/165

    A B oA oB

    oA oB

    oA oB

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    107/165

    C

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    108/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    109/165

    (C 1, C 2) i I 1 I 2

    ROBDD (i) = () v V 1 I 1

    ROBDD (v) = vw fanin (v) ROBDD (w) v V 2 I 2 ROBDD (v) =

    vw fanin (v) ROBDD (w)

    ROBDD (root 1) == ROBDD (root 2) C 1 C 2

    C 1 C 2

    v v v

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    110/165

    bdx

    adb

    x

    f1f2

    f2

    f1

    (a) (b)

    (d)(c)

    adbb

    ca

    bd

    b

    ca xx

    f 1 f 2

    x x x

    f 1 f 2 f 1 f 2 f 1 f 2

    f 1 f 2 f 1 f 2

    f 1 f 2

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    111/165

    A B oA oB

    oA oB

    A

    B

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    112/165

    f (a,b,c) = ab+ bc

    fb

    a

    c

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    113/165

    X

    1X

    X

    1X

    X

    0

    1 X

    0

    1

    1

    10

    1

    10

    X

    X0

    X

    X0

    X

    0X

    X

    00

    X

    X1 1

    1

    1

    h e g g

    e g f e b

    c b c f

    f b = c =

    c = b = b = c = b = c =

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    114/165

    g

    e

    1

    0X

    1

    X

    0 1

    10

    1

    1i

    hf

    c

    b

    a

    d

    0

    X

    X

    (b)

    g

    e

    1

    00

    X

    1

    1

    X

    0 1

    10

    1

    1i

    hf

    c

    b

    a

    d

    0

    (c)

    g

    e

    ih

    fc

    b

    a

    d(d)

    0

    g

    e

    1

    0X

    X

    X

    1

    10

    1

    1i

    hf

    c

    b

    a

    d

    0

    (a)

    X

    X

    X

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    115/165

    2n n

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    116/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    117/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    118/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    119/165

    Z p p + x1 , x2, . . . xa , xb, . . .

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    120/165

    x1 x2 x1 x2

    F = ( f 0f 1 . . . f 2n 1) f T n 2n 2n

    T 1 df = 1 0 1 1 ,

    T n df = T 1 T n 1,

    C f = T n F C f = ( c0c1 . . . c2n 1)

    A[f ] : Z n p Z p n f

    A[f ] C f T

    n A[f ]

    A[f ] =2n 1

    i=0ci

    i1x1 inxn

    (i1 , . . . , i n ) i ij

    x j

    i jx j =

    1 i j = 0x j i j = 1,

    T 2 F f = x1 x2 C f c0 = 0 c1 = 1 c2 = 1 c3 = 2

    A[f ](x1 , x2) = 0 1 1 + 1 x1 1 + 1 1 x2 + ( 2) x1 x2 A[f ](x1, x2) = x1 + x2 2x1x2

    T 2 F C f x1x2

    1 0 0 0 1 1 0 0 1 0 1 0

    1 1 1 1

    0110

    =

    011

    2

    0 00 11 01 1

    F C f F = C f [T n ] 1

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    121/165

    [T 1] 1 df = 1 01 1 ,

    [T n ] 1 df = [T 1] 1 [T n 1] 1.

    [T 2] 1 C f F x1x2

    1 0 0 01 1 0 01 0 1 01 1 1 1

    011

    2

    =

    0110

    0 00 11 01 1

    x = y

    f A[f ]x 1 x

    x y x yx y x + y x yx y x + y 2 x y

    f = x f |x =1 xf |x =0 A[f ] xii { 1, . . . , n }

    A[f ] = (1 x i ) A[f |x i =0 ] + x i A[f |x i =1 ].

    (a1, . . . , a n )

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    122/165

    A[f g] =A[f ] A[g], A[f ] = 1 A[f ]

    f g A[f g] = A[f ] A[g]

    xki A[f ] xi

    d e A[d] = a b A[e] = a + b a b f A[f ] = A[A[e]A[c]] = a c+ bc a bc

    g a b d f

    A[g] A[g] = A[A[d]+ A[f ] A[d]A[f ]] = a b+ a c+ bc a bc a2 bc a b2 c+ a2 b2 c

    A[g] = a b+ a c+ bc a bc a bc a bc+ a bc A[g] = a b + a c + b c 2 a b c

    ab

    c

    e

    d

    f

    g

    O(|V | 2| I | ) V I

    v V 2| I |

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    123/165

    (V,E,I,root,a 1 , . . . , a n )DR (root ) = (V,E,I,root )

    v V v I

    A[v] = a i

    A[v] = (v,fanin (v)) v DR (root )

    u DR (root ) : v = idom(u,root ) x[u] = A[u]

    A[v] = (A[v], A[u], x[u]) (v DR (root ) | fanout (v)| > 1)

    x[v] = ;

    x[v] = A[v] A[root ]

    C a1 , . . . , a n

    v V A[v] v x[v]

    v i I A[i] ai Z p

    x[u] u fanin (v) (v,fanin (v))

    v u fanin (v) A[u] v 1 u {u} = fanin (v) A[v]

    v A[x x] = A[x] A[x]

    x xk k > 1 x

    i p1, p2 P DR (root ) i I

    root i p1 p2

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    124/165

    p1, p2 P DR (root ) P = i I , . . . , root x p1 p1

    |fanout ( p1)| > 1 A[ p2] A[i] A[v] v V

    |fanout ( p1)| = 1 p1 p2 A[i] A[ p2]

    |fanout ( p1)| > 1 p1 p2

    A[i] x p

    1 p1 A[ p1]

    p2 A[ p1]

    A[ p2]|x p 1 = A [ p1 ] = (1 A[ p1]) A[ p2|x p 1 =0 ] + A[ p1] A[ p2 |x p 1 =1 ].

    p2 p1 x p1 p2 x p1 A[v] v fanout + ( p2)

    v V i root p1, p2

    A[i]

    v V i root

    v DR (root ) A[i] i I v V

    i I P i , . . . , root e = p1 , p2

    P p2 = idom( p1,root ) v DR (root ) root e D R (root )

    e = p1 = v, p2

    |fanout (root )| = 0 root

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    125/165

    v DR (root )

    i I

    A[i] i I v V

    v DR (root )

    v V A[v] x[v]

    x[c] x[d] c d

    g xc xd A[g]

    g|x c = A [c]|x d = A [d] xc xd A[d] xc xc

    xd

    A[v] xv xw w

    v

    b

    c

    ae

    fgd

    b

    c

    ae

    gd

    (a) (b)

    d h A[d]

    aa aa A[h]

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    126/165

    v A[v] x[v]a a a aab ab abc ac xcd ab xc xde aa xd aa xdf x c xd xc xdg aa xc xd aa xc xd

    g|x c = A [c] aa ac xd aa ac xdg|x c = A [c]|x d = A [d] aa ac ab xc aa ac ab xc

    g|x c = A [c]|x d = A [d]|x c = A [c] aa ab ac aa ab acg|x d = A [d] aa xc ab aa xc ab

    g|x d = A [d]|x c = A [c] aa ab ac aa ab ac

    d

    j f

    c

    e

    gb

    a

    i

    k

    h

    (a)

    a

    c

    h

    k

    i

    (b)

    d

    g

    b

    fj

    e

    xb h

    F = Z p a e g A[d] = 1 3xb

    A[i] = 1 5(1 3xb) = 4 + 15xb A[ j ] = 1 1(1 3xb) = 3 xb A[h] = 1 ( 4 + 15xb)(3xb) = 1 + 12 xb 45x2b = 1 33xb

    h A[h] = 1 3xb aa

    d h xd d

    A[d] = 1 3xb h

    b xd d A[i] = 1 5xd

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    127/165

    A[ j ] = 1 xd A[h] = 1 (1 5xd )(1 xd ) = 6 xd 5x2d = xd xd A[d] = 1 3xb A[h] = 1 3xb

    A[f ] c b A[k] = 1 2xb A[h] = 1 3xb

    A[f ] = 1 (1 2xb)(1 3xb) = xb xb A[b] = 4 A[f ] = 4

    (aa , a b, a c , a e , a g ) = (3 , 4, 2, 5, 1)

    A[v]

    Z p

    Z p

    D R

    n n = 2 i , i = 6, . . . , 16

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    128/165

    (a)

    m

    j

    i

    d

    c

    b

    a

    (b)

    k

    h

    a

    b

    d

    c

    e

    f

    g

    i

    jl

    m

    (c)

    a

    b

    dc

    i

    j

    m

    DR (m).

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    129/165

    n

    BDDbasedMTBDDbasedSATbased

    runtime in ms

    1

    0

    2

    3

    4

    5

    m i l l i s e c o n

    d s

    1

    number of inputs

    1 2 3 4 5

    10

    10

    10

    10

    10

    10

    10 10 10 10 1010

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    130/165

    MTBDDbasedBDDbased

    SATbased

    number of inputs

    r u n

    t i m e

    d e c e

    l e r a

    t i o n w

    i t h r e s p e c

    t t o

    c i r c u

    i t s

    i z e

    d u p

    l i c a

    t i o n

    1

    1.5

    2

    2.5

    3

    3.5

    4

    4.5

    0 10000 20000 30000 40000 50000 7000060000

    |fanout (v)| > 1

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    131/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    132/165

    10 10 10 10 10 10 10 10 104 3 2 1 0 1 2 3 4

    Number of dominators per input

    N u m

    b e r o

    f o u

    t p u

    t s

    0

    1000

    2000

    3000

    4000

    5000

    6000

    7000

    8000

    9000

    10000

    10 10 10 10 10 101010

    10

    10

    10

    10

    10

    10

    10

    10

    65432101

    1

    0

    1

    2

    3

    4

    5

    6

    BDDbased algorithm

    D o m

    i n a

    t o r

    b a s e

    d a

    l g o r i t h

    m

    Maximum number of DD nodes

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    133/165

    410

    10 3

    102

    101

    100

    101

    102

    10 5

    102

    101

    100

    101

    102

    103

    104

    105

    Time in seconds

    BDDbased algorithm

    D o m

    i n a

    t o r

    b a s e

    d a

    l g o r i

    t h m

    A

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    134/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    135/165

    t t maxN DD maxN DD

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    136/165

    t t maxN DD maxN DD

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    137/165

    xa xb a b i

    A[f (i) = a b] = xa + xb 2 xa xb c d

    xa c xb d A[f ( j ) = c d] = xa + xb 2 xa xb

    xc xd c d A[f ( j ) = c d] = xc + xd 2 xc xd

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    138/165

    1 2 3 4 5

    number of inputs

    runtime in ms

    BDDbased

    MTBDDbasedSATbasedMTBDDbased, variablerecycling

    1

    1

    0

    2

    3

    4

    5

    m i l l i s e c o n

    d s

    10

    10

    10 10 1010 10

    10

    10

    10

    10

    10

    10

    BDDbasedMTBDDbased

    MTBDDbased, variable recycling

    number of inputs

    n u m

    b e r o

    f B D D n o

    d e s

    0

    1e+06

    1.5e+06

    2e+06

    2.5e+06

    3e+06

    0 20000 40000 60000

    500000

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    139/165

    number of inputs

    c i r c u

    i t s

    i z e

    d u p

    l i c a

    t i o n

    r u n

    t i m e

    d e c e

    l e r a

    t i o n w

    i t h r e s p e c

    t t o

    MTBDDbasedBDDbased

    SATbasedMTBDDbased, variable recycling

    1

    1.5

    2

    2.5

    3

    3.5

    4

    4.5

    0 10000 20000 30000 40000 50000 60000 70000

    A[f ]

    k v1, . . . , vk V u DER (root )

    k x1, . . . , x k v1, . . . , vk

    x1, . . . , x k

    A[v1 , . . . , vk ](i1, . . . , i k ) =k

    j =1

    i jA [v j ]

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    140/165

    (V,E,I,root,a 1 , . . . , a n )DER (root ) = (V,E,I,root )

    v V v I

    A[v] = a i

    A[v] = (v,fanin (v)) v DER (root )

    u DER (root ) : v = idom(u,root ) x[u] = A[u]

    A[v] = (A[v], A[u], x[u]) (v DER (root ) | fanout (v)| > 1)

    z V |v Mdom (z,root ) x[v] = ;

    x[v] = A[v] A[root ]

    C a1, . . . , a n

    i = {0, . . . , 2k 1} (i1 , . . . , i k ) i i jA [v j ]

    i jA [v j ] =

    1 A[v j ] i j = 0A[v j ] i j = 1,

    j { 1, . . . , k } w

    v1 , . . . , vk A[w] A[u |(v1 ,...,v k )=( i1 ,...,i k )] u

    x1, . . . , x k v1 , . . . , v k

    A[u] =2k 1

    i=0(A[v1, . . . , vk ](i1 , . . . , i k ) A[u |(v1 ,...,v k )=( i1 ,...,i k ) ])

    (i1 , . . . , i k ) i

    DR (f ) D ER (f ) {d, e}

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    141/165

    a

    b fd,e

    a

    b

    ce

    df

    a

    b

    ce

    df

    c

    (a) (b) (c)

    a b c DR (f ) DER (f )

    {d, e}

    f (f ) = a b c A[a b

    c] = aa ab ac

    {d, e} b DER (f ) |fanout (b)| > 1 xb

    b d e A[d] = aa xb A[e] = ac xb

    2k

    A[d, e](0, 0) = (1 A[d]) (1 A[e]) = (1 aa xb) (1 ac xb)

    A[d, e](0, 1) = (1 A[d]) A[e] = (1 aa xb) (ac xb)

    A[d, e](1, 0) = A[d] (1 A[e]) = ( aa xb) (1 ac xb)

    A[d, e](1, 1) = A[d] A[e] = (aa xb) (ac xb)

    xb

    A[d, e](0, 0) = 1 aa ab ab ac + aa ab ac

    A[d, e](0, 1) = ab ac aa ab ac

    A[d, e](1, 0) = aa ab aa ab ac

    A[d, e](1, 1) = aa ab ac

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    142/165

    {d, e} f xd xe e d

    A[f ] =A[d, e](0, 0) A[f |x d =0 ,x e =0 ] + A[d, e](0, 1) A[f |x d =0 ,x e =1 ]+A[d, e](1, 0) A[f |x d =1 ,x e =0 ] + A[d, e](1, 1) A[f |x d =1 ,x e =1 ] =(1 aa ab ab ac + aa ab ac) 0 + ( ab ac aa ab ac) 0+(aa ab aa ab ac) 0 + ( aa ab ac) 1 =aa ab ac

    DER (root )

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    143/165

    t D ER ( root )

    t

    t

    N Mdom maxN DD maxN DD

    N Mdom DER (root ) tD ER (root )

    D ER (root ) maxN DD t DER (root )

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    144/165

    A D D

    A D D

    (a) (b)

    BDD BDD

    Number of lookups Runtime in sec

    101

    100

    102

    103

    104

    105

    106

    107

    101

    102

    103

    104

    105

    106

    100

    105

    104

    103

    102

    101

    100

    105

    104

    103

    102

    101

    100

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    145/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    146/165

    (a1, . . . , a n ) H 1 H 2

    f 1 = f 2 H 1 = H 2

    x1, . . . , x n Z |Z |

    ( |Z | 1|Z | )n

    Z

    = 1 ( |Z | 1|Z | )n k k

    f 1 f 2

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    147/165

    f 1 f 2

    f 1 = f 2 f 1 = f 2 f 1 = f 2 f 1 = f 2 f 1 = f 2

    f 1 = f 2 f 1 = f 2 f 1 = f 2 f 1 = f 2 f 1 = f 2

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    148/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    149/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    150/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    151/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    152/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    153/165

    O(|V | | E |)

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    154/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    155/165

    1020

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    156/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    157/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    158/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    159/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    160/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    161/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    162/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    163/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    164/165

  • 8/13/2019 Dominator-Based Algorithms in Logic Synthesis and Verification

    165/165