Download presentation
Presentation is loading. Please wait.
Published byHenry Sherman Modified over 8 years ago
1
Binary Decision Diagrams Prof. Shobha Vasudevan ECE, UIUC ECE 462
2
Overview Binary decision diagrams (BDDs) can represent an arbitrary Boolean function
3
Motivation BDDs are efficient Easily represent large Boolean functions Ideal for synthesis algorithms BDDs are canonical Useful for checking Boolean function equivalence
4
Construction Choose a variable ordering Construct recursively using the Shannon Decomposition Theorem
5
Construction: Example f = abc + b’d + c’d b < c < d < a f b = ac + c’d f b’ = d + c’d
6
Construction: Example Child nodes are cofactors of parent nodes with respect to variable ordering (f b ) c = f bc = a f b’c = d f bc’ = d f b’c’ = d
8
Reductions Isomorphic subgraphs may be merged Redundant nodes may be eliminated
20
Reductions After reductions, the new graph is called a reduced ordered binary decision diagram (ROBDD)
21
Common Functions
22
f = abc + b’d + c’d Order Matters
23
Variable ordering significantly affects the size of the binary decision diagram Optimal ordering is difficult to determine
24
Order Matters
25
First variable ordering requires less information f = ab + cd + ef a < b < c < d < e < f Product terms are eliminated one by one If a product term is one, then the BDD is one Otherwise the BDD only records a zero product term Variable that caused product term to be zero is irrelevant
26
Design Considerations Practical BDD implementation requires careful design considerations Optimize for performance Memory utilization Computational complexity
27
Design Considerations: Unique Table Ultimately interested in reduced BDDs Avoid post-reduction Record newly added nodes to avoid adding the same node twice Function f has children a and b Function g has children a and b Prevent redundant addition of g Implemented as a hash table
28
Design Considerations: Computed Table Table of recently computed functions Different than unique table Unique table: do f and g have the same children? Computed table: did we already compute the AND of f and g? Avoid recomputing previous results
29
Algorithms: Binary Operators Combine BDDs for f and g using a binary operator Build a new BDD for f g Construct new BDD recursively f g = v(f v g v ) + v’(f v’ g v’ ) New node labelled v that points to solution of subproblems Cofactoring is easy If f does not depend on v, then f v = f v’ = f If v is the top variable of f, then the cofactors are the children of top node of f
30
Algorithms: If-Then-Else If-then-else (ITE) is a ternary operator Recursive formulation:
31
Algorithms: If-Then-Else Terminal cases of recursion:
32
ITE operations for Boolean functions
33
Algorithms: If-Then-Else
34
Without computed table every non-terminal ITE call generates two other calls Exponential in the number of variables With computed table, ITE called at most once for each distinct combination of nodes F, G, and H O(|F||G||H|) |F| is the number of nodes in the BDD for F Computed table drastically reduces complexity
35
Combinational Equivalence Checking If F and G are equivalent, then for the same ordering of variables their BDDs are isomorphic (identical) F = a’bc + abc +ab’c G = ac +bc
36
Boolean Satisfiability SAT: Find an assignment to the variables such that the function’s output is 1 In BDD, find a path to terminal node 1 for a satisfying assignment F = a’bc + abc +ab’c
37
Complement Edges Edges that carry the complement attribute function on this edge is the complement of the function on the ending node
38
Complement Edges Canonicity is not maintained. T edge does not carry complement attribute E edge with dot for complement edge, with circle for regular edge No need for terminal node 0
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.