diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-08-09 22:13:13 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-08-09 22:13:13 -0700 |
commit | 6e2ee1d30accf7e7da6277b25594b384e8364308 (patch) | |
tree | 368a7fcb74c98edf659d56b52fe4f68b2ca56914 | |
parent | 4af5587cbfc0db8028f7405c4a8119571e7f2739 (diff) | |
download | abc-6e2ee1d30accf7e7da6277b25594b384e8364308.tar.gz abc-6e2ee1d30accf7e7da6277b25594b384e8364308.tar.bz2 abc-6e2ee1d30accf7e7da6277b25594b384e8364308.zip |
Integrated buffering and sizing.
-rw-r--r-- | src/map/scl/scl.c | 4 | ||||
-rw-r--r-- | src/map/scl/sclSize.c | 8 | ||||
-rw-r--r-- | src/map/scl/sclSize.h | 2 | ||||
-rw-r--r-- | src/map/scl/sclUpsize.c | 26 |
4 files changed, 19 insertions, 21 deletions
diff --git a/src/map/scl/scl.c b/src/map/scl/scl.c index 2ff20aef..34a66ea2 100644 --- a/src/map/scl/scl.c +++ b/src/map/scl/scl.c @@ -709,8 +709,8 @@ int Scl_CommandBufSize( 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 = 100; - pPars->Slew = 500; + pPars->GainRatio = 150; + pPars->Slew = 300; pPars->nDegree = 4; pPars->fSizeOnly = 0; pPars->fAddBufs = 0; diff --git a/src/map/scl/sclSize.c b/src/map/scl/sclSize.c index 122c8b56..8b321328 100644 --- a/src/map/scl/sclSize.c +++ b/src/map/scl/sclSize.c @@ -446,12 +446,12 @@ void Abc_SclTimeIncCheckLevel( Abc_Ntk_t * pNtk ) if ( (int)pObj->Level != Abc_ObjLevelNew(pObj) ) printf( "Level of node %d is out of date!\n", i ); } -void Abc_SclTimeIncUpdate( SC_Man * p ) +int Abc_SclTimeIncUpdate( SC_Man * p ) { Abc_Obj_t * pObj; - int i; + int i, RetValue; if ( Vec_IntSize(p->vChanged) == 0 ) - return; + return 0; // Abc_SclTimeIncCheckLevel( p->pNtk ); Abc_NtkForEachObjVec( p->vChanged, p->pNtk, pObj, i ) { @@ -464,7 +464,9 @@ void Abc_SclTimeIncUpdate( SC_Man * p ) Abc_SclTimeIncUpdateArrival( p ); Abc_SclTimeIncUpdateDeparture( p ); Abc_SclTimeIncUpdateClean( p ); + RetValue = p->nIncUpdates; p->nIncUpdates = 0; + return RetValue; } void Abc_SclTimeIncInsert( SC_Man * p, Abc_Obj_t * pObj ) { diff --git a/src/map/scl/sclSize.h b/src/map/scl/sclSize.h index 0a338900..f956a1c6 100644 --- a/src/map/scl/sclSize.h +++ b/src/map/scl/sclSize.h @@ -519,7 +519,7 @@ extern void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPa extern SC_Man * Abc_SclManStart( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads, int fDept, float DUser, int nTreeCRatio ); extern void Abc_SclTimeCone( SC_Man * p, Vec_Int_t * vCone ); extern void Abc_SclTimeNtkRecompute( SC_Man * p, float * pArea, float * pDelay, int fReverse, float DUser ); -extern void Abc_SclTimeIncUpdate( SC_Man * p ); +extern int Abc_SclTimeIncUpdate( SC_Man * p ); extern void Abc_SclTimeIncInsert( SC_Man * p, Abc_Obj_t * pObj ); extern void Abc_SclTimeIncUpdateLevel( Abc_Obj_t * pObj ); extern void Abc_SclTimePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int nTreeCRatio, int fUseWireLoads, int fShowAll, int fPrintPath, int fDumpStats ); diff --git a/src/map/scl/sclUpsize.c b/src/map/scl/sclUpsize.c index 9f9b23ce..987e95e2 100644 --- a/src/map/scl/sclUpsize.c +++ b/src/map/scl/sclUpsize.c @@ -800,10 +800,10 @@ void Abc_SclUpsizePrint( SC_Man * p, int Iter, int win, int nPathPos, int nPathN { printf( "%4d ", Iter ); printf( "Win:%3d. ", win ); - printf( "PO:%5d. ", nPathPos ); - printf( "Path:%6d. ", nPathNodes ); + printf( "PO:%6d. ", nPathPos ); + printf( "Path:%7d. ", nPathNodes ); printf( "Gate:%5d. ", nUpsizes ); - printf( "TFO:%6d. ", nTFOs ); + printf( "TFO:%7d. ", nTFOs ); printf( "A: " ); printf( "%.2f ", p->SumArea ); printf( "(%+5.1f %%) ", 100.0 * (p->SumArea - p->SumArea0)/ p->SumArea0 ); @@ -859,9 +859,8 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars SC_Man * p; Vec_Int_t * vPathPos = NULL; // critical POs Vec_Int_t * vPathNodes = NULL; // critical nodes and PIs - Vec_Int_t * vTFO; abctime clk, nRuntimeLimit = pPars->TimeOut ? pPars->TimeOut * CLOCKS_PER_SEC + Abc_Clock() : 0; - int i = 0, win, nUpsizes = -1, nFramesNoChange = 0; + int i = 0, win, nUpsizes = -1, nFramesNoChange = 0, nConeSize = 0; int nAllPos, nAllNodes, nAllTfos, nAllUpsizes; if ( pPars->fVerbose ) { @@ -925,19 +924,17 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars clk = Abc_Clock(); if ( pPars->fUseDept ) { - vTFO = Vec_IntAlloc( 0 ); - if ( Vec_IntSize(p->vChanged) )//&& pPars->BypassFreq == 0 ) - { -// Abc_SclComputeLoad( p ); - Abc_SclTimeIncUpdate( p ); - } + if ( Vec_IntSize(p->vChanged) ) + nConeSize = Abc_SclTimeIncUpdate( p ); else Abc_SclTimeNtkRecompute( p, NULL, NULL, pPars->fUseDept, 0 ); } else { - vTFO = Abc_SclFindTFO( p->pNtk, vPathNodes ); + Vec_Int_t * vTFO = Abc_SclFindTFO( p->pNtk, vPathNodes ); Abc_SclTimeCone( p, vTFO ); + nConeSize = Vec_IntSize( vTFO ); + Vec_IntFree( vTFO ); } p->timeTime += Abc_Clock() - clk; // Abc_SclUpsizePrintDiffs( p, pLib, pNtk ); @@ -955,14 +952,13 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars nFramesNoChange++; // report and cleanup - Abc_SclUpsizePrint( p, i, win, Vec_IntSize(vPathPos), Vec_IntSize(vPathNodes), nUpsizes, Vec_IntSize(vTFO), pPars->fVeryVerbose || (pPars->fVerbose && nFramesNoChange == 0) ); //|| (i == nIters-1) ); + Abc_SclUpsizePrint( p, i, win, Vec_IntSize(vPathPos), Vec_IntSize(vPathNodes), nUpsizes, nConeSize, pPars->fVeryVerbose || (pPars->fVerbose && nFramesNoChange == 0) ); //|| (i == nIters-1) ); nAllPos += Vec_IntSize(vPathPos); nAllNodes += Vec_IntSize(vPathNodes); - nAllTfos += Vec_IntSize(vTFO); + nAllTfos += nConeSize; nAllUpsizes += nUpsizes; Vec_IntFree( vPathPos ); Vec_IntFree( vPathNodes ); - Vec_IntFree( vTFO ); // check timeout if ( nRuntimeLimit && Abc_Clock() > nRuntimeLimit ) break; |