diff options
-rw-r--r-- | src/base/abci/abc.c | 16 | ||||
-rw-r--r-- | src/map/amap/amap.h | 1 | ||||
-rw-r--r-- | src/map/amap/amapCore.c | 1 | ||||
-rw-r--r-- | src/map/amap/amapMerge.c | 6 |
4 files changed, 19 insertions, 5 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 96fbd101..de32646c 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -14063,7 +14063,7 @@ int Abc_CommandAmap( Abc_Frame_t * pAbc, int argc, char ** argv ) fSweep = 0; Amap_ManSetDefaultParams( pPars ); Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "FAEQmxisvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "FACEQmxisvh" ) ) != EOF ) { switch ( c ) { @@ -14089,6 +14089,17 @@ int Abc_CommandAmap( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( pPars->nIterArea < 0 ) 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; + } + pPars->nCutsMax = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( pPars->nCutsMax < 0 ) + goto usage; + break; case 'E': if ( globalUtilOptind >= argc ) { @@ -14190,10 +14201,11 @@ int Abc_CommandAmap( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - Abc_Print( -2, "usage: amap [-FA <num>] [-EQ <float>] [-mxisvh]\n" ); + Abc_Print( -2, "usage: amap [-FAC <num>] [-EQ <float>] [-mxisvh]\n" ); Abc_Print( -2, "\t performs standard cell mapping of the current network\n" ); Abc_Print( -2, "\t-F num : the number of iterations of area flow [default = %d]\n", pPars->nIterFlow ); Abc_Print( -2, "\t-A num : the number of iterations of exact area [default = %d]\n", pPars->nIterArea ); + Abc_Print( -2, "\t-C num : the maximum number of cuts at a node [default = %d]\n", pPars->nCutsMax ); Abc_Print( -2, "\t-E float : sets epsilon used for tie-breaking [default = %f]\n", pPars->fEpsilon ); Abc_Print( -2, "\t-Q float : area/delay preference ratio [default = %.2f (area-only)] \n", pPars->fADratio ); Abc_Print( -2, "\t-m : toggles using MUX matching [default = %s]\n", pPars->fUseMuxes? "yes": "no" ); diff --git a/src/map/amap/amap.h b/src/map/amap/amap.h index c897331c..7ea9d802 100644 --- a/src/map/amap/amap.h +++ b/src/map/amap/amap.h @@ -46,6 +46,7 @@ struct Amap_Par_t_ { int nIterFlow; // iterations of area flow int nIterArea; // iteratoins of exact area + int nCutsMax; // the maximum number of cuts at a node int fUseMuxes; // enables the use of MUXes int fUseXors; // enables the use of XORs int fFreeInvs; // assume inverters are free (area = 0) diff --git a/src/map/amap/amapCore.c b/src/map/amap/amapCore.c index 5a84669c..b1c9242b 100644 --- a/src/map/amap/amapCore.c +++ b/src/map/amap/amapCore.c @@ -48,6 +48,7 @@ void Amap_ManSetDefaultParams( Amap_Par_t * p ) memset( p, 0, sizeof(Amap_Par_t) ); p->nIterFlow = 1; // iterations of area flow p->nIterArea = 4; // iteratoins of exact area + p->nCutsMax = 500; // the maximum number of cuts at a node p->fUseMuxes = 0; // enables the use of MUXes p->fUseXors = 1; // enables the use of XORs p->fFreeInvs = 0; // assume inverters are free (area = 0) diff --git a/src/map/amap/amapMerge.c b/src/map/amap/amapMerge.c index 4b91f7ca..9b2977fa 100644 --- a/src/map/amap/amapMerge.c +++ b/src/map/amap/amapMerge.c @@ -173,7 +173,7 @@ Amap_Cut_t * Amap_ManCutCreate3( Amap_Man_t * p, ***********************************************************************/ void Amap_ManCutSaveStored( Amap_Man_t * p, Amap_Obj_t * pNode ) { - int nMaxCuts = 500; + int nMaxCuts = p->pPars->nCutsMax; int * pBuffer; Amap_Cut_t * pNext, * pCut; int i, nWords, Entry, nCuts, nCuts2; @@ -522,8 +522,8 @@ void Amap_ManMerge( Amap_Man_t * p ) if ( p->pPars->fVerbose ) { printf( "AIG object is %d bytes. ", (int)sizeof(Amap_Obj_t) ); - printf( "Internal AIG = %5.2f MB. Cuts = %5.2f MB.\n", - 1.0*Amap_ManObjNum(p)*sizeof(Amap_Obj_t)/(1<<20), 1.0*p->nBytesUsed/(1<<20) ); + printf( "Internal AIG = %5.2f MB. Cuts = %5.2f MB. CutsMax = %d.\n", + 1.0*Amap_ManObjNum(p)*sizeof(Amap_Obj_t)/(1<<20), 1.0*p->nBytesUsed/(1<<20), p->pPars->nCutsMax ); printf( "Node =%6d. Try =%9d. Try3 =%10d. Used =%7d. R =%6.2f. ", Amap_ManNodeNum(p), p->nCutsTried, p->nCutsTried3, p->nCutsUsed, 1.0*p->nCutsUsed/Amap_ManNodeNum(p) ); |