diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abci/abc.c | 23 | ||||
-rw-r--r-- | src/base/abci/abcMap.c | 4 |
2 files changed, 21 insertions, 6 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index ae7c78e5..edf4af1b 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -14391,6 +14391,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) double DelayTarget; double AreaMulti; double DelayMulti; + float LogFan = 0; float Slew = 200; float Gain = 100; int nGatesMin = 4; @@ -14400,7 +14401,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) int fSwitching; int fVerbose; int c; - extern Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti, double DelayMulti, float Slew, float Gain, int nGatesMin, int fRecovery, int fSwitching, int fVerbose ); + extern Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti, double DelayMulti, float LogFan, float Slew, float Gain, int nGatesMin, int fRecovery, int fSwitching, int fVerbose ); extern int Abc_NtkFraigSweep( Abc_Ntk_t * pNtk, int fUseInv, int fExdc, int fVerbose, int fVeryVerbose ); pNtk = Abc_FrameReadNtk(pAbc); @@ -14414,7 +14415,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) fSwitching = 0; fVerbose = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "DABSGMarspvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "DABFSGMarspvh" ) ) != EOF ) { switch ( c ) { @@ -14447,6 +14448,17 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) DelayMulti = (float)atof(argv[globalUtilOptind]); globalUtilOptind++; break; + case 'F': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-F\" should be followed by a floating point number.\n" ); + goto usage; + } + LogFan = (float)atof(argv[globalUtilOptind]); + globalUtilOptind++; + if ( LogFan < 0.0 ) + goto usage; + break; case 'S': if ( globalUtilOptind >= argc ) { @@ -14528,7 +14540,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) } Abc_Print( 0, "The network was strashed and balanced before mapping.\n" ); // get the new network - pNtkRes = Abc_NtkMap( pNtk, DelayTarget, AreaMulti, DelayMulti, Slew, Gain, nGatesMin, fRecovery, fSwitching, fVerbose ); + pNtkRes = Abc_NtkMap( pNtk, DelayTarget, AreaMulti, DelayMulti, LogFan, Slew, Gain, nGatesMin, fRecovery, fSwitching, fVerbose ); if ( pNtkRes == NULL ) { Abc_NtkDelete( pNtk ); @@ -14540,7 +14552,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) else { // get the new network - pNtkRes = Abc_NtkMap( pNtk, DelayTarget, AreaMulti, DelayMulti, Slew, Gain, nGatesMin, fRecovery, fSwitching, fVerbose ); + pNtkRes = Abc_NtkMap( pNtk, DelayTarget, AreaMulti, DelayMulti, LogFan, Slew, Gain, nGatesMin, fRecovery, fSwitching, fVerbose ); if ( pNtkRes == NULL ) { Abc_Print( -1, "Mapping has failed.\n" ); @@ -14567,11 +14579,12 @@ usage: sprintf(Buffer, "not used" ); else sprintf(Buffer, "%.3f", DelayTarget ); - Abc_Print( -2, "usage: map [-DABSG float] [-M num] [-arspvh]\n" ); + Abc_Print( -2, "usage: map [-DABFSG float] [-M num] [-arspvh]\n" ); Abc_Print( -2, "\t performs standard cell mapping of the current network\n" ); Abc_Print( -2, "\t-D float : sets the global required times [default = %s]\n", Buffer ); Abc_Print( -2, "\t-A float : \"area multiplier\" to bias gate selection [default = %.2f]\n", AreaMulti ); Abc_Print( -2, "\t-B float : \"delay multiplier\" to bias gate selection [default = %.2f]\n", DelayMulti ); + Abc_Print( -2, "\t-F float : the logarithmic fanout delay parameter [default = %.2f]\n", LogFan ); Abc_Print( -2, "\t-S float : the slew parameter used to generate the library [default = %.2f]\n", Slew ); Abc_Print( -2, "\t-G float : the gain parameter used to generate the library [default = %.2f]\n", Gain ); Abc_Print( -2, "\t-M num : skip gate classes whose size is less than this [default = %d]\n", nGatesMin ); diff --git a/src/base/abci/abcMap.c b/src/base/abci/abcMap.c index 5a2295f7..f314ee25 100644 --- a/src/base/abci/abcMap.c +++ b/src/base/abci/abcMap.c @@ -57,7 +57,7 @@ static Abc_Obj_t * Abc_NodeFromMapSuperChoice_rec( Abc_Ntk_t * pNtkNew, Map_Sup SeeAlso [] ***********************************************************************/ -Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti, double DelayMulti, float Slew, float Gain, int nGatesMin, int fRecovery, int fSwitching, int fVerbose ) +Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti, double DelayMulti, float LogFan, float Slew, float Gain, int nGatesMin, int fRecovery, int fSwitching, int fVerbose ) { static int fUseMulti = 0; int fShowSwitching = 1; @@ -125,6 +125,8 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti, return NULL; clk = Abc_Clock(); Map_ManSetSwitching( pMan, fSwitching ); + if ( LogFan != 0 ) + Map_ManCreateNodeDelays( pMan, LogFan ); if ( !Map_Mapping( pMan ) ) { Map_ManFree( pMan ); |