diff options
-rw-r--r-- | src/base/abci/abc.c | 2 | ||||
-rw-r--r-- | src/base/abci/abcMap.c | 3 | ||||
-rw-r--r-- | src/map/scl/scl.c | 2 | ||||
-rw-r--r-- | src/map/scl/sclBufSize.c | 18 | ||||
-rw-r--r-- | src/map/scl/sclSize.h | 2 | ||||
-rw-r--r-- | src/misc/extra/extra.h | 1 | ||||
-rw-r--r-- | src/misc/extra/extraUtilFile.c | 20 |
7 files changed, 34 insertions, 14 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index c9159d3f..6400cfd6 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -14474,7 +14474,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv ) double DelayMulti; float LogFan = 0; float Slew = 0; // choose based on the library - float Gain = 200; + float Gain = 250; int nGatesMin = 4; int fAreaOnly; int fRecovery; diff --git a/src/base/abci/abcMap.c b/src/base/abci/abcMap.c index 880fb309..b04a7076 100644 --- a/src/base/abci/abcMap.c +++ b/src/base/abci/abcMap.c @@ -76,6 +76,9 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti, pLib = Abc_SclDeriveGenlib( Abc_FrameReadLibScl(), Slew, Gain, nGatesMin, fVerbose ); if ( Abc_FrameReadLibGen() ) Mio_LibraryTransferDelays( (Mio_Library_t *)Abc_FrameReadLibGen(), pLib ); + // remove supergate library + Map_SuperLibFree( (Map_SuperLib_t *)Abc_FrameReadLibSuper() ); + Abc_FrameSetLibSuper( NULL ); } // quit if there is no library if ( pLib == NULL ) diff --git a/src/map/scl/scl.c b/src/map/scl/scl.c index 36bec7b4..b3175dbb 100644 --- a/src/map/scl/scl.c +++ b/src/map/scl/scl.c @@ -871,7 +871,7 @@ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Ntk_t * pNtkRes, * pNtk = Abc_FrameReadNtk(pAbc); int c; memset( pPars, 0, sizeof(SC_BusPars) ); - pPars->GainRatio = 250; + pPars->GainRatio = 300; pPars->Slew = pAbc->pLibScl ? Abc_SclComputeAverageSlew((SC_Lib *)pAbc->pLibScl) : 100; pPars->nDegree = 10; pPars->fSizeOnly = 0; diff --git a/src/map/scl/sclBufSize.c b/src/map/scl/sclBufSize.c index 41db0f5a..45819626 100644 --- a/src/map/scl/sclBufSize.c +++ b/src/map/scl/sclBufSize.c @@ -384,16 +384,15 @@ Abc_Obj_t * Abc_SclAddOneInv( Bus_Man_t * p, Abc_Obj_t * pObj, Vec_Ptr_t * vFano Abc_NodeInvUpdateFanPolarity( pInv ); return pInv; } -void Abc_SclBufSize( Bus_Man_t * p ) +void Abc_SclBufSize( Bus_Man_t * p, float Gain ) { SC_Cell * pCell, * pCellNew; Abc_Obj_t * pObj, * pFanout; abctime clk = Abc_Clock(); - int nObjsOld = Abc_NtkObjNumMax(p->pNtk); - float GainInv = 0.01 * p->pPars->GainRatio; - float GainGate = (float)1.0 * GainInv; - float Load, LoadNew, Cin, DeptMax = 0; - int i, k, nObjOld = Abc_NtkObjNumMax(p->pNtk); + int i, k, nObjsOld = Abc_NtkObjNumMax(p->pNtk); + float GainGate, GainInv, Load, LoadNew, Cin, DeptMax = 0; + GainGate = p->pPars->fAddBufs ? pow( Gain, 2.0 ) : Gain; + GainInv = p->pPars->fAddBufs ? pow( Gain, 2.0 ) : Gain; Abc_NtkForEachObjReverse( p->pNtk, pObj, i ) { if ( !((Abc_ObjIsNode(pObj) && Abc_ObjFaninNum(pObj) > 0) || (Abc_ObjIsCi(pObj) && p->pPiDrive)) ) @@ -473,7 +472,7 @@ void Abc_SclBufSize( Bus_Man_t * p ) { printf( "WireLoads = %d Degree = %d Target slew =%4d ps Gain2 =%5d Buf = %6d Delay =%7.0f ps ", p->pPars->fUseWireLoads, p->pPars->nDegree, p->pPars->Slew, p->pPars->GainRatio, - Abc_NtkObjNumMax(p->pNtk) - nObjOld, DeptMax ); + Abc_NtkObjNumMax(p->pNtk) - nObjsOld, DeptMax ); Abc_PrintTime( 1, "Time", Abc_Clock() - clk ); } } @@ -483,14 +482,11 @@ Abc_Ntk_t * Abc_SclBufferingPerform( Abc_Ntk_t * pNtk, SC_Lib * pLib, SC_BusPars Bus_Man_t * p; if ( !Abc_SclCheckNtk( pNtk, 0 ) ) return NULL; - // update gain if buffers are used - if ( pPars->fAddBufs ) - pPars->GainRatio = pPars->GainRatio * pPars->GainRatio / 100; Abc_SclReportDupFanins( pNtk ); Abc_SclMioGates2SclGates( pLib, pNtk ); p = Bus_ManStart( pNtk, pLib, pPars ); Bus_ManReadInOutLoads( p ); - Abc_SclBufSize( p ); + Abc_SclBufSize( p, 0.01 * pPars->GainRatio ); Bus_ManStop( p ); Abc_SclSclGates2MioGates( pLib, pNtk ); if ( pNtk->vPhases ) diff --git a/src/map/scl/sclSize.h b/src/map/scl/sclSize.h index 2e5beaaa..02a1b74c 100644 --- a/src/map/scl/sclSize.h +++ b/src/map/scl/sclSize.h @@ -517,7 +517,7 @@ static inline void Abc_SclDumpStats( SC_Man * p, char * pFileName, abctime Time { sprintf( FileNameOld, "%s", p->pNtk->pName ); fprintf( pTable, "\n" ); - fprintf( pTable, "%s ", p->pNtk->pName ); + fprintf( pTable, "%s ", Extra_FileNameWithoutPath(p->pNtk->pName) ); fprintf( pTable, "%d ", Abc_NtkPiNum(p->pNtk) ); fprintf( pTable, "%d ", Abc_NtkPoNum(p->pNtk) ); fprintf( pTable, "%d ", (nNodesOld = Abc_NtkNodeNum(p->pNtk)) ); diff --git a/src/misc/extra/extra.h b/src/misc/extra/extra.h index 982a6f5e..c0a7be95 100644 --- a/src/misc/extra/extra.h +++ b/src/misc/extra/extra.h @@ -103,6 +103,7 @@ extern char * Extra_FileNameExtension( char * FileName ); extern char * Extra_FileNameAppend( char * pBase, char * pSuffix ); extern char * Extra_FileNameGeneric( char * FileName ); extern char * Extra_FileNameGenericAppend( char * pBase, char * pSuffix ); +extern char * Extra_FileNameWithoutPath( char * FileName ); extern int Extra_FileCheck( char * pFileName ); extern int Extra_FileSize( char * pFileName ); extern char * Extra_FileRead( FILE * pFile ); diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c index d514f862..18a7f42c 100644 --- a/src/misc/extra/extraUtilFile.c +++ b/src/misc/extra/extraUtilFile.c @@ -196,6 +196,26 @@ char * Extra_FileNameGenericAppend( char * pBase, char * pSuffix ) /**Function************************************************************* + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +char * Extra_FileNameWithoutPath( char * FileName ) +{ + char * pRes; + for ( pRes = FileName + strlen(FileName) - 1; pRes >= FileName; pRes-- ) + if ( *pRes == '\\' || *pRes == '/' ) + return pRes + 1; + return FileName; +} + +/**Function************************************************************* + Synopsis [Returns the file size.] Description [The file should be closed.] |