20130108 ast signature based boolean matching in the presence of don’t cares_mori
TRANSCRIPT
Signature Based Boolean Matching in the Presence
of Don’t Cares
Signature Based Boolean Matching in the Presence
of Don’t Cares
Afshin AbdollahiDepartment of Electrical Engineering
University of CaliforniaRiverside, CA
OutlineOutline
Introduction Previous work Preliminaries Workflow
– Determining phase of function– Creating input match graph– Graph reduction– Branch and bound algorithm
Experimental results Conclusions
IntroductionIntroduction
Boolean Matching – is to determine whether two functions are
equivalent under input permutation and input/output phase assignment
NPN-equivalent– Boolean functions that are equivalent under
input permutation and input/output phase assignment
Previous WorkPrevious Work
Compute canonical forms of the Boolean functions
Signatures – completely specified functions (CSF)– incompletely specified functions (ISF)
Algebraic framework Multiple-value functions Matrix
CompatibilityCompatibility
00110011
x2
01010101
x3
00001111
x1 f
000ddd11
00110011
y2
01010101
y3
00001111
y1 g
00ddd111
f off
f dc
f
on
g
off
g dc
g on
f g
f off g on = f on g off =
TransformationTransformation
A Transformation, T, is an onto-mapping from
X = (x1, x2, …, xn) to Y = (y1, y2, …, yn)
by a phase assignment T (xi) = yj or yj
Example :– For vectors X = (x1, x2, x3) and Y =(y1, y2, y3) – an example of a transformation is T (x1, x2, x3) = (y2, y3, y1 )
EquivalencyEquivalency
Two ISF’s f (X ) and g(Y ) are equivalent if there exists a transformation T such that
EquivalencyEquivalency
00110011
x2
01010101
x3
00001111
x1 f
0d0d1d11
00110011
y2
01010101
y3
00001111
y1 g
d1d100dd
T (y, y2, y3) = (x3, x1 , x2) f(X) g( T(Y) )
00110011
y2
01010101
y3
11110000
y1 g
d1d100dd
y2 y3 y1 g
00110011
01010101
00001111
0d01ddd1
f g f off g on = f on g off =
SignatureSignature
In Completely specified functions (CSF)– 1st –signature for variable x of a CSF , f, is the
“minterm” count of the ONSET of fx (cofactor)
– the “minterm” count of the ONSET of fx1x2 is the 2nd –signature
Satisfy Count RangeSatisfy Count Range
In Incompletely specified functions (ISF)
– As 0th –signature
00110011
x2
01010101
x3
00001111
x1 f
000ddd11
f off
f dc
f
on
2 |f | 5
[f ] = [2, 5]
= {2, 3, 4, 5}
Satisfy Count RangeSatisfy Count Range
1st –signature = [ 2 , 4 ]
2nd –signature = [ 2 ]
00110011
x2
01010101
x3
00001111
x1 f
000ddd11
f off
f dc
f
on
Satisfy Count RangeSatisfy Count Range
00110011
x2
01010101
x3
00001111
x1 f
1d1dd000
00110011
y2
01010101
y3
00001111
y1 g
00ddd111
[f ] [g ]
[g] = [3, 6][f ] = [2, 5]
[f ] [g ]
[f ] = [3, 6]
WorkflowWorkflow
Determining phase of function f
Creating input match graph
Graph reduction
Branch and bound algorithm
Determining Phase of Function fDetermining Phase of Function f Check two conditions :
1. [ f ] [ g ] ≠
2. [ f ] [ g ] ≠
WorkflowWorkflow
Determining phase of function f
Creating input match graph
Graph reduction
Branch and bound algorithm
Input Matching GraphInput Matching Graph
f x1 x2 ... xi ... ... xn
g y1 y2 ... ... yj ... yn
+
+
][][ji yx gf
][][ji yx gf
Input Matching GraphInput Matching Graph
43121 xxxxxf on )()( 432321 xxxxxxf off
21yyg on )( 4312 yyyyg off
f x1 x2 x3 x4
g y1 y2 y3 y4
+ + + +
+ +
Input Matching GraphInput Matching Graph
43121 xxxxxf on )()( 432321 xxxxxxf off
21yyg on )( 4312 yyyyg off
f x1 x2 x3 x4
g y1 y2 y3 y4
+ + +
Hall’s Matching Theorem Hall’s Matching Theorem
In a bi-partite graph with parts X and Y a match exists if and only if any number of vertices in X (say m vetices) are connected to more than or equal to m vertices in Y.
m = 1 m = 2
First step: Check Hall’s Theorem for m=1 and 2
WorkflowWorkflow
Determining phase of function f
Creating input match graph
Graph reduction
Branch and bound algorithm
Graph ReductionGraph Reduction
Identify the vertices from (X and Y ) that are connected to only one other vertex
x3
y3
x4
y4
x1
y1
x2
y2
f
g
Graph ReductionGraph Reduction
Identify the vertices from (X and Y ) that are connected to only one other vertex
x3
y3
x4
y4
x1
y1
x2
y2
f
g
WorkflowWorkflow
Determining phase of function f
Creating input match graph
Graph reduction
Branch and bound algorithm
Branch and BoundBranch and Bound
43121 xxxxxf on )()( 432321 xxxxxxf off
21yyg on )( 4312 yyyyg off
f x1 x2 x3 x4
g y1 y2 y3 y4
+ + + +
+ +
Branch and BoundBranch and Bound
f x1 x2 x3 x4
g y1 y2 y3 y4
+ + + +
+
][][3131 yyxx gf
][][3131 yyxx gf
Branch and BoundBranch and Bound
f x1 x2 x3 x4
g y1 y2 y3 y4
+ + + +
+
][][4131 yyxx gf
][][4131 yyxx gf
Branch and BoundBranch and Bound
f x1 x2 x3 x4
g y1 y2 y3 y4
+ + +
),,,(),,,( 43124321 yyyyxxxxT
)())(( YgXTf
Experimental ResultsExperimental Results
MCNC benchmark a machine with an AMD Opteron processor
running at 1.8 Ghz with 2GB RAM They generated a number of circuits of up to
10 inputs by extracting clusters (cones) from MCNC benchmarks
ResultsResults
Runtimes (ms)
Number of Inputs
OurApproach Ref [11] Ref [10] Ref [9]
4 4.210-5 1.510-4 0.13 0.4
5 7.310-5
6 1.810-4 610-4 0.56 117
7 3.710-4
8 8.210-4 3.210-3 8 >1 hour
9 20.110-4
10 44.810-4