Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
069e9d4f
Commit
069e9d4f
authored
Oct 09, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Towards better Boolean matching.
parent
f935dcd3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
src/opt/dau/dauNonDsd.c
+10
-4
No files found.
src/opt/dau/dauNonDsd.c
View file @
069e9d4f
...
...
@@ -535,7 +535,7 @@ int Dau_DecVerify( word * pInit, int nVars, char * pDsdC, char * pDsdD )
int
Dau_DecPerform
(
word
*
p
,
int
nVars
,
unsigned
uSet
)
{
Vec_Wrd_t
*
vUnique
=
Vec_WrdAlloc
(
10
);
word
tComp
=
0
,
tDec
=
0
,
tDec0
,
tComp0
,
tComp1
,
MintC
,
Mint
D
;
word
tComp
=
0
,
tDec
=
0
,
tDec0
,
tComp0
,
tComp1
,
FuncC
,
Func
D
;
char
pDsdC
[
1000
],
pDsdD
[
1000
];
int
pPermC
[
16
],
pPermD
[
16
],
nVarsC
,
nVarsD
,
nVarsS
,
nVarsU
,
nVarsF
,
nPairs
;
int
i
,
m
,
v
,
status
,
ResC
,
ResD
;
...
...
@@ -571,20 +571,24 @@ int Dau_DecPerform( word * p, int nVars, unsigned uSet )
if
(
i
&
1
)
continue
;
// create miterms with this polarity
MintC
=
MintD
=
~
(
word
)
0
;
FuncC
=
FuncD
=
0
;
for
(
m
=
0
;
m
<
(
1
<<
nVarsS
);
m
++
)
{
word
MintC
,
MintD
;
if
(
!
((
i
>>
m
)
&
1
)
)
continue
;
MintC
=
MintD
=
~
(
word
)
0
;
for
(
v
=
0
;
v
<
nVarsS
;
v
++
)
{
MintC
&=
((
m
>>
v
)
&
1
)
?
s_Truths6
[
nVarsF
+
v
]
:
~
s_Truths6
[
nVarsF
+
v
];
MintD
&=
((
m
>>
v
)
&
1
)
?
s_Truths6
[
nVarsU
+
v
]
:
~
s_Truths6
[
nVarsU
+
v
];
}
FuncC
|=
MintC
;
FuncD
|=
MintD
;
}
// uncomplement given variables
tComp
=
(
~
s_Truths6
[
nVarsF
+
nVarsS
]
&
((
tComp0
&
~
MintC
)
|
(
tComp1
&
MintC
)))
|
(
s_Truths6
[
nVarsF
+
nVarsS
]
&
((
tComp1
&
~
MintC
)
|
(
tComp0
&
Mint
C
)));
tDec
=
tDec0
^
Mint
D
;
tComp
=
(
~
s_Truths6
[
nVarsF
+
nVarsS
]
&
((
tComp0
&
~
FuncC
)
|
(
tComp1
&
FuncC
)))
|
(
s_Truths6
[
nVarsF
+
nVarsS
]
&
((
tComp1
&
~
FuncC
)
|
(
tComp0
&
Func
C
)));
tDec
=
tDec0
^
Func
D
;
// skip this variables
if
(
Vec_WrdFind
(
vUnique
,
tDec
)
>=
0
)
continue
;
...
...
@@ -595,7 +599,9 @@ int Dau_DecPerform( word * p, int nVars, unsigned uSet )
// replace variables
Dau_DecVarReplace
(
pDsdD
,
pPermD
,
nVarsD
);
Dau_DecVarReplace
(
pDsdC
,
pPermC
,
nVarsC
);
// report
printf
(
" "
);
printf
(
"%3d : "
,
Vec_WrdSize
(
vUnique
)
);
printf
(
"%24s "
,
pDsdD
);
printf
(
"%24s "
,
pDsdC
);
Dau_DecVerify
(
p
,
nVars
,
pDsdC
,
pDsdD
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment