Ruei-Rung Lee, J.-H. Roland Jiang,
and Wei-Lun Hung
ALCom Lab
Grad. Inst. of Electronics Engineering
National Taiwan University
m
2017/7/29
DAC
1
Outline
Introduction
Prior Work and Preliminaries
Main Algorithms
Experimental Results
Conclusions and Future work
2
Introduction
Bi-decomposition is a special kind of functional
decomposition
Functional decomposition
Break a large function into a network of
smaller functions
Reduce circuit and communication complexity
and thus simplify physical design
Bi-decomposition plays an important role in logic
synthesis for restructuring Boolean networks
3
Outline
Introduction
Prior Work and Preliminaries
Main Algorithms
Experimental Results
Conclusions and Future Work
4
Closest Prior Work
[Mishchenko et al., 01]
BDD-based approach
Two main limitations
Memory explosion problem
Decomposability is checked under a fixed variable partition
5
Preliminaries: Bi-decomposition
f
h
Bi-decompose
fA
fB
XA XB XC
XA
XC
XB
6
Preliminaries:Variable Partition
A set X = {XA|XB|XC} is a partition
meaning XA , XB , XC are pair-wise
disjoint and XA∪XB∪XC = X
h
If XC = ψ, we have disjoint
bi-decomposition ;
otherwise, non-disjoint
fA
XA
fB
XC
XB
7
Preliminaries: Craig Interpolation
Given φA and φB are Boolean formulas, if φA ∧φB
is unsatisfiable, then there exists another
Boolean formula P with the following properties:
φA → P
P∧ φB is unsatisfiable
P refers only to the common variables of φA and φB
φA
P
φB
8
Outline
Introduction
Prior Work and Preliminaries
Main Algorithms
Experimental Results
Conclusions and Future Work
9
Bi-decomposition Cases
We consider OR, AND, XOR bi-decompositions
These three cases are enough to generate any other
type of bi-decomposition
a
0
0
1
1
b
0
1
0
1
a+b
0
1
1
1
ab
0
0
0
1
a⊕b a(¬b)
0
0
1
0
1
1
0
0
10
Disjoint OR Bi-decomposition
Disjoint: the common variable
set Xc is empty.
E.g.
f(a,b,c,d) = (¬a)b+cd
X = {a,b,c,d}={XA|XB}
XA= {a,b}, XB= {c,d}
f(X) = (¬a)b+cd
= fA(a,b)+fB(c,d)
OR
01
11
10
fB(XB)
0
1
0
0
0
01
0
1
0
0
0
11
1
1
1
1
0
0
XB\XA
00
00
10
fA
1
0
1
0
fA(XA)
0
1
0
XA
fB
0
XB
11
Bi-decomposability
Under what condition can f(X)
be written as fA(XA)∨fB(XB) ?
The necessary and sufficient
condition:
For every 1-entry,
no 0-entries can appear
simultaneously in the
corresponding row
and column
f(1101) = 0 = fA(11) +fB(01)
f(0010) = 0 = fA(00) +fB(10)
f(1110) = 1 = fA(11) +fB(10)??
XB\XA
00
01
11
10
fB(XB)
00
0
1
0
0
0
01
0
1
0
0
0
11
1
1
1
1
1
10
0
1
0
0
0
fA(XA)
0
1
0
0
XB\XA
00
01
11
10
00
0
1
0
0
01
0
1
0
0
11
1
1
1
1
10
0
1
1
0
fA(XA)
fB(XB)
0
0
12
SAT-based Bi-decomposability
∃fA, fB such that f(X) = fA(XA) ∨ fB(XB)
⇔ For every 1-entry, no 0-entries can appear
simultaneously in the corresponding row and column
⇔ f(XA,XB) ∧ ¬f(XA’,XB) ∧ ¬f(XA,XB’) is unsatisfiable
XB’
XB
XA’
XA
XB\XA
00
01
11
10
fB(XB)
00
0
1
0
0
?
01
0
1
0
0
?
11
1
1
1
1
?
10
0
1
1
0
?
fA(XA)
?
?
?
?
13
Non-disjoint Bi-decomposition
∃fA, fB such that f(X) = fA(XA,XC) ∨ fB(XB,XC)
⇔ Under every valuation of XC, for every 1-entry, no 0-entries
can appear simultaneously in the corresponding row and column
⇔ f(XA,XB,XC) ∧ ¬f(XA’ ,XB,XC) ∧¬f(XA,XB’ ,XC)is unsatisfiable
XC=00
XB
XA
XC=01
XB
XA
XC=10
XB
XA
XC=11
XA
XB
14
OR Bi-decomposition
∃fA, fB such that f(X) = fA(XA,XC) ∨ fB(XB,XC)
⇔ f(XA,XB,XC) ∧ ¬f(XA’ ,XB,XC) ∧¬f(XA,XB’ ,XC)
is unsatisfiable
Two problems remain to be solved
How to derive fA and fB?
How to partition X into XA, XB, XC?
15
How to derive fA?
•φA ∧φB is UNSAT
1. φA → P
2. P∧φB is UNSAT
3. P refers only to the common variables of φA,φB
f(XA,XB,XC) ∧ ¬f(XA’ ,XB,XC) ∧¬f(XA,XB’ ,XC) is UNSAT
φA
Onset
of fA
1
0
φA
f
φB
f
f
XA’
XA XB
0
φB
Offset
of fA
XB’
XC
16
How to derive fB?
Let ¬fA be the care condition of fB
f(XA,XB,XC) ∧ ¬fA(XA,XC) ∧¬f(XA’ ,XB,XC) is UNSAT
φA
Onset
of fB
φB
1
f
XA XB
0
0
fA
f
XC
Offset
of fB
XA’
17
How to partition X into XA,XB,XC?
φA =
φB =
1
0
f
X
0
f’
X’
(αx ,βx ) =(0,1)
=(0,0)
i
i
f”
X”
1
0
0
(αx , βx ) xi belongs to
i
i
(0,0)
XC
(0,1)
XB
(1,0)
XA
(1,1)
either
XA or XB
XA’
f
f
(αxi,βxi) =(1,0)
XA XB
XC
f
XB’
18
How to partition X into XA,XB,XC?
We make unit assumption of MiniSat on the control
variables
Assume all the control variables are 0
SAT solver will return a conflict clause consisting of only the
control variables
The conflict clause corresponds to a variable partition
E.g.
Conflict clause (αx1+βx1+αx2+βx3) indicates the unit
assumption αx1=0,βx1=0,αx2=0,andβx3=0 causes
unsatisfiability. So x1∈XC, x2∈XB, and x3∈XA
19
Avoid Trivial Variable Partition
Bi-decomposition trivially holds if XC, XA∪XC, or
XB∪XC equals X
SAT solver may return a conflict clause that consists of
all the control variables ⇒ XC = X
To avoid these trivial partitions, as unit
assumption we specify two distinct variables xa
and xb to be in XA and XB, respectively, and all
other variables in XC
To check if a function is bi-decomposable, we have to
try at most C(n,2) iterations
20
AND Bi-decomposition
∃fA, fB such that f=fA ∧ fB ⇔ ∃fA, fB such that ¬f=¬fA∨
¬fB
E.g.
f (a,b,c,d) = (a+¬b+c)(b+¬c+d)
¬f (a,b,c,d) = (¬a)b(¬c) ∨ (¬b)c(¬d)
= ¬fA(a,b,c) ∨ ¬fB (b,c,d)
fA (a,b,c)= (a+¬b+c), fB (b,c,d) = (b+¬c+d)
f (a,b,c,d) = fA(a,b,c) ∧ fB (b,c,d)
21
XOR Bi-decomposition
(1)=(5)⊕(7), (2)=(5)⊕(8),(3)=(6)⊕(7), (4)=(6)⊕(8)
⇒(1)⊕(4)=(2)⊕(3)
⇒ (1)⊕(2)=(3)⊕(4)
⇒ [(1)≡(2)]∧[(3)≠(4)] UNSAT
XA’
XB\XA
00
XA
01
11
10
fB(XB)
00
XB’
01
XOR
(1)
(3)
(7)
10
(2)
(4)
(8)
fA(XA)
(5)
(6)
fA
fB
11
XB
XA
XC
XB
22
XOR Bi-decomposability
[(1)≡(2)]∧[(3)≠(4)] UNSAT
∃fA, fB such that f(X) = fA(XA,XC)⊕fB(XB,XC) ⇔
(f(XA,XB,XC)≡f(XA,XB’,XC))∧(f(XA’,XB,XC)≠f(XA’,XB’,XC) ) UNSAT
For every pair of columns (rows), their patterns are either complementary or
identical to each other
XA’,Xc
XA,Xc
XB\XA
00
01
11
00
(1)
(3)
11
≠
XB’,Xc
01
≡
XB,Xc
10
(2)
(4)
10
XB\XA
00
01
11
10
00
1
0
1
1
01
0
1
0
0
11
0
1
0
0
10
1
0
1
1
23
How to derive fA and fB?
fA = f(XA,0,XC)
fB = f(0,XB,XC)⊕f(0,0,XC)
Xc
XB\XA
00
01
11
10
fB(XB,Xc)
00
1
0
1
1
1
0
01
0
1
0
0
0
1
11
0
1
0
0
0
1
10
1
0
1
1
1
0
fA(XA,Xc)
1
0
1
1
24
How to partition X into XA,XB,XC?
Similar to that in OR bi-decomposition
(f(X)≡f(X’))∧(f(X”)≠f(X”’))∧
(((xi≡xi”)∧(xi’≡xi”’))∨αxi)
∧(((xi≡xi’)∧(xi”≡xi”’))∨βxi)
(αx , βx )
Xi belongs to
(0,0)
XC
i
i
(0,1)
XB
(1,0)
XA
(1,1)
either XA or XB
25
Outline
Introduction
Prior Work and Preliminaries
Main Algorithms
Experimental Results
Conclusions and Future Work
26
Experimental Results
OR2-decomposition
XOR-decomposition
circuit
#in
#max
#out
#dev
#slv
Time
(sec)
Mem
(Mb)
#dev
#slv
Time
(sec)
Mem
(Mb)
i2
201
201
1
1
1
1.07
18.6
1
34
2.16
18.59
s6669c
322
49
294
101
24423
198.14
29.13
176
3120 279.03
22.87
Dalu
75
75
16
1
26848
352.87
24.14
16
210
26.59
19.68
C880
60
45
26
16
222
8.36
20.72
11
4192 83.08
18.72
27
Experimental Results
Variable partition
OR2-decomposition
XOR-decomposition
28
Outline
Introduction
Prior Work and Preliminaries
Main Algorithms
Experimental Results
Conclusions and Future Work
29
Conclusions and Future Work
Conclusions
We formulated OR, AND, XOR bi-decomposition in
terms of SAT solving
We automated the process of variable partitioning
Experimental results showed we can bi-decompose
large Boolean functions
Future Work
We will study how to effectively enumerate better
variable partition
30
Thank You
31
© Copyright 2026 Paperzz