Download Functional Decomposition using BDDs: Concepts, Applications, and Algorithms and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!
ECE 510 OCE
BDDs and Their Applications
Lecture 15. Functional Decomposition
May 16, 2000 Alan Mishchenko
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 2
Overview
- The concept of functional decomposition
- Two uses of BDDs for decomposition
- as a computation engine to implement algorithms
- as a representation that helps finding decompositions
- Two ways to direct decomposition using BDDs
- bound set on top (Lai/Pedram/Vardhula, DAC’93)
- free set on top (Stanion/Sechen, DAC’95)
- other approaches
- Disjoint and non-disjoint decomposition
- Implicit support minimization
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 3
Applications of Decomposition
- Multi-level FPGA synthesis
- VLSI design
- Finite state machine design
- Machine learning and data mining
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 4
Two-Level Curtis Decomposition
if B ∩ F = ∅, this is disjoint decomposition if B ∩ F ≠ ∅, this is non-disjoint decomposition
X
B (Bound Set)
F (Free Set)
F(X) = H( G(B), F ), X = B ∪ F
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 7
Typical Decomposition Algorithm
- Find a set of partitions (B (^) i, Fi) of input variables (X) into bound set variables (Bi ) and free set variables (F (^) i)
- For each partition, find decomposition F(X) = Hi(Gi(B (^) i), Ai) such that the column multiplicity is minimal, and compute DFC
- Repeat the process for all partitions until the decomposition with minimum DFC is found.
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 8
Uses of BDDs for Decomposition
- Whatever is the decomposition algorithm, BDDs can be used to store data and perform computation (using cubes, partitions, etc.)
- Alternatively, the algorithm may exploit the BDD structure of the function F to direct the decomposition in the bound set selection, column multiplicity computation, and deriving the decomposed functions G and H
- Finally, the process of decomposition may be made fully implicit
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 9
BDD-Based Decomposition
- Bound set on top (Lai/Pedram/Vardhula, DAC’93)
- Free set on top (Stanion/Sechen, DAC’95)
- Bi-decomposition using 1-, 0-, and EXOR- dominators (Yang/Ciesielski, ICDD’99)
- Recursive decomposition (Bertacco/Damiani,ICCAD’97)
- Implicit decomposition (Wurth/Eckl/Legl,DAC’95)
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 10
Bound Set on Top (Function G)
G={g 1 ,g 2 }, A=g 1 ′g 2 ′, B=g 1 g 2 ′, C=g 1 ′g 2
g 1 =a′bc+ab′c+abc′, g 2 = a′b′c+ abc
A=00 C=
B=
Bound Set
Free Set
A C B A B C B A
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 13
Free Set on Top (Function G)
A=00 C=
B=
Bound Set
G={g 1 ,g 2 }, g 1 =c′de+cd, g 2 =d+e
Free Set
Bound Set
g 1 g
2
F
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 14
Free Set on Top (Function H)
A=00 C=
B=
Bound Set
F(a,b,c,d,e) = H( a, b, g 1 (c,d,e), g 2 (c,d,e) )
H=(a′b′+ ab) g 1 + (a′b+ ab′) g 2
Free Set
Bound Set
g 1 g
2
F
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 15
“Free Set on Top” Algorithm
- Find good variable order
- Derive implicit representation of all feasible cuts on the BDD representing F
- Use a cost function to find the best bound set and perform decomposition
- Repeat the process for functions G and H
- This algorithms is faster than “bound set on top” but it does not work for non-disjoint decompositions and with DCs
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 16
Non-Disjoint Decomposition
- Non-disjoint decomposition can be reduced to disjoint decomposition by adding variables
- Bound Set = {a,b,c}, Free Set = {c,d} Disjoint decomposition can be generated by introducing variables c 1 =c 2 =c instead of c
- In terms of the Karnaugh map, it is equivalent to introducing two variables instead of one in such a way that c 1 c 2 ′ +c 1 ′c 2 is a don’t care set
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 19
Implicit Support Minimization
- An incompletely specified function over n variables F(x 1 ,x 2 ,…,x (^) n ): Bn→B can be
represented by an interval L ≤ F ≤ U
- The problem of support minimization is to find a function f(x (^) i1,x (^) i2,…,x (^) ik ) depending on the minimum number of variables from (x 1 ,x 2 ,…,x (^) n)
such that L ≤ f ≤ U
- Lemma: Variable xi can be removed from the support of F(x 1 ,x 2 ,…,x (^) n) iff it is true that
[ ∃∃∃∃xi L(x 1 ,x 2 ,…,x n) ⇒∀⇒∀⇒∀⇒∀xi U(x 1 ,x 2 ,…,x n) ] ≡≡≡≡ 1
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 20
Pseudo-Code for FindSupports()
bdd FindSupports(bdd L, bdd U ) { if ( L = 0 || U = 1 ) return 1; if ( ( L >> U ) != 1 ) return 0; // check cache for results xi is the top variable in L and U // solve subproblems P0 = FindSupports( ∃∃∃∃xi L , ∀∀∀∀xi U ); P1 = FindSupports( Lxi’ , U xi’ ) & FindSupports( L xi, U xi ); bdd P = ITE( xi, P1, P0 ); // insert into cache return P; }
May 16, 2000 ECE 510 OCE: BDDs and Their Applications 21
Source Code for FindSupports() bdd FindSupports( const bdd L, const bdd U ) { if ( L == bddfalse || U == bddtrue ) return bddtrue; if ( ( L >> U ) != bddtrue ) return bddfalse; // check cache for results int TopVarL = bdd_var( L ); int TopVarU = bdd_var( U ); int TopVar = ( TopVarL < TopVarU )? TopVarL: TopVarU; bdd TopVarBdd = bdd_ithvar( TopVar ); // find cofactors bdd L0 = bdd_restrict( L, !TopVarBdd ); bdd L1 = bdd_restrict( L, TopVarBdd ); bdd U0 = bdd_restrict( U, !TopVarBdd ); bdd U1 = bdd_restrict( U, TopVarBdd ); // solve subproblems bdd P0 = FindSupports( bdd_exist( L, TopVarBdd ), bdd_forall( U, TopVarBdd ) ); bdd P1 = FindSupports( L0, U0 ) & FindSupports( L1, U1 ); bdd P = bdd_ite( g_XVars[TopVar], P1, P0 ); // insert into cache return P; }