Binary decision diagrams (BDDs) Compact representation of a logic - - PDF document

binary decision diagrams bdd s
SMART_READER_LITE
LIVE PREVIEW

Binary decision diagrams (BDDs) Compact representation of a logic - - PDF document

Binary decision diagrams (BDDs) Compact representation of a logic function ROBDDs (reduced ordered BDDs) are a canonical representation: equivalence of ROBDDs implies that the functions are identical Example: f = abc +


slide-1
SLIDE 1

1

Binary decision diagrams (BDD’s)

  • Compact representation of a logic function
  • ROBDD’s (reduced ordered BDD’s) are a canonical representation:

equivalence of ROBDD’s implies that the functions are identical

  • Example: f = abc + b’d + c’d

– T = then edge, E = else edge – Same variable ordering on each path: a ≤ b ≤ c ≤ d (Ordered BDD)

Material taken mostly from

  • G. Hachtel and F. Somenzi,

“Logic Synthesis and Verification Algorithms,” Kluwer Academic Publishers, Boston, MA, 1996.

a b b c c d

1 T T T T T T E E E E E E

Effect of variable ordering

  • Size of diagram varies with variable ordering

a ≤ d ≤ b ≤ c b ≤ c ≤ a ≤ d

b c a d

1 T T T E E E E

a d c c

1 T T T T T E E E E E T T

d b b

E E T

slide-2
SLIDE 2

2

Relation to the Shannon expansion

  • Each node is basically a Shannon expansion

– f = a fa + a’ fa’

a b b c c d

1 T T T T T T E E E E E E

f fa’ fa

Building a BDD from a Shannon expansion

b

T E fb = ac + c’d f = abc + b’d + c’d fb’ = d

c

fbc’ = d fbc = a T E

(… and so on …)

slide-3
SLIDE 3

3

BDD as a compact truth table

  • Truth table: complete ordered binary tree
  • Reduce this by combining isomorphic parts and removing redundant nodes

(T,E point to same node) to get ROBDD

b c c d d d d a a

1 1 1 1 1 T E E E E E E E E E T T T T T T T T

c c

T E E E T T

b d

1 E

a E

T

d

E T T isomorphic TT isomorphic redundant redundant BDD shown earlier for the ordering b ≤ c ≤ a ≤ d

Multioutput BDD’s

  • (Notation: solid line = Then edge; dashed line = Else edge)
  • Example: F1 = b+c, F2 = a+ b+c

b c

1

F1 b c

1

a F2 b c

1

a F2 F1

Separate BDD’s Combined Multioutput BDD

slide-4
SLIDE 4

4

Compactness of BDD’s

  • BDD’s are successful at compactly representing many

common functions

– XOR is an example of a function with a large SOP/POS representation, but a very compact BDD

  • Worst case: O(2n) nodes

– Functions that require this many nodes do exist

  • Can use multilevel techniques to represent BDD’s more

compactly (“partitioned ROBDD’s”)

Operations on BDD’s

  • Given BDD’s for functions f and g, can use Shannon

expansion to see how operations are performed

– Assume variables v1, v2 … vn – f <op> g = v1 (f <op> g)v1 + v1’ (f <op> g)v1’ = v1 (fv1 <op> gv1) + v1’ (fv1’ <op> gv1’) – Can now do this recursively – Pictorially: – Identify identical subtrees as we come up the recursion tree using a hashing function

v1 (BDD for fv1 <op> gv1) (BDD for fv1’ <op> gv1’)

E T