260 likes | 376 Views
Davio Gates and Kronecker Decision Diagrams. Lecture 5. Rolf Drechlser’s slides used. Absolutely Minimum Background on Binary Decision Diagrams (BDD) and Kronecker Functional Decision Diagrams. BDDs are based on recursive Shannon expansion F = x F x + x’ F x’
E N D
Davio Gates and Kronecker Decision Diagrams Lecture 5 Rolf Drechlser’s slides used
Absolutely Minimum Background on Binary Decision Diagrams (BDD) and Kronecker Functional Decision Diagrams • BDDs are based on recursive Shannon expansion 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 simulation, analysis, synthesis and verification
b b a b a b f f f c 0 0 1 1 BDD Construction • Typically done using APPLY operator • Reduction rules • remove duplicate terminals • merge duplicate nodes (isomorphic subgraphs) • remove redundant nodes • Redundant nodes: • nodes with identical children
f 1 edge a b c f 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 0 edge a b b c c c c 0 0 0 0 0 1 1 1 BDD Construction – your first BDD • Construction of a Reduced Ordered BDD f = ac + bc Truth table Decision tree
f f a a a b b b b b c c c c c c c 0 0 0 1 1 1 BDD Construction – cont’d f = (a+b)c 1. Remove duplicate terminals • 2. Merge duplicate nodes 3. Remove redundant nodes
Decomposition types Decomposition types are associated to the variables in Xn with the help of a decomposition type list (DTL) d:=(d1,…,dn) where di { S, pD, nD}
KFDD • Definition
Three different reductions types Type I : Each node in a DD is a candidate for the application g f g f xi xi xi
Three different reductions types (cont’d) Type S xi xj xj g f g f
Three different reductions types (cont’d) Type D xi 0 This is used in functional diagrams such as KFDDs xj xj f f g g
Example for OKFDD 1 x1 F=
Example for OKFDD (cont’d) This diagram below explains the expansions from previous slide X1 S-node X2 pD-node X3 nD-node
Example for OKFDD’s with different DTL’s You can save a lot of nodes by a good DTL
Complement Edges They can be applied for S-nodes They can be applied for D-nodes This is a powerful idea in more advanced diagrams – any operator on representation
XOR-operation • D-node • S-node Such recursive operations are a base of diagram creation and operation
AND-operation Such recursive operations are a base of diagram creation and operation
Restriction of Variables for S nodes is trivial Xi=0 Xi=1 xi S-node g f f g Cofactor for Xi=1 Cofactor for Xi=0
Restriction of Variables for D nodes is more complex, requires XORing Xi=1 Xi=0 pD-node xi g f f Please remember this
Restriction of Variables (cond’t) Xi=1 Xi=0 nD-node xi g f f
Optimization of OKFDD-Size • Exchange of Neighboring Variables • DTL Sifting
DIY PROBLEM • Use simulated annealing algorithm for choice of a better variable ordering of the OKFDD
Simple solution • Solution space X1 X2 X3 X4 X3 X4 X1 X2 A solution A solution • Neighborhood structure X1 X2 X3 X4 X1 X3 X2 X4 change End of Lecture 5