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
8f690fe8
Commit
8f690fe8
authored
Oct 19, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrating old SAT solver into majexact and twoexact.
parent
298ec14e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
11 deletions
+32
-11
abclib.dsp
+4
-0
src/base/abci/abc.c
+27
-11
src/sat/bmc/bmcMaj2.c
+0
-0
src/sat/bmc/module.make
+1
-0
No files found.
abclib.dsp
View file @
8f690fe8
...
@@ -2023,6 +2023,10 @@ SOURCE=.\src\sat\bmc\bmcMaj.c
...
@@ -2023,6 +2023,10 @@ SOURCE=.\src\sat\bmc\bmcMaj.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\sat\bmc\bmcMaj2.c
# End Source File
# Begin Source File
SOURCE=.\src\sat\bmc\bmcMaxi.c
SOURCE=.\src\sat\bmc\bmcMaxi.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/base/abci/abc.c
View file @
8f690fe8
...
@@ -8075,9 +8075,10 @@ usage:
...
@@ -8075,9 +8075,10 @@ usage:
int
Abc_CommandMajExact
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandMajExact
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
void
Maj_ManExactSynthesis
(
int
nVars
,
int
nNodes
,
int
fUseConst
,
int
fUseLine
,
int
fVerbose
);
extern
void
Maj_ManExactSynthesis
(
int
nVars
,
int
nNodes
,
int
fUseConst
,
int
fUseLine
,
int
fVerbose
);
int
c
,
nVars
=
3
,
nNodes
=
1
,
fUseConst
=
0
,
fUseLine
=
0
,
fVerbose
=
1
;
extern
void
Maj_ManExactSynthesis2
(
int
nVars
,
int
nNodes
,
int
fUseConst
,
int
fUseLine
,
int
fVerbose
);
int
c
,
nVars
=
3
,
nNodes
=
1
,
fUseConst
=
0
,
fUseLine
=
0
,
fGlucose
=
0
,
fVerbose
=
1
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"INfcvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"INfc
g
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -8109,6 +8110,9 @@ int Abc_CommandMajExact( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -8109,6 +8110,9 @@ int Abc_CommandMajExact( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'c'
:
case
'c'
:
fUseLine
^=
1
;
fUseLine
^=
1
;
break
;
break
;
case
'g'
:
fGlucose
^=
1
;
break
;
case
'v'
:
case
'v'
:
fVerbose
^=
1
;
fVerbose
^=
1
;
break
;
break
;
...
@@ -8123,16 +8127,20 @@ int Abc_CommandMajExact( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -8123,16 +8127,20 @@ int Abc_CommandMajExact( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Cannot sythesize MAJ gate with an even number of inputs (%d).
\n
"
,
nVars
);
Abc_Print
(
-
1
,
"Cannot sythesize MAJ gate with an even number of inputs (%d).
\n
"
,
nVars
);
return
1
;
return
1
;
}
}
Maj_ManExactSynthesis
(
nVars
,
nNodes
,
fUseConst
,
fUseLine
,
fVerbose
);
if
(
fGlucose
)
Maj_ManExactSynthesis
(
nVars
,
nNodes
,
fUseConst
,
fUseLine
,
fVerbose
);
else
Maj_ManExactSynthesis2
(
nVars
,
nNodes
,
fUseConst
,
fUseLine
,
fVerbose
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: majexact [-IN <num>] [-fcvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: majexact [-IN <num>] [-fc
g
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
exact synthesis of multi-input MAJ using MAJ3 gates
\n
"
);
Abc_Print
(
-
2
,
"
\t
exact synthesis of multi-input MAJ using MAJ3 gates
\n
"
);
Abc_Print
(
-
2
,
"
\t
-I <num> : the number of input variables [default = %d]
\n
"
,
nVars
);
Abc_Print
(
-
2
,
"
\t
-I <num> : the number of input variables [default = %d]
\n
"
,
nVars
);
Abc_Print
(
-
2
,
"
\t
-N <num> : the number of MAJ3 nodes [default = %d]
\n
"
,
nNodes
);
Abc_Print
(
-
2
,
"
\t
-N <num> : the number of MAJ3 nodes [default = %d]
\n
"
,
nNodes
);
Abc_Print
(
-
2
,
"
\t
-f : toggle using constant fanins [default = %s]
\n
"
,
fUseConst
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-f : toggle using constant fanins [default = %s]
\n
"
,
fUseConst
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle using cascade topology [default = %s]
\n
"
,
fUseLine
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle using cascade topology [default = %s]
\n
"
,
fUseLine
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-g : toggle using Glucose 3.0 by Gilles Audemard and Laurent Simon [default = %s]
\n
"
,
fGlucose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose printout [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose printout [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
...
@@ -8152,9 +8160,10 @@ usage:
...
@@ -8152,9 +8160,10 @@ usage:
int
Abc_CommandTwoExact
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandTwoExact
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
void
Exa_ManExactSynthesis
(
char
*
pTtStr
,
int
nVars
,
int
nNodes
,
int
fVerbose
);
extern
void
Exa_ManExactSynthesis
(
char
*
pTtStr
,
int
nVars
,
int
nNodes
,
int
fVerbose
);
int
c
,
nVars
=
4
,
nNodes
=
3
,
fVerbose
=
1
;
char
*
pTtStr
=
NULL
;
extern
void
Exa_ManExactSynthesis2
(
char
*
pTtStr
,
int
nVars
,
int
nNodes
,
int
fVerbose
);
int
c
,
nVars
=
4
,
nNodes
=
3
,
fGlucose
=
0
,
fVerbose
=
1
;
char
*
pTtStr
=
NULL
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"INvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"IN
g
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -8180,6 +8189,9 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -8180,6 +8189,9 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
nNodes
<
0
)
if
(
nNodes
<
0
)
goto
usage
;
goto
usage
;
break
;
break
;
case
'g'
:
fGlucose
^=
1
;
break
;
case
'v'
:
case
'v'
:
fVerbose
^=
1
;
fVerbose
^=
1
;
break
;
break
;
...
@@ -8201,14 +8213,18 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -8201,14 +8213,18 @@ int Abc_CommandTwoExact( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Function should not have more than 10 inputs.
\n
"
);
Abc_Print
(
-
1
,
"Function should not have more than 10 inputs.
\n
"
);
return
1
;
return
1
;
}
}
Exa_ManExactSynthesis
(
pTtStr
,
nVars
,
nNodes
,
fVerbose
);
if
(
fGlucose
)
Exa_ManExactSynthesis
(
pTtStr
,
nVars
,
nNodes
,
fVerbose
);
else
Exa_ManExactSynthesis2
(
pTtStr
,
nVars
,
nNodes
,
fVerbose
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: twoexact [-IN <num>] [-fcvh] <hex>
\n
"
);
Abc_Print
(
-
2
,
"usage: twoexact [-IN <num>] [-fc
g
vh] <hex>
\n
"
);
Abc_Print
(
-
2
,
"
\t
exact synthesis of multi-input function using two-input gates
\n
"
);
Abc_Print
(
-
2
,
"
\t
exact synthesis of multi-input function using two-input gates
\n
"
);
Abc_Print
(
-
2
,
"
\t
-I <num> : the number of input variables [default = %d]
\n
"
,
nVars
);
Abc_Print
(
-
2
,
"
\t
-I <num> : the number of input variables [default = %d]
\n
"
,
nVars
);
Abc_Print
(
-
2
,
"
\t
-N <num> : the number of MAJ3 nodes [default = %d]
\n
"
,
nNodes
);
Abc_Print
(
-
2
,
"
\t
-N <num> : the number of MAJ3 nodes [default = %d]
\n
"
,
nNodes
);
Abc_Print
(
-
2
,
"
\t
-g : toggle using Glucose 3.0 by Gilles Audemard and Laurent Simon [default = %s]
\n
"
,
fGlucose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose printout [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose printout [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
<hex> : truth table in hex notation
\n
"
);
Abc_Print
(
-
2
,
"
\t
<hex> : truth table in hex notation
\n
"
);
...
@@ -24685,7 +24701,7 @@ usage:
...
@@ -24685,7 +24701,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-L file: the log file name [default = %s]
\n
"
,
pLogFileName
?
pLogFileName
:
"no logging"
);
Abc_Print
(
-
2
,
"
\t
-L file: the log file name [default = %s]
\n
"
,
pLogFileName
?
pLogFileName
:
"no logging"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle the use of rewriting [default = %s]
\n
"
,
fRewrite
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle the use of rewriting [default = %s]
\n
"
,
fRewrite
?
"yes"
:
"no"
);
// Abc_Print( -2, "\t-a : toggle SAT sweeping and SAT solving [default = %s]\n", fNewAlgo? "SAT solving": "SAT sweeping" );
// Abc_Print( -2, "\t-a : toggle SAT sweeping and SAT solving [default = %s]\n", fNewAlgo? "SAT solving": "SAT sweeping" );
Abc_Print
(
-
2
,
"
\t
-s : toggle using Satoko
instead of build-in MiniSAT
[default = %s]
\n
"
,
fUseSatoko
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle using Satoko
by Bruno Schmitt
[default = %s]
\n
"
,
fUseSatoko
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
...
@@ -24881,7 +24897,7 @@ usage:
...
@@ -24881,7 +24897,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-D num : the delta in the number of nodes [default = %d]
\n
"
,
nNodeDelta
);
Abc_Print
(
-
2
,
"
\t
-D num : the delta in the number of nodes [default = %d]
\n
"
,
nNodeDelta
);
Abc_Print
(
-
2
,
"
\t
-L file: the log file name [default = %s]
\n
"
,
pLogFileName
?
pLogFileName
:
"no logging"
);
Abc_Print
(
-
2
,
"
\t
-L file: the log file name [default = %s]
\n
"
,
pLogFileName
?
pLogFileName
:
"no logging"
);
Abc_Print
(
-
2
,
"
\t
-u : toggle performing structural OR-decomposition [default = %s]
\n
"
,
fOrDecomp
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-u : toggle performing structural OR-decomposition [default = %s]
\n
"
,
fOrDecomp
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle using Satoko
instead of build-in MiniSAT
[default = %s]
\n
"
,
fUseSatoko
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle using Satoko
by Bruno Schmitt
[default = %s]
\n
"
,
fUseSatoko
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
...
@@ -25172,7 +25188,7 @@ usage:
...
@@ -25172,7 +25188,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-d : toggle dropping (replacing by 0) SAT outputs [default = %s]
\n
"
,
pPars
->
fDropSatOuts
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle dropping (replacing by 0) SAT outputs [default = %s]
\n
"
,
pPars
->
fDropSatOuts
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-u : toggle performing structural OR-decomposition [default = %s]
\n
"
,
fOrDecomp
?
"yes"
:
"not"
);
Abc_Print
(
-
2
,
"
\t
-u : toggle performing structural OR-decomposition [default = %s]
\n
"
,
fOrDecomp
?
"yes"
:
"not"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle disabling periodic restarts [default = %s]
\n
"
,
pPars
->
fNoRestarts
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle disabling periodic restarts [default = %s]
\n
"
,
pPars
->
fNoRestarts
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle using Satoko
instead of build-in MiniSAT
[default = %s]
\n
"
,
pPars
->
fUseSatoko
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle using Satoko
by Bruno Schmitt
[default = %s]
\n
"
,
pPars
->
fUseSatoko
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-g : toggle using Glucose 3.0 by Gilles Audemard and Laurent Simon [default = %s]
\n
"
,
pPars
->
fUseGlucose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-g : toggle using Glucose 3.0 by Gilles Audemard and Laurent Simon [default = %s]
\n
"
,
pPars
->
fUseGlucose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose output [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose output [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-z : toggle suppressing report about solved outputs [default = %s]
\n
"
,
pPars
->
fNotVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-z : toggle suppressing report about solved outputs [default = %s]
\n
"
,
pPars
->
fNotVerbose
?
"yes"
:
"no"
);
src/sat/bmc/bmcMaj2.c
0 → 100644
View file @
8f690fe8
This diff is collapsed.
Click to expand it.
src/sat/bmc/module.make
View file @
8f690fe8
...
@@ -23,6 +23,7 @@ SRC += src/sat/bmc/bmcBCore.c \
...
@@ -23,6 +23,7 @@ SRC += src/sat/bmc/bmcBCore.c \
src/sat/bmc/bmcInse.c
\
src/sat/bmc/bmcInse.c
\
src/sat/bmc/bmcLoad.c
\
src/sat/bmc/bmcLoad.c
\
src/sat/bmc/bmcMaj.c
\
src/sat/bmc/bmcMaj.c
\
src/sat/bmc/bmcMaj2.c
\
src/sat/bmc/bmcMaxi.c
\
src/sat/bmc/bmcMaxi.c
\
src/sat/bmc/bmcMesh.c
\
src/sat/bmc/bmcMesh.c
\
src/sat/bmc/bmcMesh2.c
\
src/sat/bmc/bmcMesh2.c
\
...
...
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