diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-09-17 18:58:20 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-09-17 18:58:20 -0700 |
commit | 023e92c4700283d4de6e60c5b5054c2d2452b98f (patch) | |
tree | b323c355a95384893ec038af9dcec9f50eff6db2 /src/base | |
parent | 69827a5a8848ada3ef70bcf25f4f523aed97bded (diff) | |
download | abc-023e92c4700283d4de6e60c5b5054c2d2452b98f.tar.gz abc-023e92c4700283d4de6e60c5b5054c2d2452b98f.tar.bz2 abc-023e92c4700283d4de6e60c5b5054c2d2452b98f.zip |
Improvements to Boolean matching.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abci/abc.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index dad29ae5..091b3b88 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -16042,9 +16042,11 @@ usage: ***********************************************************************/ int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv ) { - int c, fVerbose = 0, fFast = 0, fAdd = 0, fSpec = 0, LutSize = 0; + char * pStruct = NULL; + int c, fVerbose = 0, fFast = 0, fAdd = 0, fSpec = 0, LutSize = 0, nConfls = 10000; + If_DsdMan_t * pDsdMan = (If_DsdMan_t *)Abc_FrameReadManDsd(); Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "Kfasvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "KCSfasvh" ) ) != EOF ) { switch ( c ) { @@ -16059,6 +16061,24 @@ int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( LutSize < 4 || LutSize > 6 ) goto usage; break; + case 'C': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-C\" should be followed by a floating point number.\n" ); + goto usage; + } + nConfls = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + break; + case 'S': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-S\" should be followed by string.\n" ); + goto usage; + } + pStruct = argv[globalUtilOptind]; + globalUtilOptind++; + break; case 'f': fFast ^= 1; break; @@ -16082,17 +16102,22 @@ int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( 1, "The DSD manager is not started.\n" ); return 0; } - If_DsdManTune( (If_DsdMan_t *)Abc_FrameReadManDsd(), LutSize, fFast, fAdd, fSpec, fVerbose ); + if ( pStruct ) + Id_DsdManTuneStr( pDsdMan, pStruct, nConfls, fVerbose ); + else + If_DsdManTune( pDsdMan, LutSize, fFast, fAdd, fSpec, fVerbose ); return 0; usage: - Abc_Print( -2, "usage: dsd_tune [-K num] [-fasvh]\n" ); + Abc_Print( -2, "usage: dsd_tune [-KC num] [-fasvh] [-S str]\n" ); Abc_Print( -2, "\t tunes DSD manager for the given LUT size\n" ); Abc_Print( -2, "\t-K num : LUT size used for tuning [default = %d]\n", LutSize ); + Abc_Print( -2, "\t-C num : the maximum number of conflicts [default = %d]\n", nConfls ); Abc_Print( -2, "\t-f : toggles using fast check [default = %s]\n", fFast? "yes": "no" ); Abc_Print( -2, "\t-a : toggles adding tuning to the current one [default = %s]\n", fAdd? "yes": "no" ); Abc_Print( -2, "\t-s : toggles using specialized check [default = %s]\n", fSpec? "yes": "no" ); Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", fVerbose? "yes": "no" ); + Abc_Print( -2, "\t-S str : string representing programmable cell [default = %s]\n", pStruct ? pStruct : "not used" ); Abc_Print( -2, "\t-h : print the command usage\n"); return 1; } |