Upload
astrid
View
42
Download
0
Embed Size (px)
DESCRIPTION
To SAT or Not to SAT: Ashenhurst Decomposition in a Large Scale. Hsuan-Po Lin , Jie-Hong Roland Jiang, and Ruei-Rung Lee Graduate Institute of Electronics Engineering / Department of Electrical Engineering, National Taiwan University. 1. Outline. 1. 2. 3. 4. 5. Conclusions. - PowerPoint PPT Presentation
Citation preview
To SAT or Not to SAT:Ashenhurst Decomposition in a Large Scale
Hsuan-Po Lin, Jie-Hong Roland Jiang, and Ruei-Rung Lee
Graduate Institute of Electronics Engineering / Department of Electrical Engineering,
National Taiwan University
104/22/23 ICCAD 2008
2
Outline
Introduction1
Prior Work2
3
4
Conclusions5
Experimental Results
Our Approach
04/22/23 ICCAD 2008
Ashenhurst decomposition f(X) = h(XH,XC,g(XG,XC))
When can f be decomposed as the composition of some g and h?
Comprehensible using decomposition chart
3
Introduction
04/22/23 ICCAD 2008
4
Decomposition Chart
f(a,b,c,d) = h(c,d,g(a,b,d))
000 010 100 110 001 011 101 111
00 0 0 0 0
10 0 1 1 0
01 0 0 1 1
11 1 1 0 0
a,b,d
c,d
0 1 1 0 0 0 1 1
00 0 0 0 0
10 0 1 1 0
01 0 0 1 1
11 1 1 0 0
g
c,d
XH : {c}XG : {a,b}XC : {d}
XH XC
XH XC
XG XC
04/22/23 ICCAD 2008
0 1 1 0 0 0 1 1
00 0 0 0 0
10 0 1 1 0
01 0 0 1 1
11 1 1 0 0
h
000 010 100 110 001 011 101 111
00 0 0 0 0
10 0 1 1 0
01 0 0 1 1
11 1 1 0 0
f
5
Prior Work
BDD-based functional decomposition Memory explosion problem Variable partition cannot be
automated Hard to handle non-disjoint
decomposition Multiple-output decomposition cannot
be handled naturally
04/22/23 ICCAD 2008
6
Our Approach
SAT-based computation Interpolation get g Functional dependency get h
With/without pre-specified variable partition
Single-/multiple-output decomposition
04/22/23 ICCAD 2008
Problem formulation
Given a function f(X) with variable
partition X={XG|XH|XC}, find g and h such
that f(X) = h(XH,XC,g(XG,XC))
7
Single-Output Decomposition
04/22/23 ICCAD 2008
Functions g and h exists iff (f(XH
1, XG1, XC)≠ f(XH
1, XG2, XC))Λ
(f(XH2, XG
2, XC)≠ f(XH2, XG
3, XC))Λ (f(XH
3, XG3, XC)≠ f(XH
3, XG1, XC)) is UNSAT
8
Decomposability as SAT
xg1[[XG
1]] xg2[[XG
2]] xg3[[XG
3]]
xh1[[XH
1]] 1 0
xh2[[XH
2]] 0 1
xh3[[XH
3]] 1 0
04/22/23 ICCAD 2008
xc[[XC]]
f
f f f f f fXH
1 XG1XC XH
1 XG2XC XH
2 XG2XC XH
2 XG3XC XH
3 XG3XC XH
3 XG1XC
1 1 1
For formulas φA and φB with φA Λ φB UNSAT, then there exists an interpolant P of φA such that
1. φA P
2. P Λ φB is UNSAT
3. P refers only to the
common variables of
φA and φB
We show the connection between P and g
P
φBφA
9
Craig Interpolation
04/22/23 ICCAD 2008
Interpolating g-function P: refer to the common variables XG
1, XG2, XC
φA: CP(XG1)≠CP(XG
2) φB: CP(XG
2)≠CP(XG3),CP(XG
1)≠CP(XG3), i.e., CP(XG
1)=CP(XG2)
1004/22/23 ICCAD 2008
f f f f f fXH
1XG1XC XH
1XG2XC XH
2XG2XC XH
2XG3XC XH
3XG3XC XH
3XG1XC
1 1 1
φA φB
f(XH1, XG
1, XC)≠ f(XH1, XG
2, XC) (f(XH2, XG
2, XC)≠ f(XH2, XG
3, XC))Λ(f(XH
3, XG3, XC)≠ f(XH
3, XG1, XC))
XG1 XG
2
… …XG
1 XG2
… …
p
q
rs
p
q
rs
Interpolating g-function (cont’d)
onset
offseta
Relation characterized by P(XG
1, XG2,c) for some c [[Xc]]
Relation after cofactoring
P(XG1=a, XG
2,c) w.r.t. some a [[XG1]]
P(XG1=a, XG
2, XC) is a feasible implementation of g(XG, XC) !
1104/22/23 ICCAD 2008
Computing h-function
A naïve approach For XC = , function h can be derived
using Shannon expansion
h(XH,xg)=(xg Λ hxg) v (xg Λ hxg
)
Non-scalable(w.r.t. XC size)
where
hxg(XH) = h(XH,0) = h(XH,g(XG=a)) = f(XH,XG=a)
and
hxg(XH) = h(XH,1) = h(XH,g(XG=b)) = f(XH,XG=b)
for a,b[[XG]] with g(a)=0 and g(b)=1
1204/22/23 ICCAD 2008
Computing h-function (cont’d)
A scalable approach Function h can be obtained with
functional dependency formulation f(X) = h(φ1(X), φ2(X),…, φm(X)), where h is
the unknown to be computed
Let the above gi be such that φi = xi with xi XHXC for i = 1,…,m-1 φm = g(XG,XC)
So-derived h is what we want Computation can be done with pure SAT
solving [Lee et al.07]1304/22/23 ICCAD 2008
AshenhurstDecomposition(f, XH, XG, XC):
1. F CircuitInstantiation(f )
2. (φA, φB) CircuitPartition(F)
3. P(XG1,XG
2,XC) Interpolation(φA, φB)
4. g(XG,XC) Cofactor(P, a[[XG1]])
5. h FunctionalDependency(f, g)
return(g, h)
14
Overall Flow
04/22/23 ICCAD 2008
15
Automating Variable Partition
For each xi X, addconditional clauses for XG: ((xi
2≡xi3)Λ(xi
4≡xi5)Λ(xi
6≡xi1)) V i
conditional clauses for XH: ((xi1≡xi
2)Λ(xi3≡xi
4)Λ(xi5≡xi
6)) V i
(i,i) (0,0) xiXC
(0,1) xiXG
(1,0) xiXH
(1,1) xi can be in either of XG and XH
04/22/23 ICCAD 2008
f f f f f fXH
1 XG1XC
1 XH2 XG
2XC2 XH
3 XG3XC
3 XH4XG
4XC4 XH
5 XG5XC
5 XH6 XG
6XC6
1 1 1
16
Automating Variable Partition (cont’d)
Make “unit assumptions” on control variables i, i for each xi
Avoid trivial partition Impose seed partition
Enforce one variable in XH
Enforce two variables in XG
Enumerate seed partitions Incremental SAT solving
Apply minimal UNSAT core refinement to reduce XC
04/22/23 ICCAD 2008
17
Multi-Output Decomposition
New UNSAT condition:
V(fi(XH1, XG
1, XC)≠ fi(XH1, XG
2, XC))Λ
V(fi(XH2, XG
2, XC)≠ fi(XH2, XG
3, XC))Λ
V(fi(XH3, XG
3, XC)≠ fi(XH3, XG
1, XC))
Computation is same as before
i
i
i
04/22/23 ICCAD 2008
XG
XH
X
ghf
xg
XC
... ...
18
Experimental Setup
Implemented in ABC using MiniSAT
Linux, Xeon 3.4GHz CPU, and 6Gb RAM
Decompose primary-output and transition functions
Only functions with no less than 50 inputs are considered
ISCAS, MCNC, and ITC
04/22/23 ICCAD 2008
Circuit #func #var #fail #SAT_TO #succ #var_succ #VP_avgrate_valid_VP
time_avg(sec)
Mem(Mb)
b15 370 143—306 0 51 319 143—306 1519 0.917 96.62 107.20
b17 1009 76—308 0 148 861 76—308 1645 0.904 87.12 125.84
c7552 36 50—194 0 2 34 50—194 1350 0.455 64.38 36.65
s13207 3 212—212 0 0 3 212—212 569 0.908 70.26 50.62
s38417 256 53—99 6 72 178 53—99 1090 0.523 103.33 136.04
s38584 7 50—147 0 0 7 50—147 1120 0.924 47.13 51.56
19
Experimental Results
Single-output decomposition
04/22/23 ICCAD 2008
Circuit #pair #var #fail #SAT_TO #succ #var_succ #VP_avgrate_valid_VP
time_avg(sec)
Mem(Mb)
b15 201 145--306 0 31 170 145--269 1176 0.845 113.86 224.07
b17 583 79--310 0 88 495 79--308 676 0.824 103.12 419.35
c7552 21 56--195 0 2 19 56--141 188 0.465 89.57 78.67
s13207 3 212--228 0 0 3 212--228 585 0.7 93.36 118.03
s38417 218 53--116 13 30 175 53--116 689 0.498 109.06 319.48
s38584 9 50--151 0 0 9 50--151 1656 0.713 46.17 207.78
Two-output decomposition
20
Variable partition before / after UNSAT core refinement
Experimental Results (cont’d)
04/22/23 ICCAD 2008
21
Experimental Results (cont’d)
Variable partition qualities resulted from different efforts
||XG|-|XH||/|X||XC|/|X|
w/ mini w/o mini
04/22/23 ICCAD 2008
22
Conclusions
Proposed pure SAT-based Ashenhurst decompositionEasily extendable to non-disjoint and
multiple-output decompositionsScalable to functions with up to 300
input variables
Future workFunctional decomposition beyond
Ashenhurst
04/22/23 ICCAD 2008
23
Thanks for Your Attention!
04/22/23 ICCAD 2008