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

1 / 30
About This Presentation
Title:

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

Description:

Zero-Suppressed Binary Decision Diagrams and Their Applications in Logic Synthesis ... Rule 1: Elimination Rule: Nodes cannot have both edges pointing to the same node ... – PowerPoint PPT presentation

Number of Views:142
Avg rating:3.0/5.0
Slides: 31
Provided by: karenrst
Category:

less

Transcript and Presenter's Notes

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


1
Zero-Suppressed Binary Decision Diagrams and
Their Applications in Logic Synthesis Alan
Mishchenko Portland State University
2
Overview
  • Representations of discrete functions
  • BDDs vs. ZDDs
  • Characteristic functions of covers
  • Prime and essential prime computation
  • Experimental results

3
Representations of Boolean Functions
  • Truth table
  • Karnaugh map
  • SoP, PoS, ESoP
  • Reed-Muller expansions (PPRM,FPRM,GRM,etc.)
  • Decision tree
  • Decision diagrams (BDD,ZDD,KFDD,BMD,etc.)

4
Example
F
ab
c
a
b
b
c
c
c
c
0
1
1
0
0
1
1
1
5
BDD Reduction Rules
Rule 1 Elimination Rule Nodes cannot have both
edges pointing to the same node
Rule 2 Merging Rule Nodes must be unique
a
a
a
a
b
b
b
b
b
b
6
Example of BDD Reduction
a
a
a
b
b
b
b
b
c
c
c
c
c
c
c
c
0
0
1
1
1
1
0
1
0
1
1
1
0
1
0
Decision Tree
BDD
reduction
7
ZDD Reduction Rules
Rule 1 Elimination Rule Nodes cannot have the
positive edge pointing to the 0-terminal
Rule 2 Merging Rule Nodes must be unique
a
a
a
a
b
b
b
b
b
b
0
8
Example of ZDD Reduction
a
a
a
b
b
b
b
b
b
c
c
c
c
c
c
c
c
0
1
1
0
1
1
1
1
1
0
1
1
1
0
0
1
Decision Tree
ZDD
reduction
9
What is common/different in BDD/ZDD?
  • Common All the paths from the root to the
    terminal 1 represent a disjoint cover of the
    on-set of the function. This cover is the same in
    BDD and ZDD if the ordering of variables in the
    same.
  • Different is the way how cubes of the disjoint
    cover are encoded in the paths.

10
BDD Encoding
  • A variable is positive (negative) in the cube if
    the path goes through the 1-edge (0-edge) of a
    node labeled by this variable.
  • A variable is absent in the cube if the path has
    no node labeled by this variable.

11
ZDD Encoding
  • A variable is positive in the cube if the path
    goes through the 1-edge of a node labeled by
    this variable.
  • A variable is negative in the cube if the path
    goes through the 0-edge or if the path has no
    node labeled by this variable
  • A variable is absent in a cube, if the path goes
    through a node labeled by this variable and both
    edges of the node point to the same node.

12
Example F(a,b,c)
Disjoint cover is
ZDD
BDD
ab
a
a
c
b
b
b
c
c
c
c
0
1
0
1
13
Example F(a,b,c) b
ZDD
BDD
ab
a
c
b
b
c
0
1
0
1
14
Examples F(a,b,c)
BDD
ZDD
ab
c
a
b
b
c
0
1
0
1
15
Conclusion
  • ZDDs have smaller size when minterms of the
    function have many variables in the negative
    polarity

16
Functions and Covers
  • A boolean function may have many SOPs
  • BDDs and ZDDs w.r.t. primary inputs can represent
    only one type of disjoint covers
  • There must be a way of representing arbitrary
    covers of a boolean function

17
Characteristic Function of a Cover
  • Encode each polarity of each primary input
    variable by a separate binary variable
  • Characteristic function of a cover is defined as
    follows
  • It depends on the 2n variables.
  • For each cube in the cover, a minterm is added to
    the on-set of the characteristic function.
  • The minterm has those variables in the positive
    polarity that correspond to literals present in
    the cube and those variables in the negative
    polatity that correspond to literals missing in
    the cube.

18
Example F ab cd
  • A non-disjoint cover C ab, cd
  • New variables are (a1,a0,b1,b0,c1,c0,d1,d0)
  • The characteristic function ?C is defined as
    follows
  • It depends on variables (a1,a0,b1,b0,c1,c0,d1,d0)
  • It has two minterms because the cover has two
    cubes
  • Each of the minterms has two variables in the
    positive polarity and the rest in the negative
    polarity
  • ?C

19
Example (cont.)
BDD
ZDD
a1
a1
?C
a0
a0
b1
b1
b1
a1a0b1b0
b0
b0
c1c0d1d0
c1
c1
c1
c0
c0
d1
d1
d1
d0
0
1
1
0
20
Terminal Nodes in ZDDs for Covers
  • Terminal 0 stands for the empty cover
  • There are no assignments for which characteristic
    function evaluated to 1 and therefore there are
    no cubes in the cover.
  • Terminal 1 stands for the cover containing only
    the tautology cube
  • There is only one assignment, for which the
    characteristic function evaluates to 1, and this
    assignment does not contain variables. According
    to the ZDD reduction rules, it means that all
    variables on the path are equal to zero, which in
    turn means that all the literals are missing in
    the cube.

21
Decomposition of Functions
  • Shannon expansion is used to decompose the
    function w.r.t. an input variable
  • F(x,y,z) x F(0,y,z) x F(1,y,z),
    where F1 F(1,y,z) and F0 F(0,y,z) are
    positive and negative cofactors of function F
    w.r.t. variable x.
  • The decomposition operation is denoted
  • (func,func) DecomposeBdd( func F, var x )
  • The inverse composition operation is denoted
  • func ComposeBdd( func F0, func F1, var x )

22
Decomposition of Covers
  • The decomposition of a cover w.r.t. the primary
    input variable is a triple of covers
  • The cover C0 containing cubes with the variable
    in the form of the negative literal
  • The cover C1 containing cubes with the variable
    in the form of the positive literal
  • The cover C2 containing cubes without the
    variable
  • C x C0 x C1 C2
  • This operation is denoted
  • (cover,cover,cover)DecomposeCover( cover C, var
    x)

23
Composition of Covers
  • The inverse operation is the composition of the
    triple of covers, into one cover that contains
    all the cubes.
  • The composition is always w.r.t. a primary input
    variable not used in the component covers.
  • This operation is denoted
  • cover ComposeCover(cover C0,cover C1,cover C2,
    var x)

24
Interpretation of Cover Decomposition
25
ZDD-Based Prime Computation
cover Primes( func F ) if ( F 0 ) return
0 if ( F 1 ) return 1 var x
GetTopMostVariable( F ) (F0, F1)
DecomposeBdd( F, x ) cover P2 Primes( F0
F1 ) cover P0 Primes( F0 ) - P2 cover
P1 Primes( F1 ) - P2 cover P
ComposeCover( P0, P1, P2, x ) return P
26
Essential Prime Computation
cover Essentials( cover C, func Fon ) func
S SingleCoveredArea( C ) cover R
CubesOverlappingWithArea( C, S Fon )
return R
  • SingleCoveredArea( C ) computes the function
    representing the part of the boolean space
    covered by only one cube in cover C.
  • CubesOverlappingWithArea( C, A ) returns those
    cubes in cover C that have at least one minterm
    in common with the part of boolean space
    specified by A.

27
Interpretation of Single Covering
28
Procedure 1
func SingleCoveredArea( cover C ) if ( C 0 )
return 0 if ( C 1 ) return 1 var x
GetTopMostVariable( C ) (C0, C1, C2)
DecomposeCover( C, x ) func F0
SingleCoveredArea( C0 ) func F1
SingleCoveredArea( C1 ) func F2
SingleCoveredArea( C2 ) func R0 F0!F2
!F2F0 func R1 F1!F2 !F2F1 func F
ComposeBdd( R0, R1, x ) return F
29
Procedure 2
cover CubesOverlappingWithArea( cover C, func A
) if ( A 0 C 0 ) return 0 if ( A
1 C 1 ) return C var x
GetTopMostVariable( C, A ) (C0, C1, C2)
DecomposeCover( C, x ) (A0, A1)
DecomposeBdd( A, x ) cover R0
CubesOverlappingWithArea( C0, A0 ) cover R1
CubesOverlappingWithArea( C1, A1 ) cover
R2 CubesOverlappingWithArea( C2, A0 A1)
cover R ComposeCover( R0, R1, R2, x )
return R
30
Experimental Results
Write a Comment
User Comments (0)
About PowerShow.com