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
44b31021
Commit
44b31021
authored
Feb 10, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding resource limit to 'fx'.
parent
089a8bbf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
src/base/abci/abc.c
+20
-2
src/base/cba/cbaPrsBuild.c
+3
-3
No files found.
src/base/abci/abc.c
View file @
44b31021
...
...
@@ -3756,10 +3756,11 @@ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Fxu_Data_t
Params
,
*
p
=
&
Params
;
int
c
,
fNewAlgo
=
1
;
int
nPairsLimit
=
1000000000
;
// set the defaults
Abc_NtkSetDefaultFxParams
(
p
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"SDNWMsdzcnvwh"
))
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"SDNWM
P
sdzcnvwh"
))
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -3818,6 +3819,17 @@ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
p
->
LitCountMax
<
0
)
goto
usage
;
break
;
case
'P'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-P
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nPairsLimit
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nPairsLimit
<
0
)
goto
usage
;
break
;
case
's'
:
p
->
fOnlyS
^=
1
;
break
;
...
...
@@ -3866,6 +3878,11 @@ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Fast extract can only be applied to a logic network with SOP local functions (run
\"
bdd; sop
\"
).
\n
"
);
return
1
;
}
if
(
Abc_NtkGetCubePairNum
(
pNtk
)
>
nPairsLimit
)
{
Abc_Print
(
-
1
,
"Cannot perform
\"
fx
\"
because the number cube pairs exceeds the limit (%d).
\n
"
,
nPairsLimit
);
return
1
;
}
// the nodes to be merged are linked into the special linked list
if
(
fNewAlgo
)
...
...
@@ -3876,13 +3893,14 @@ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: fx [-SDNWM <num>] [-sdzcnvwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: fx [-SDNWM
P
<num>] [-sdzcnvwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs unate fast extract on the current network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-S <num> : max number of single-cube divisors to consider [default = %d]
\n
"
,
p
->
nSingleMax
);
Abc_Print
(
-
2
,
"
\t
-D <num> : max number of double-cube divisors to consider [default = %d]
\n
"
,
p
->
nPairsMax
);
Abc_Print
(
-
2
,
"
\t
-N <num> : max number of divisors to extract during this run [default = %d]
\n
"
,
p
->
nNodesExt
);
Abc_Print
(
-
2
,
"
\t
-W <num> : lower bound on the weight of divisors to extract [default = %d]
\n
"
,
p
->
WeightMin
);
Abc_Print
(
-
2
,
"
\t
-M <num> : upper bound on literal count of divisors to extract [default = %d]
\n
"
,
p
->
LitCountMax
);
Abc_Print
(
-
2
,
"
\t
-P <num> : skip
\"
fx
\"
if cube pair count exceeds this limit [default = %d]
\n
"
,
nPairsLimit
);
Abc_Print
(
-
2
,
"
\t
-s : use only single-cube divisors [default = %s]
\n
"
,
p
->
fOnlyS
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : use only double-cube divisors [default = %s]
\n
"
,
p
->
fOnlyD
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-z : use zero-weight divisors [default = %s]
\n
"
,
p
->
fUse0
?
"yes"
:
"no"
);
src/base/cba/cbaPrsBuild.c
View file @
44b31021
...
...
@@ -153,10 +153,10 @@ void Prs_ManRemapBoxes( Cba_Man_t * pNew, Vec_Ptr_t * vDes, Prs_Ntk_t * pNtk, Ve
int
NtkId
=
Prs_BoxNtk
(
pNtk
,
iBox
);
int
NtkIdNew
=
Cba_ManNtkFindId
(
pNew
,
Prs_NtkStr
(
pNtk
,
NtkId
)
);
Prs_BoxSetNtk
(
pNtk
,
iBox
,
NtkIdNew
);
if
(
NtkId
<
Cba_ManNtkNum
(
pNew
)
)
if
(
NtkId
New
<
Cba_ManNtkNum
(
pNew
)
)
Prs_ManRemapOne
(
vSigs
,
Prs_ManNtk
(
vDes
,
NtkIdNew
),
vMap
);
else
Prs_ManRemapGate
(
vSigs
);
//
else
//
Prs_ManRemapGate( vSigs );
}
}
void
Prs_ManCleanMap
(
Prs_Ntk_t
*
pNtk
,
Vec_Int_t
*
vMap
)
...
...
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