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
a4325272
Commit
a4325272
authored
Nov 14, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding switch to control the number of nodes tried in mfs2.
parent
4e00ec61
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
14 deletions
+29
-14
src/base/abci/abc.c
+25
-13
src/opt/sfm/sfm.h
+1
-0
src/opt/sfm/sfmCore.c
+2
-0
src/opt/sfm/sfmNtk.c
+1
-1
No files found.
src/base/abci/abc.c
View file @
a4325272
...
...
@@ -4587,7 +4587,7 @@ int Abc_CommandMfs2( Abc_Frame_t * pAbc, int argc, char ** argv )
// set defaults
Sfm_ParSetDefault
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WFDMLCZdaevwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WFDMLCZ
N
daevwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -4668,6 +4668,17 @@ int Abc_CommandMfs2( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
pPars
->
nFirstFixed
<
0
)
goto
usage
;
break
;
case
'N'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-N
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
pPars
->
nNodesMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nNodesMax
<
0
)
goto
usage
;
break
;
case
'd'
:
pPars
->
fRrOnly
^=
1
;
break
;
...
...
@@ -4708,20 +4719,21 @@ int Abc_CommandMfs2( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: mfs2 [-WFDMLCZ <num>] [-daevwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: mfs2 [-WFDMLCZ
N
<num>] [-daevwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs don't-care-based optimization of logic networks
\n
"
);
Abc_Print
(
-
2
,
"
\t
-W <num> : the number of levels in the TFO cone (0 <= num) [default = %d]
\n
"
,
pPars
->
nTfoLevMax
);
Abc_Print
(
-
2
,
"
\t
-F <num> : the max number of fanouts to skip (1 <= num) [default = %d]
\n
"
,
pPars
->
nFanoutMax
);
Abc_Print
(
-
2
,
"
\t
-D <num> : the max depth nodes to try (0 = no limit) [default = %d]
\n
"
,
pPars
->
nDepthMax
);
Abc_Print
(
-
2
,
"
\t
-M <num> : the max node count of windows to consider (0 = no limit) [default = %d]
\n
"
,
pPars
->
nWinSizeMax
);
Abc_Print
(
-
2
,
"
\t
-W <num> : the number of levels in the TFO cone (0 <= num) [default = %d]
\n
"
,
pPars
->
nTfoLevMax
);
Abc_Print
(
-
2
,
"
\t
-F <num> : the max number of fanouts to skip (1 <= num) [default = %d]
\n
"
,
pPars
->
nFanoutMax
);
Abc_Print
(
-
2
,
"
\t
-D <num> : the max depth nodes to try (0 = no limit) [default = %d]
\n
"
,
pPars
->
nDepthMax
);
Abc_Print
(
-
2
,
"
\t
-M <num> : the max node count of windows to consider (0 = no limit) [default = %d]
\n
"
,
pPars
->
nWinSizeMax
);
Abc_Print
(
-
2
,
"
\t
-L <num> : the max increase in node level after resynthesis (0 <= num) [default = %d]
\n
"
,
pPars
->
nGrowthLevel
);
Abc_Print
(
-
2
,
"
\t
-C <num> : the max number of conflicts in one SAT run (0 = no limit) [default = %d]
\n
"
,
pPars
->
nBTLimit
);
Abc_Print
(
-
2
,
"
\t
-Z <num> : treat the first <num> logic nodes as fixed (0 = none) [default = %d]
\n
"
,
pPars
->
nFirstFixed
);
Abc_Print
(
-
2
,
"
\t
-d : toggle performing redundancy removal [default = %s]
\n
"
,
pPars
->
fRrOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle minimizing area or area+edges [default = %s]
\n
"
,
pPars
->
fArea
?
"area"
:
"area+edges"
);
Abc_Print
(
-
2
,
"
\t
-e : toggle high-effort resubstitution [default = %s]
\n
"
,
pPars
->
fMoreEffort
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing optimization summary [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing detailed stats for each node [default = %s]
\n
"
,
pPars
->
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-C <num> : the max number of conflicts in one SAT run (0 = no limit) [default = %d]
\n
"
,
pPars
->
nBTLimit
);
Abc_Print
(
-
2
,
"
\t
-Z <num> : treat the first <num> logic nodes as fixed (0 = none) [default = %d]
\n
"
,
pPars
->
nFirstFixed
);
Abc_Print
(
-
2
,
"
\t
-N <num> : the max number of nodes to try (0 = all) [default = %d]
\n
"
,
pPars
->
nNodesMax
);
Abc_Print
(
-
2
,
"
\t
-d : toggle performing redundancy removal [default = %s]
\n
"
,
pPars
->
fRrOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle minimizing area or area+edges [default = %s]
\n
"
,
pPars
->
fArea
?
"area"
:
"area+edges"
);
Abc_Print
(
-
2
,
"
\t
-e : toggle high-effort resubstitution [default = %s]
\n
"
,
pPars
->
fMoreEffort
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing optimization summary [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing detailed stats for each node [default = %s]
\n
"
,
pPars
->
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
src/opt/sfm/sfm.h
View file @
a4325272
...
...
@@ -48,6 +48,7 @@ struct Sfm_Par_t_
int
nWinSizeMax
;
// the maximum window size
int
nGrowthLevel
;
// the maximum allowed growth in level
int
nBTLimit
;
// the maximum number of conflicts in one SAT run
int
nNodesMax
;
// the maximum number of nodes to try
int
nFirstFixed
;
// the number of first nodes to be treated as fixed
int
fRrOnly
;
// perform redundance removal
int
fArea
;
// performs optimization for area
...
...
src/opt/sfm/sfmCore.c
View file @
a4325272
...
...
@@ -280,6 +280,8 @@ int Sfm_NtkPerform( Sfm_Ntk_t * p, Sfm_Par_t * pPars )
// break;
}
Counter
+=
(
k
>
0
);
if
(
pPars
->
nNodesMax
&&
Counter
>=
pPars
->
nNodesMax
)
break
;
}
p
->
nTotalNodesEnd
=
Vec_WecSizeUsedLimits
(
&
p
->
vFanins
,
Sfm_NtkPiNum
(
p
),
Vec_WecSize
(
&
p
->
vFanins
)
-
Sfm_NtkPoNum
(
p
)
);
p
->
nTotalEdgesEnd
=
Vec_WecSizeSize
(
&
p
->
vFanins
)
-
Sfm_NtkPoNum
(
p
);
...
...
src/opt/sfm/sfmNtk.c
View file @
a4325272
...
...
@@ -213,7 +213,7 @@ void Sfm_NtkFree( Sfm_Ntk_t * p )
{
// user data
Vec_StrFree
(
p
->
vFixed
);
Vec_StrFree
(
p
->
vEmpty
);
Vec_StrFree
P
(
&
p
->
vEmpty
);
Vec_WrdFree
(
p
->
vTruths
);
Vec_WecErase
(
&
p
->
vFanins
);
// attributes
...
...
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