diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-10-13 23:08:52 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-10-13 23:08:52 -0700 |
commit | 1692c1a57a74938a396812375f29f0065b5337b7 (patch) | |
tree | 8eee10f90bef82325f134dbaadf86d158b92de21 /src/map/scl/sclBufSize.c | |
parent | a4f80c1d36ee2ea986ac3fd637aa91f97537cdb6 (diff) | |
download | abc-1692c1a57a74938a396812375f29f0065b5337b7.tar.gz abc-1692c1a57a74938a396812375f29f0065b5337b7.tar.bz2 abc-1692c1a57a74938a396812375f29f0065b5337b7.zip |
Improvements to buffering and sizing.
Diffstat (limited to 'src/map/scl/sclBufSize.c')
-rw-r--r-- | src/map/scl/sclBufSize.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/map/scl/sclBufSize.c b/src/map/scl/sclBufSize.c index 00601dd5..aca87673 100644 --- a/src/map/scl/sclBufSize.c +++ b/src/map/scl/sclBufSize.c @@ -394,7 +394,6 @@ void Abc_SclBufSize( Bus_Man_t * p ) float GainGate = (float)1.0 * GainInv; float Load, LoadNew, Cin, DeptMax = 0; int i, k, nObjOld = Abc_NtkObjNumMax(p->pNtk); - Abc_SclMioGates2SclGates( p->pLib, p->pNtk ); Abc_NtkForEachObjReverse( p->pNtk, pObj, i ) { if ( !((Abc_ObjIsNode(pObj) && Abc_ObjFaninNum(pObj) > 0) || (Abc_ObjIsCi(pObj) && p->pPiDrive)) ) @@ -470,26 +469,30 @@ void Abc_SclBufSize( Bus_Man_t * p ) } DeptMax = Abc_MaxFloat( DeptMax, DeptCur ); } - Abc_SclSclGates2MioGates( p->pLib, p->pNtk ); if ( p->pPars->fVerbose ) { - printf( "WireLoads = %d. Degree = %d. Target gain =%5d Slew =%5d Buf = %6d Delay =%7.0f ps ", - p->pPars->fUseWireLoads, p->pPars->nDegree, p->pPars->GainRatio, p->pPars->Slew, + 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_PrintTime( 1, "Time", Abc_Clock() - clk ); } } -Abc_Ntk_t * Abc_SclBufSizePerform( Abc_Ntk_t * pNtk, SC_Lib * pLib, SC_BusPars * pPars ) +Abc_Ntk_t * Abc_SclBufferingPerform( Abc_Ntk_t * pNtk, SC_Lib * pLib, SC_BusPars * pPars ) { Abc_Ntk_t * pNtkNew; 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 ); Bus_ManStop( p ); + Abc_SclSclGates2MioGates( pLib, pNtk ); if ( pNtk->vPhases ) Vec_IntFillExtra( pNtk->vPhases, Abc_NtkObjNumMax(pNtk), 0 ); pNtkNew = Abc_NtkDupDfs( pNtk ); |