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
227b0c77
Commit
227b0c77
authored
Oct 06, 2021
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New command &stochsyn for stochastic synthesis.
parent
31f88974
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
0 deletions
+108
-0
abclib.dsp
+4
-0
src/aig/gia/giaStoch.c
+0
-0
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+103
-0
No files found.
abclib.dsp
View file @
227b0c77
...
...
@@ -5203,6 +5203,10 @@ SOURCE=.\src\aig\gia\giaStg.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaStoch.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaStr.c
# End Source File
# Begin Source File
...
...
src/aig/gia/giaStoch.c
0 → 100644
View file @
227b0c77
This diff is collapsed.
Click to expand it.
src/aig/gia/module.make
View file @
227b0c77
...
...
@@ -87,6 +87,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaSpeedup.c
\
src/aig/gia/giaSplit.c
\
src/aig/gia/giaStg.c
\
src/aig/gia/giaStoch.c
\
src/aig/gia/giaStr.c
\
src/aig/gia/giaSupMin.c
\
src/aig/gia/giaSupp.c
\
...
...
src/base/abci/abc.c
View file @
227b0c77
...
...
@@ -555,6 +555,7 @@ static int Abc_CommandAbc9Exorcism ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9Mfs
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Mfsd
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9DeepSyn
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9StochSyn
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
//static int Abc_CommandAbc9PoPart2 ( Abc_Frame_t * pAbc, int argc, char ** argv );
//static int Abc_CommandAbc9CexCut ( Abc_Frame_t * pAbc, int argc, char ** argv );
//static int Abc_CommandAbc9CexMerge ( Abc_Frame_t * pAbc, int argc, char ** argv );
...
...
@@ -1297,6 +1298,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&mfs"
,
Abc_CommandAbc9Mfs
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&mfsd"
,
Abc_CommandAbc9Mfsd
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&deepsyn"
,
Abc_CommandAbc9DeepSyn
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&stochsyn"
,
Abc_CommandAbc9StochSyn
,
0
);
// Cmd_CommandAdd( pAbc, "ABC9", "&popart2", Abc_CommandAbc9PoPart2, 0 );
// Cmd_CommandAdd( pAbc, "ABC9", "&cexcut", Abc_CommandAbc9CexCut, 0 );
// Cmd_CommandAdd( pAbc, "ABC9", "&cexmerge", Abc_CommandAbc9CexMerge, 0 );
...
...
@@ -47552,6 +47554,107 @@ usage:
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9StochSyn
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
void
Gia_ManStochSyn
(
int
nMaxSize
,
int
nIters
,
int
TimeOut
,
int
Seed
,
int
fVerbose
,
char
*
pScript
);
int
c
,
nMaxSize
=
1000
,
nIters
=
10
,
TimeOut
=
0
,
Seed
=
0
,
fVerbose
=
0
;
char
*
pScript
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"NITSvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'N'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-N
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nMaxSize
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nMaxSize
<
0
)
goto
usage
;
break
;
case
'I'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-I
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nIters
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nIters
<
0
)
goto
usage
;
break
;
case
'T'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-T
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
TimeOut
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
TimeOut
<
0
)
goto
usage
;
break
;
case
'S'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-S
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
Seed
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
Seed
<
0
)
goto
usage
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9StochSyn(): There is no AIG.
\n
"
);
return
0
;
}
if
(
argc
!=
globalUtilOptind
+
1
)
{
printf
(
"Expecting a synthesis script in quotes on the command line (for example:
\"
&st; &dch; &if
\"
).
\n
"
);
goto
usage
;
}
pScript
=
Abc_UtilStrsav
(
argv
[
globalUtilOptind
]
);
Gia_ManStochSyn
(
nMaxSize
,
nIters
,
TimeOut
,
Seed
,
fVerbose
,
pScript
);
ABC_FREE
(
pScript
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &stochsyn [-NITS <num>] [-tvh] <script>
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs stochastic synthesis
\n
"
);
Abc_Print
(
-
2
,
"
\t
-N <num> : the max partition size (in AIG nodes or LUTs) [default = %d]
\n
"
,
nMaxSize
);
Abc_Print
(
-
2
,
"
\t
-I <num> : the number of iterations [default = %d]
\n
"
,
nIters
);
Abc_Print
(
-
2
,
"
\t
-T <num> : the timeout in seconds (0 = no timeout) [default = %d]
\n
"
,
TimeOut
);
Abc_Print
(
-
2
,
"
\t
-S <num> : user-specified random seed (0 <= num <= 100) [default = %d]
\n
"
,
Seed
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing optimization summary [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
<script> : synthesis script to use for each partition
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9CexCut
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
return
-
1
;
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