diff options
Diffstat (limited to 'src/map')
-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 |
3 files changed, 9 insertions, 13 deletions
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)) ); |