Professional Documents
Culture Documents
Maciej Ciesielski Electrical & Computer Engineering University of Massachusetts, Amherst, USA ciesiel@ecs.umass.edu
2001 Ciesielski
BDD Tutorial
Common Representations
Boolean functions ( f : B B )
Truth table, Karnaugh map SoP, PoS, ESoP Reed-Muller expansions (PPRM, FPRM, GRM, etc.) Decision diagrams (BDD, ZDD, KFDD, *BMD, etc.)
Canonical Representations
Each minimal, canonical representation is characterized by
Decomposition type
Shannon, Davio, moment decomposition, Taylor, etc.
Reduction rules
Redundant nodes, isomorphic sub-graphs, etc
Decomposition Types
Shannon expansion
f = x fx + x fx
Positive Davio (moment decomposition): replace x=1-x
f = x fx + (1-x) fx = fx + x fx
where
fx = fx - fx
Negative Davio
f = fx + (1-x) fx
2001 Ciesielski BDD Tutorial 4
f = x fx + x fx
Compact data structure for Boolean logic
can represents sets of objects (states) encoded as Boolean functions
Canonical representation
reduced ordered BDDs (ROBDD) are canonical essential for verification
2001 Ciesielski BDD Tutorial 5
f
a h= c + bc b c 0 1
hb = (c+bc)|b=0 = c
hb = (c+bc)|b=1 = c
2001 Ciesielski BDD Tutorial
2001 Ciesielski
BDD Tutorial
f1 = a g(b) + a h(c) = f2
2001 Ciesielski BDD Tutorial
f = f 1 = f2
8
BDD Construction
Reduced Ordered BDD
a b c 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 f 0 0 0 1 0 1 0 1
f = ac + bc
b c c
f
a
1 edge 0 edge
b
c c
Truth table
2001 Ciesielski BDD Tutorial
Decision tree
9
f
a b c
f = (a+b)c
a b c
1 0
F(x,y)
F(y)
Restrict
x=b
2001 Ciesielski
BDD Tutorial
11
APPLY Operator
Apply: F
0 1 0 1
=
0 1
Useful in constructing BDD for arbitrary Boolean logic Any logic operation can be expressed using Restrict, Apply
ac a 2.3
=
c 3
1.3 c 0 1 0.3 1.0 1.1
=
0
a c
2001 Ciesielski
BDD Tutorial
14
f = ac+bc bc
b 6 c 7
a 4+6
0+6 6+5 b b
=
0+0
=
0
2001 Ciesielski
BDD Tutorial
15
Application to Verification
Equivalence Checking of combinational circuits Canonicity property of BDDs:
if F and G are equivalent, their BDDs are identical (for the same ordering of variables)
a
b
G = ac +bc
1
BDD Tutorial
0
2001 Ciesielski
1
16
Application to SAT
Functional test generation
SAT, Boolean satisfiability analysis to test for H = 1 (0), find a path in the BDD to terminal 1 (0) the path, expressed in function variables, gives a satisfying solution (test vector)
a b ab
c
abc
0
2001 Ciesielski BDD Tutorial
1
17