diff options
Diffstat (limited to 'src/base/abci/abc.c')
-rw-r--r-- | src/base/abci/abc.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index c51c53c5..4493c361 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -3582,14 +3582,14 @@ usage: ***********************************************************************/ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv ) { - extern int Abc_NtkFxPerform( Abc_Ntk_t * pNtk, int nNewNodesMax, int fVerbose ); + extern int Abc_NtkFxPerform( Abc_Ntk_t * pNtk, int nNewNodesMax, int nLitCountMax, int fVerbose ); Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc); Fxu_Data_t Params, * p = &Params; int c, fNewAlgo = 1; // set the defaults Abc_NtkSetDefaultParams( p ); Extra_UtilGetoptReset(); - while ( (c = Extra_UtilGetopt(argc, argv, "SDNWsdzcnvh")) != EOF ) + while ( (c = Extra_UtilGetopt(argc, argv, "SDNWMsdzcnvh")) != EOF ) { switch (c) { @@ -3632,9 +3632,20 @@ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Command line switch \"-W\" should be followed by an integer.\n" ); goto usage; } - p->WeightMax = atoi(argv[globalUtilOptind]); + p->WeightMin = atoi(argv[globalUtilOptind]); globalUtilOptind++; - if ( p->WeightMax < 0 ) + if ( p->WeightMin < 0 ) + goto usage; + break; + case 'M': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-M\" should be followed by an integer.\n" ); + goto usage; + } + p->LitCountMax = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( p->LitCountMax < 0 ) goto usage; break; case 's': @@ -3685,19 +3696,20 @@ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv ) // the nodes to be merged are linked into the special linked list if ( fNewAlgo ) - Abc_NtkFxPerform( pNtk, p->nNodesExt, p->fVerbose ); + Abc_NtkFxPerform( pNtk, p->nNodesExt, p->LitCountMax, p->fVerbose ); else Abc_NtkFastExtract( pNtk, p ); Abc_NtkFxuFreeInfo( p ); return 0; usage: - Abc_Print( -2, "usage: fx [-SDNW <num>] [-sdzcnvh]\n"); + Abc_Print( -2, "usage: fx [-SDNWM <num>] [-sdzcnvh]\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> : only extract divisors with weight more than this [default = %d]\n", p->WeightMax ); + 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-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" ); |