310 likes | 460 Views
Ruei-Rung Lee , J.-H. Roland Jiang, and Wei-Lun Hung A L C om Lab Grad. Inst. of Electronics Engineering National Taiwan University. Outline. Introduction Prior Work and Preliminaries Main Algorithms Experimental Results Conclusions and Future work. Introduction.
E N D
DAC Ruei-Rung Lee, J.-H. Roland Jiang, and Wei-Lun Hung ALComLab Grad. Inst. of Electronics Engineering National Taiwan University
Outline • Introduction • Prior Work and Preliminaries • Main Algorithms • Experimental Results • Conclusions and Future work
Introduction • Bi-decomposition is a special kind of functional decomposition • Functional decomposition • Break a large function into a network ofsmaller functions • Reduce circuit and communication complexityand thus simplify physical design • Bi-decomposition plays an important role in logic synthesis for restructuring Boolean networks
Outline • Introduction • Prior Work and Preliminaries • Main Algorithms • Experimental Results • Conclusions and Future Work
Closest Prior Work • [Mishchenko et al., 01] • BDD-based approach • Two main limitations • Memory explosion problem • Decomposability is checked under a fixed variable partition
Preliminaries: Bi-decomposition h f Bi-decompose f A f B XA XB XC XA XC XB
Preliminaries:Variable Partition • A set X = {XA|XB|XC} is a partition meaning XA ,XB , XC are pair-wise disjointand XA∪XB∪XC = X • If XC = ψ, we have disjointbi-decomposition ; otherwise, non-disjoint h f A f B XA XC XB
Preliminaries: Craig Interpolation • Given φA and φB are Boolean formulas, if φA ∧φBis unsatisfiable, then there exists anotherBoolean formula P with the following properties: • φA→ P • P∧ φBis unsatisfiable • P refers only to the common variables of φA and φB P φB φA
Outline • Introduction • Prior Work and Preliminaries • Main Algorithms • Experimental Results • Conclusions and Future Work
Bi-decomposition Cases • We consider OR, AND, XOR bi-decompositions • These three cases are enough to generate any other type of bi-decomposition
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 f A f B XA XB
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 rowand column • f(1101) = 0 = fA(11) +fB(01) f(0010) = 0 = fA(00) +fB(10) f(1110) = 1 = fA(11) +fB(10)??
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 XA’ XA XB’ XB
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
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 fAand fB? • How to partition X into XA, XB, XC?
How to derive fA? • φA ∧φB is UNSAT • φA→ P • P∧φB is UNSAT • 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 φB 1 0 0 Offset of fA Onset of fA φA φB f f f XA’ XB’ XA XB XC
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 φB φA Offset of fB Onset of fB 1 0 0 f fA f XA XB XC XA’
How to partition X into XA,XB,XC? • φA = • φB = 1 0 0 1 0 0 f f’ f” f f f X X’ X” XA’ XB’ (αxi,βxi) =(0,1) (αxi,βxi) =(0,0) (αxi,βxi) =(1,0) XA XB XC
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
Avoid Trivial Variable Partition • Bi-decomposition trivially holds if XC, XA∪XC, or XB∪XCequals 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 xaand xbto be in XAand 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
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)
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 XOR fA f B XA XC XB
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 ≠ ≡
How to derive fA and fB? • fA = f(XA,0,XC) • fB = f(0,XB,XC)⊕f(0,0,XC)
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)
Outline • Introduction • Prior Work and Preliminaries • Main Algorithms • Experimental Results • Conclusions and Future Work
Experimental Results Variable partition OR2-decomposition XOR-decomposition
Outline • Introduction • Prior Work and Preliminaries • Main Algorithms • Experimental Results • Conclusions and Future Work
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-decomposelarge Boolean functions • Future Work • We will study how to effectively enumerate better variable partition