Applications of Binary Decision Diagrams in Logic Synthesis, Verification, and Testing - PowerPoint PPT Presentation

About This Presentation
Title:

Applications of Binary Decision Diagrams in Logic Synthesis, Verification, and Testing

Description:

Boolean resubstitution exists if adding the output of G to ... Is it true that two Boolean functions, F and G, are equal when ... B using boolean formulas ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 30
Provided by: KarenRSt9
Category:

less

Transcript and Presenter's Notes

Title: Applications of Binary Decision Diagrams in Logic Synthesis, Verification, and Testing


1
Specialized Applications of Decision Diagrams
Alan Mishchenko Electrical and Computer
Engineering Portland State University October
22, 2001
2
Overview
  • Applications of Decision Diagrams (DDs)
  • Typical, not so typical, and specialized
  • Fast checks
  • Generic DD traversal procedure
  • Case study Checking for redundant variables
  • Other specialized operators
  • Decomposability checks
  • Encoding
  • Two-level SOP minimization
  • Computing of Walsh and Haar spectra
  • Conclusions

3
Applications of DD operators
  • Standard
  • Apply (Boolean AND,OR,XOR), If-Then-Else (ITE),
    quantifications, cofactoring
  • Non-standard
  • ISOP, compatible projection, disjoint cover
  • Specialized
  • Useful for one application only
  • Performance improvements are possible by
    tailoring DD operators to the application
  • Significant improvements are possible if
    processing can be reduced to checking conditions
    on the DD structure, without building new DD
    nodes ( example Cudd_bddIteConstant() )

4
Generic DD Traversal Procedure
dd Traversal( dd A, dd B ) (1)
terminal cases (2) cache lookup (3)
cofactoring w.r.t. the top variable in A and B
(4) recursively solving subproblems (5)
deriving the solution from the partial solutions
(6) cache insert (7) returning the
result
5
Traversal Procedure Boolean AND
bdd AND( bdd A, bdd B ) (1) if ( A
0 ) return 0 if ( B 0 ) return 0
if ( A 1 ) return B if ( B 1 ) return
A if ( A B ) return A if ( A
B ) return 0 (2) cache lookup (3)
(A0,A1)Cofactors(A,x) (B0,B1)Cofactors(F,x)
(4) R0 AND( A0, A1 ) R1 AND(
B0, B1 ) (5) R ITE( x, R1, R0 )
(6) cache insert (7) return R
6
Checking Variable Redundancy
c
c
0 1
00 1 0
01 0 -
11 1 1
10 - 0
0 1
00 1 -
01 0 -
11 1 1
10 - 0
ab
ab
Theorem. Variable c is redundant if and only if
and
7
Ellimination of Redundant Variables
c
c
c
0 1
00 1 1
01 - -
11 0 0
10 0 0
0 1
00 1 1
01 1 1
11 0 0
10 0 0
0 1
00 1 -
01 - -
11 0 0
10 - 0
ab
ab
ab
8
Redundancy Checking Procedure
  • A procedure to perform the redundancy check
    for a set of variables without building new BDD
    nodes
  • bool CheckRedundant( bdd F, bdd G, bdd Vars
    )
  • Arguments
  • F is the on-set G is the off-set Vars is the
    variable set
  • Return value
  • TRUE, if variables in Vars are redundant in the
    incompletely specification function and can be
    removed from the support
  • FALSE, otherwise

9
Redundancy Checking Procedure
  • Terminal cases
  • If one of the arguments is 0, Vars are redundant
  • If one of the arguments is 1, Vars are not
    redundant
  • Recursive step
  • If the topmost variable does not belong to Vars,
    call the procedure for both cofactors
  • If the topmost variable belongs to Vars, check
    that the redundancy conditions are true

10
Redundancy Checking Pseudocode
bool CheckRedundant( bdd F, bdd G, bdd Vars )
if ( F 0 G 0 ) return TRUE
if ( F 1 G 1 ) return FALSE
x TopVar( F, G, Vars ) (F0, F1)
Cofactors( F, x ) (G0, G1) Cofactors( G, x
) if ( x ? Vars ) / the topmost
variable belongs to Vars / Res
CheckRedundant( F0, G1, Vars x )
if ( Res TRUE ) Res CheckRedundant( F1,
G0, Vars x ) else / the topmost
variable does not belong to Vars /
Res CheckRedundant( F0, G0, Vars )
if ( Res TRUE ) Res CheckRedundant( F1,
G1, Vars ) return Res
11
Resubstitution
F
F
?
G
G
  • Algebraic resubstitution exists if the result of
    division of F by G is not an empty cover
  • Boolean resubstitution exists if adding the
    output of G to the support of F leads to the
    simplification of F

12
Boolean Resubstitution
  • Force variable g G(x) into the support of F
  • Minimize the support of FR(x,g)
  • Accept the transformation, if the resulting
    function is simpler than F

13
Impact on Boolean Resubstitution
A - algebraic resubstitution AB - algebraic
resubstitution followed by boolean resubstitution
BF - brute force approach S - smart approach
14
Disjoint-Support Decomposition (DSD)
  • DSD is the decomposition
    into logic blocks with
    disjoint support
  • Theorem. For a completely specified function, the
    structure of DSD of the finest granularity is
    canonical (unique up to the complementation of
    inputs and outputs of the blocks)

F
d
e
G
H
a
b
c
f
g
15
Checking Existence of DSD
  • The algorithm Bertacco, Damiani, ICCAD97
    computes the DSD structure from the shared BDD of
    a set of completely specified Boolean functions
  • The condition that should be verified many times
    in the process of DSD
  • Is it true that two Boolean functions, F and
    G, are equal when restricted to the domains DF
    and DG?
  • A specialized checking procedure has been
    designed to perform this check

16
Speeding-up DSD
BD Bertacco/Damiani, ICCAD97 150 MHz
PC M Matsunaga, SASHIMI98 266 MHz
PC New our implementation 933 MHz
PC Dash (-) means that the result is not
available in the publications.
17
Non-Disjoint Decomposition
  • Ashenhurst-Curtis
  • Variable grouping
  • Decomposition table
  • Graph coloring
  • Encoding
  • Bi-Decomposition
  • Variable grouping
  • Checking conditions
  • Deriving A and B using boolean formulas

These schemes work for binary and MV
functions/relations
18
DD Operators for MV Decomposition
  • Ashenhurst-Curtis
  • Checking column compatibility
  • Problem Given MV relation R(X,Y,V) and two
    columns C1(X) and C2(X), find out whether these
    columns are compatible
  • bool CheckColumnCompatibility( bdd R, bdd C1,
    bdd C2 )
  • Bi-Decomposition
  • Checking the existence of MAX/MIN-bi-decomposition
  • Problem Given MV relation R(X,V) and the
    partitioning of X into three sets Xa, Xb, and Xc,
    find out whether there exists bi-decomposition
    using MAX or MIN gate
  • bool CheckMMDecomposability( bdd R, bdd Xa, bdd
    Xb )

19
Optimal Non-Strict Encoding
  • Definition. Encoding is strict, if a code is a
    minterm depending on the encoding variable.
  • Definition. Encoding is non-strict, if a code is
    a set of minterms depending on the encoding
    variable. (There should be no overlap between the
    sets.)
  • Problem Given a set of N Boolean or MV
    functions, Fi(X), and an array of variables V,
    V ? log2N, find a non-strict encoding of the
    set of function, which guarantees that the
    resulting code-bit functions are simple in some
    sense.
  • bdd FindEncoding(bdd F, int N, bdd Vars, int
    nVars)

20
Encoding Good and Bad
Before encoding
Encoding
?
?
After encoding
21
Two-Level SOP Minimization
  • The problem with long history
  • Explicit solutions
  • Quine (1952), Espresso (1984), Espresso-Signature
    (1993)
  • Implicit solutions
  • Swami et al (1992), Coudert/Madre (1993), Scherzo
    (1994)
  • Specialized DD operators in the implicit approach
  • Prime computation
  • Covering table reduction
  • Minimization of the number of literals in the SOP
  • SOP minimizer Rondo was designed after Scherzo
  • http//www.ee.pdx.edu/alanmi/research/min/minS
    op.htm

22
Espresso vs. Rondo
E Espresso R Rondo
23
Walsh Spectrum
  • Applications
  • Logic synthesis, technology mapping, NPN checking
  • Traditionally computed using the Walsh matrix
    Clarke et al, 1993
  • Walsh matrix can be defined recursively
  • Examples

Wn-1 Wn-1
Wn-1 -Wn-1
Wn
W0
1
1 1 1 1
1 -1 1 -1
1 1 -1 -1
1 -1 -1 1
1 1
1 -1
W1
W2
24
Computing Walsh Spectrum
  • Brute-force approach
  • Deriving the matrix and multiplying it by the
    truth vector
  • Smart approach
  • Developing a specialized DD procedure
  • Illustration of the brute force approach F
    a b.
  • Truth vector is (0,1,1,1)
  • Encoded truth vector is (1,-1,-1,-1)
  • Spectrum is ( -2, 2, 2, 2 )

1 1 1 1
1 -1 1 -1
1 1 -1 -1
1 -1 -1 1
1
-1
-1
-1
-2
2
2
2
1
x1
x2
x1? x2
x

25
Computing Walsh Spectrum
  • Smart approach
  • Developing a specialized DD procedure based on a
    recursive definition of the Walsh matrix
  • Walsh butterfly diagram Thornton et al, RM01
  • Illustration of the smart approach F a b

A
A B
B
A - B
1
-1
-1
-1
-2
2
2
2
0
2
-2
0
26
Walsh Spectrum Computation
spectrum Walsh( bdd F, varset V ) if ( F
0 ) return 1 / S-encoding / if ( F
1 ) return -1 x TopVariable( V )
(F0, F1) Cofactors( F, x ) W0 Walsh(
F0 , V - x ) W1 Walsh( F1 , V - x )
R0 W0 W1 R1
W0 - W1 return ITE( x, R1, R0 )
27
Haar Spectrum Computation
spectrum Haar( bdd F, varset V ) if ( F 0
) return 0 / R-encoding / if ( F 1 )
return 1 var x TopVariable( V )
(F0, F1) Cofactors( F, x ) H0 Haar( F0 ,
V - x ) H1 Haar( F1 , V - x ) C0
NegPathCoef( H0 ) C1 NegPathCoef( H1 )
R0 Update(H0 , C0 C1) R0 Update(H0 , C0 -
C1) return ITE( x, R1, R0 )
28
Experimental Results
Name In/Out vars BDD nodes Read time, s Walsh nodes Walsh time, s Haar nodes Haar time, s
alu4 14 / 8 804 0.16 8,005 0.17 2,827 0.01
pdc 16 / 40 695 0.66 10,581 0.05 2,992 0.01
soar 83 / 94 482 0.44 3,778 0.06 2,321 0.01
apex3 54 / 50 851 0.60 34,879 0.46 15,109 0.16
des 256 / 245 3,038 2.15 27,892 0.38 16,664 0.16
dalu 75 / 16 1,037 1.10 26,692 0.55 11,399 0.28
pair 173 / 137 3,747 4,23 memout - 42,385 0.33
rot 135 / 107 5,922 1.53 memout - 116,370 0.99
c3540 50 / 22 23,851 23.84 memout - 316,666 5.82
c5315 178 / 123 2,197 1.81 77,554 3.40 58,037 1.15
c7552 207 / 108 9,485 10.49 memout - 62,684 1.95
29
Conclusions
  • Analyzed the generic DD traversal procedure
  • Discussed standard and specialized DD operators
  • Looked into several applications of specialized
    operators
  • Experimental results show that the performance
    may increase several orders of magnitude if the
    DD operators are skillfully tailored to the
    application
  • You are welcome to use the source code at
    http//www.ee.pdx.edu/alanmi/research/extra.htm
Write a Comment
User Comments (0)
About PowerShow.com