diff options
| author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-10-02 13:17:53 -0700 | 
|---|---|---|
| committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-10-02 13:17:53 -0700 | 
| commit | 889b329d01f2e00012e735ca0356fecd0ac79fc9 (patch) | |
| tree | 986c2c11bd0c5bfc9e90caf44ee84f5cd24b4468 /src | |
| parent | 6d94b6b1a298b93f3484017bf6a134735cd2bf56 (diff) | |
| download | abc-889b329d01f2e00012e735ca0356fecd0ac79fc9.tar.gz abc-889b329d01f2e00012e735ca0356fecd0ac79fc9.tar.bz2 abc-889b329d01f2e00012e735ca0356fecd0ac79fc9.zip  | |
Adding switch -R to 'if'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/base/abci/abc.c | 66 | 
1 files changed, 39 insertions, 27 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index de42f694..c1865128 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -15132,7 +15132,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )      If_ManSetDefaultPars( pPars );      pPars->pLutLib = (If_LibLut_t *)Abc_FrameReadLibLut();      Extra_UtilGetoptReset(); -    while ( ( c = Extra_UtilGetopt( argc, argv, "KCFAGNDEWSTqaflepmrsdbgxyojiktncvh" ) ) != EOF ) +    while ( ( c = Extra_UtilGetopt( argc, argv, "KCFAGRNTDEWSqaflepmrsdbgxyojiktncvh" ) ) != EOF )      {          switch ( c )          { @@ -15193,6 +15193,17 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )              if ( pPars->nGateSize < 2 )                  goto usage;              break; +        case 'R': +            if ( globalUtilOptind >= argc ) +            { +                Abc_Print( 1, "Command line switch \"-R\" should be followed by a floating point number.\n" ); +                return 0; +            } +            pPars->nRelaxRatio = atoi(argv[globalUtilOptind]); +            globalUtilOptind++; +            if ( pPars->nRelaxRatio < 0 )  +                goto usage; +            break;          case 'N':              if ( globalUtilOptind >= argc )              { @@ -15204,6 +15215,17 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )              if ( pPars->nNonDecLimit < 2 )                  goto usage;              break; +        case 'T': +            if ( globalUtilOptind >= argc ) +            { +                Abc_Print( -1, "Command line switch \"-T\" should be followed by a positive integer 0,1,or 2.\n" ); +                goto usage; +            } +            pPars->nStructType = atoi(argv[globalUtilOptind]); +            globalUtilOptind++; +            if ( pPars->nStructType < 0 || pPars->nStructType > 2 ) +                goto usage; +            break;          case 'D':              if ( globalUtilOptind >= argc )              { @@ -15251,17 +15273,6 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )                  goto usage;              }              break; -        case 'T': -            if ( globalUtilOptind >= argc ) -            { -                Abc_Print( -1, "Command line switch \"-T\" should be followed by a positive integer 0,1,or 2.\n" ); -                goto usage; -            } -            pPars->nStructType = atoi(argv[globalUtilOptind]); -            globalUtilOptind++; -            if ( pPars->nStructType < 0 || pPars->nStructType > 2 ) -                goto usage; -            break;          case 'q':              pPars->fPreprocess ^= 1;              break; @@ -15583,19 +15594,20 @@ usage:          sprintf(LutSize, "library" );      else          sprintf(LutSize, "%d", pPars->nLutSize ); -    Abc_Print( -2, "usage: if [-KCFANGT num] [-DEW float] [-S str] [-qarlepmsdbgxyojiktncvh]\n" ); +    Abc_Print( -2, "usage: if [-KCFAGRNT num] [-DEW float] [-S str] [-qarlepmsdbgxyojiktncvh]\n" );      Abc_Print( -2, "\t           performs FPGA technology mapping of the network\n" );      Abc_Print( -2, "\t-K num   : the number of LUT inputs (2 < num < %d) [default = %s]\n", IF_MAX_LUTSIZE+1, LutSize );      Abc_Print( -2, "\t-C num   : the max number of priority cuts (0 < num < 2^12) [default = %d]\n", pPars->nCutsMax );      Abc_Print( -2, "\t-F num   : the number of area flow recovery iterations (num >= 0) [default = %d]\n", pPars->nFlowIters );      Abc_Print( -2, "\t-A num   : the number of exact area recovery iterations (num >= 0) [default = %d]\n", pPars->nAreaIters ); -    Abc_Print( -2, "\t-N num   : the max size of non-decomposable nodes [default = unused]\n", pPars->nNonDecLimit );      Abc_Print( -2, "\t-G num   : the max AND/OR gate size for mapping (0 = unused) [default = %d]\n", pPars->nGateSize ); +    Abc_Print( -2, "\t-R num   : the delay relaxation ratio (num >= 0) [default = %d]\n", pPars->nRelaxRatio ); +    Abc_Print( -2, "\t-N num   : the max size of non-decomposable nodes [default = unused]\n", pPars->nNonDecLimit ); +    Abc_Print( -2, "\t-T num   : the type of LUT structures [default = any]\n", pPars->nStructType );      Abc_Print( -2, "\t-D float : sets the delay constraint for the mapping [default = %s]\n", Buffer );      Abc_Print( -2, "\t-E float : sets epsilon used for tie-breaking [default = %f]\n", pPars->Epsilon );      Abc_Print( -2, "\t-W float : sets wire delay between adjects LUTs [default = %f]\n", pPars->WireDelay );      Abc_Print( -2, "\t-S str   : string representing the LUT structure [default = %s]\n", pPars->pLutStruct ? pPars->pLutStruct : "not used" ); -    Abc_Print( -2, "\t-T num   : the type of LUT structures [default = any]\n", pPars->nStructType );      Abc_Print( -2, "\t-q       : toggles preprocessing using several starting points [default = %s]\n", pPars->fPreprocess? "yes": "no" );      Abc_Print( -2, "\t-a       : toggles area-oriented mapping [default = %s]\n", pPars->fArea? "yes": "no" );      Abc_Print( -2, "\t-r       : enables expansion/reduction of the best cuts [default = %s]\n", pPars->fExpRed? "yes": "no" ); @@ -31174,6 +31186,17 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )              if ( pPars->nRelaxRatio < 0 )                   goto usage;              break; +        case 'T': +            if ( globalUtilOptind >= argc ) +            { +                Abc_Print( -1, "Command line switch \"-T\" should be followed by a positive integer 0,1,or 2.\n" ); +                goto usage; +            } +            pPars->nStructType = atoi(argv[globalUtilOptind]); +            globalUtilOptind++; +            if ( pPars->nStructType < 0 || pPars->nStructType > 2 ) +                goto usage; +            break;          case 'D':              if ( globalUtilOptind >= argc )              { @@ -31221,17 +31244,6 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )                  goto usage;              }              break; -        case 'T': -            if ( globalUtilOptind >= argc ) -            { -                Abc_Print( -1, "Command line switch \"-T\" should be followed by a positive integer 0,1,or 2.\n" ); -                goto usage; -            } -            pPars->nStructType = atoi(argv[globalUtilOptind]); -            globalUtilOptind++; -            if ( pPars->nStructType < 0 || pPars->nStructType > 2 ) -                goto usage; -            break;          case 'q':              pPars->fPreprocess ^= 1;              break; @@ -31564,11 +31576,11 @@ usage:      Abc_Print( -2, "\t-A num   : the number of exact area recovery iterations (num >= 0) [default = %d]\n", pPars->nAreaIters );      Abc_Print( -2, "\t-G num   : the max AND/OR gate size for mapping (0 = unused) [default = %d]\n", pPars->nGateSize );      Abc_Print( -2, "\t-R num   : the delay relaxation ratio (num >= 0) [default = %d]\n", pPars->nRelaxRatio ); +    Abc_Print( -2, "\t-T num   : the type of LUT structures [default = any]\n", pPars->nStructType );      Abc_Print( -2, "\t-D float : sets the delay constraint for the mapping [default = %s]\n", Buffer );      Abc_Print( -2, "\t-E float : sets epsilon used for tie-breaking [default = %f]\n", pPars->Epsilon );      Abc_Print( -2, "\t-W float : sets wire delay between adjects LUTs [default = %f]\n", pPars->WireDelay );      Abc_Print( -2, "\t-S str   : string representing the LUT structure [default = %s]\n", pPars->pLutStruct ? pPars->pLutStruct : "not used" ); -    Abc_Print( -2, "\t-T num   : the type of LUT structures [default = any]\n", pPars->nStructType );      Abc_Print( -2, "\t-q       : toggles preprocessing using several starting points [default = %s]\n", pPars->fPreprocess? "yes": "no" );      Abc_Print( -2, "\t-a       : toggles area-oriented mapping [default = %s]\n", pPars->fArea? "yes": "no" );      Abc_Print( -2, "\t-r       : enables expansion/reduction of the best cuts [default = %s]\n", pPars->fExpRed? "yes": "no" );  | 
