Title: Applications of Binary Decision Diagrams in Logic Synthesis, Verification, and Testing
1An Algorithm for Bi-Decomposition of Logic
Functions Alan Mishchenko Electrical and
Computer Engineering Portland State
University September 26, 2000
2Overview
- Introduction
- The concept of bi-decomposition
- Checking for bi-decomposition
- Deriving decomposed functions
- Variable grouping
- Reusing blocks for multiple outputs
- Experimental results
3Introduction
- The theory of bi-decomposition was developed by
Bernd Steinbach and his colleagues at Freiberg
University of Mining and Technology, Freiberg,
Germany - Early algorithms have been published in
- D.Bochmann, F.Dresig, B.Steinbach, A New
Decomposition Method for Multilevel Circuit
Design. Proc. of EuroDAC 91 - B.Steinbach, F.Schumann, M.Stockert. Functional
Decomposition of Speed Optimized Circuits. In
Power and Timing Modelling, D.Auvergne,
R.Harternskin, eds. ,Springer-Verlag,1993,
pp.65-77.
4Curtis Decomposition
F(X) H( G(B), F ) X BS ? FS
BS (Bound Set)
X
G
F
H
FS (Free Set)
if BS ? FS ?, this is disjoint decomposition if
BS ? FS ? ?, this is non-disjoint decomposition
5Curtis Decomposition
Compatibility Graph
ab
G
cd
1
?2
G?
2
G?
4
3
G
G(a,b) a?b?ab H(G,c,d) Gc? G?(cdc?d?)
6Multi-Level Curtis Decomposition
- Two-level decomposition is iteratively applied to
new functions Hi and Gi, until smaller functions
Gt and Ht are created, that are not further
decomposable.
7Bi-Decomposition
Xa
A
Xc
X
?
F
Xb
B
F(X) GATE( A(Xa,Xc), B(Xb,Xc) )
8Weak Bi-Decomposition
Xa
A
Xc
X
?
F
B
Xb ?
F(X) GATE( A(X), B(Xc) )
9Representation of Functions
- An incompletely specified function (F) is
represented by two completely specified
functions, ON-set (Q) and OFF-set (R) - In other words, F belongs to the interval
- Q ? F ? R
10Checking for OR Bi-Decomposition
ab
00 01 11 10
00 0 1 1 1
01 0 1 1 1
11 0 1 1 1
10 1 1 1 1
OR-gate
cd
0 1
0 0 1
1 1 1
F( a,b,c,d ) OR( ab, cd )
F(X) is not OR-bi-decomposable with variable sets
(Xa,Xb,Xc) iff there exists in the K-map a cell
containing 1 such that 0s appear in both the row
and the column to which this cell belongs
11Checking for OR Bi-Decomposition
ab
ab
00 01 11 10
00 0 1 0 1
01 0 1 0 1
11 0 1 0 1
10 1 1 1 1
00 01 11 10
00 - 1 0 1
01 0 1 - -
11 0 - 0 1
10 1 - 1 1
cd
cd
F( a,b,c,d ) OR( a?b, cd )
12Quantification
F( a,b,c,d )
?abF(a,b,c,d)
?abF(a,b,c,d)
ab
00 0
01 0
11 0
10 1
00 01 11 10
00 1 0 1 0
01 0 0 1 1
11 0 0 0 0
10 1 1 1 1
00 1
01 1
11 0
10 1
cd
?
?
Product of columns
Sum of columns
13Bi-Decomposition Checking Formulas
- F(X) Q(X),R(X) is OR-bi-decomposable with
variable sets (Xa,Xb,Xc) iff - Q(X) ?xaR(X) ?xbR(X) 0
- F(X) Q(X),R(X) is AND-bi-decomposable with
variable sets (Xa,Xb,Xc) iff - R(X) ?xaQ(X) ?xbQ(X) 0
14Deriving Formulas for Components
- If F(X) Q(X),R(X) is OR-bi-decomposable with
variable sets (Xa,Xb,Xc), components FA
QA(X),RA(X) and FB QB(X),RB(X)
are - QA ?xb( Q(X) ?xaR(X) ), RA ?xbR(X)
- QB ?xa( Q(X) QA ), RB ?xaR(X)
15Goals of Variable Grouping
- To include as many variables as possible into Xa
and Xb - To create variable sets Xa and Xb of ballanced
sizes
16Initial Variable Grouping
- function Find_Initial_Grouping( Q, R, X )
- for all x ? X
- Xa x
- for all y ? X x
- Xb y
- if ( Check_Decomposability( Q,R,Xa,Xb ) )
- return (Xa, Xb)
-
-
- return (?, ?)
17Variable Grouping
- function Group_Variables( Q, R, X )
- (Xa,Xb) Find_Initial_Grouping( Q, R, X )
- if ( (Xa, Xb) (?, ?) ) return (?, ?)
- for all z ? X (Xa ? Xb)
- if (Xa lt Xb)
- // try adding new variable z to Xa first, then
to Xb - if ( Check_Decomposability(Q,R,Xa?z,Xb) )
- Xa Xa?z
- else if (Check_Decomposability(Q,R,Xa,Xb?z
)) - Xb Xb?z
- else // similarly if (Xa gt Xb)
- return (Xa, Xb)
18Decomposition Algorithm
- function Bi_Decompose( Q, R )
- X Find_Support( Q, R )
- vsOR Group_Variables_OR( Q, R, X )
- vsAND Group_Variables_AND( Q, R, X )
- vsEXOR Group_Variables_EXOR( Q, R, X )
- vsBest Find_Best( vsOR , vsAND, vsEXOR )
- if ( vsBest (?, ?) )
- vsBest Group_Variables_Weak( Q, R, X )
- (QA,RA) DeriveComponentsA( Q,R,vsBest )
- FA BiDecompose(QA,RA)
- (QB,RB) DeriveComponentsB( Q,R, FA, vsBest )
- FB BiDecompose(QB,RB)
- return ( FA, FB, gate )
19Reusing Blocks for Multiple Outputs
- An original caching technique is used to find
bi-decompositions in which at least one component
is not created but found among the already
existent components
20Experimental Results
Benchmarks Benchmarks Benchmarks SIS SIS SIS SIS SIS SIS Bi-Decomposition Bi-Decomposition Bi-Decomposition Bi-Decomposition Bi-Decomposition Bi-Decomposition
name i o gate exor area casc delay time gates exor area casc delay time
9sym 9 1 255 5 526 15 21.0 3.10 65 27 230 11 17.1 0.17
alu4 14 8 1305 4 2687 21 37.6 29.0 288 26 785 13 18.2 3.35
cps 24 109 2354 12 4782 25 42.2 49.0 1608 152 4382 12 18.4 7.74
duke2 22 29 706 0 1466 17 23.2 4.90 608 70 1695 11 17.1 3.19
e64 65 65 2141 0 4301 8 13.0 8.80 1443 0 3607 7 8.4 4.51
misex3 14 14 1524 11 3134 17 33.0 27.8 897 186 2707 15 22.1 5.88
pdc 16 40 1320 0 2653 17 26.6 27.4 866 85 2375 14 20.7 3.02
spla 16 46 1201 44 2541 16 27.4 53.2 811 81 2227 15 21.9 2.52
vg2 25 8 90 0 195 11 14.2 1.00 216 38 635 11 14.5 3.90
16sym8 16 1 958 4 2123 37 56.0 488.6 299 113 1030 21 33.1 11.87
21Two-Input Gate Library
- GATE zero 0 OCONST0
- GATE one 0 OCONST1
- GATE inv 2 O!a PIN
INV 1 999 1.0 0.2 1.0 0.2 - GATE nand 2 O!(ab) PIN INV
1 999 1.0 0.2 1.0 0.2 - GATE and 3 Oab PIN
NONINV 1 999 1.0 0.2 1.0 0.2 - GATE andS 3 Oa!b PIN
NONINV 1 999 1.0 0.2 1.0 0.2 - GATE nor 2 O!(ab) PIN INV
1 999 1.0 0.2 1.0 0.2 - GATE or 3 Oab PIN
NONINV 1 999 1.0 0.2 1.0 0.2 - GATE orS 3 Oa!b PIN
NONINV 1 999 1.0 0.2 1.0 0.2 - GATE xor 5 Oa!b!ab PIN
UNKNOWN 2 999 1.9 0.5 1.9 0.5 - GATE xor 5 O!(ab!a!b) PIN UNKNOWN
2 999 1.9 0.5 1.9 0.5 - GATE xnor 5 Oab!a!b PIN UNKNOWN
2 999 2.1 0.5 2.1 0.5 - GATE xnor 5 O!(a!b!ab) PIN UNKNOWN
2 999 2.1 0.5 2.1 0.5
22MCNC Gate Library
- GATE zero 0 OCONST0
- GATE one 0 OCONST1
- GATE inv1 1 O!a
- GATE inv2 2 O!a
- GATE inv3 3 O!a
- GATE inv4 4 O!a
- GATE nand2 2 O!(ab)
- GATE nand3 3 O!(abc)
- GATE nand4 4 O!(abcd)
- GATE nor2 2 O!(ab)
- GATE nor3 3 O!(abc)
- GATE nor4 4 O!(abcd)
GATE and2 3 Oab GATE
or2 3 Oab GATE xor
5 Oa!b!ab GATE xor 5
O!(ab!a!b) GATE xnor 5
Oab!a!b GATE xnor 5
O!(!aba!b) GATE aoi21 3 O!(abc)
GATE aoi22 4 O!(abcd) GATE
oai21 3 O!((ab)c) GATE oai22 4
O!((ab)(cd))
23Comparison with Other Methods
Benchmark BDDlopt1 BDDlopt1 BDDlopt1 Bi-Decomposition Bi-Decomposition Bi-Decomposition
Benchmark gates exors time gates exors time
5xp1 67 4/16 0.4 70 17 0.11
9sym 42 0/4 1.0 65 27 0.17
alu2 230 13/53 2.8 221 52 0.82
alu4 582 23/124 15.9 288 26 3.35
cordic 47 6/16 0.5 44 15 18.80
rd84 62 6/12 1.4 55 18 0.17
t481 15 5/5 0.3 17 5 0.49
Footnote Measurements in 1 are in terms of
gates of MCNC gate library, which includes 3 and
4-input gates. Measurements in our approach are
in terms of two-input gates
24References
- 1 C.Yang, M.Ciesielski. BDD-Based Logic
Optimization System. Tech. Report CSE-00-1,
February 2000 - Published also in Proc. of DAC 2000