diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-01-29 09:08:54 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-01-29 09:08:54 -0800 |
commit | f16012bc28d05e62ef660500ca764c2a1ad5c633 (patch) | |
tree | b81f9f9a9dbef117bcce33fb6a3ab0fb4b809f37 | |
parent | 0699c43ac5422be567a5e106d2e64dabf68db4b4 (diff) | |
download | abc-f16012bc28d05e62ef660500ca764c2a1ad5c633.tar.gz abc-f16012bc28d05e62ef660500ca764c2a1ad5c633.tar.bz2 abc-f16012bc28d05e62ef660500ca764c2a1ad5c633.zip |
Adding new switch to simulation.
-rw-r--r-- | src/base/abci/abc.c | 21 | ||||
-rw-r--r-- | src/misc/extra/extraUtilCfs.c | 2 |
2 files changed, 18 insertions, 5 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 974cf0f4..dde880c9 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -45559,17 +45559,29 @@ usage: ***********************************************************************/ int Abc_CommandAbc9Cfs( Abc_Frame_t * pAbc, int argc, char ** argv ) { - extern void Extra_CommandCfs( Gia_Man_t * pGia, int Limit, int Reps, int UnseenUse, int RareUse, int fVerbose ); + extern void Extra_CommandCfs( Gia_Man_t * pGia, int Multi, int Limit, int Reps, int UnseenUse, int RareUse, int fVerbose ); + int Multi = 0; int Limit = 0; int Reps = 1; int UnseenUse = 2; int RareUse = 2; int c, fVerbose = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "LNURvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "MLNURvh" ) ) != EOF ) { switch ( c ) { + case 'M': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-M\" should be followed by an integer.\n" ); + goto usage; + } + Multi = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( Multi < 0 ) + goto usage; + break; case 'L': if ( globalUtilOptind >= argc ) { @@ -45628,12 +45640,13 @@ int Abc_CommandAbc9Cfs( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Abc_CommandAbc9Cfs(): There is no AIG.\n" ); return 1; } - Extra_CommandCfs( pAbc->pGia, Limit, Reps, UnseenUse, RareUse, fVerbose ); + Extra_CommandCfs( pAbc->pGia, Multi, Limit, Reps, UnseenUse, RareUse, fVerbose ); return 0; usage: - Abc_Print( -2, "usage: &cfs [-LNURvh]\n" ); + Abc_Print( -2, "usage: &cfs [-MLNURvh]\n" ); Abc_Print( -2, "\t performs simulation\n" ); + Abc_Print( -2, "\t-M num : the multiplier type (1=array, 2=booth) [default = %d]\n", Multi ); Abc_Print( -2, "\t-L num : the limit on the number of occurrences [default = %d]\n", Limit ); Abc_Print( -2, "\t-N num : the number of repetions of each pattern [default = %d]\n", Reps ); Abc_Print( -2, "\t-U num : what to do with unseen patterns [default = %d]\n", UnseenUse ); diff --git a/src/misc/extra/extraUtilCfs.c b/src/misc/extra/extraUtilCfs.c index b21dc445..66225e05 100644 --- a/src/misc/extra/extraUtilCfs.c +++ b/src/misc/extra/extraUtilCfs.c @@ -48,7 +48,7 @@ ABC_NAMESPACE_IMPL_START SeeAlso [] ***********************************************************************/ -void Extra_CommandCfs( Gia_Man_t * pGia, int Limit, int Reps, int UnseenUse, int RareUse, int fVerbose ) +void Extra_CommandCfs( Gia_Man_t * pGia, int Multi, int Limit, int Reps, int UnseenUse, int RareUse, int fVerbose ) { } |