Commit 6e2ee1d3 by Alan Mishchenko

Integrated buffering and sizing.

parent 4af5587c
...@@ -709,8 +709,8 @@ int Scl_CommandBufSize( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -709,8 +709,8 @@ int Scl_CommandBufSize( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Ntk_t * pNtkRes, * pNtk = Abc_FrameReadNtk(pAbc); Abc_Ntk_t * pNtkRes, * pNtk = Abc_FrameReadNtk(pAbc);
int c; int c;
memset( pPars, 0, sizeof(SC_BusPars) ); memset( pPars, 0, sizeof(SC_BusPars) );
pPars->GainRatio = 100; pPars->GainRatio = 150;
pPars->Slew = 500; pPars->Slew = 300;
pPars->nDegree = 4; pPars->nDegree = 4;
pPars->fSizeOnly = 0; pPars->fSizeOnly = 0;
pPars->fAddBufs = 0; pPars->fAddBufs = 0;
......
...@@ -446,12 +446,12 @@ void Abc_SclTimeIncCheckLevel( Abc_Ntk_t * pNtk ) ...@@ -446,12 +446,12 @@ void Abc_SclTimeIncCheckLevel( Abc_Ntk_t * pNtk )
if ( (int)pObj->Level != Abc_ObjLevelNew(pObj) ) if ( (int)pObj->Level != Abc_ObjLevelNew(pObj) )
printf( "Level of node %d is out of date!\n", i ); 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; Abc_Obj_t * pObj;
int i; int i, RetValue;
if ( Vec_IntSize(p->vChanged) == 0 ) if ( Vec_IntSize(p->vChanged) == 0 )
return; return 0;
// Abc_SclTimeIncCheckLevel( p->pNtk ); // Abc_SclTimeIncCheckLevel( p->pNtk );
Abc_NtkForEachObjVec( p->vChanged, p->pNtk, pObj, i ) Abc_NtkForEachObjVec( p->vChanged, p->pNtk, pObj, i )
{ {
...@@ -464,7 +464,9 @@ void Abc_SclTimeIncUpdate( SC_Man * p ) ...@@ -464,7 +464,9 @@ void Abc_SclTimeIncUpdate( SC_Man * p )
Abc_SclTimeIncUpdateArrival( p ); Abc_SclTimeIncUpdateArrival( p );
Abc_SclTimeIncUpdateDeparture( p ); Abc_SclTimeIncUpdateDeparture( p );
Abc_SclTimeIncUpdateClean( p ); Abc_SclTimeIncUpdateClean( p );
RetValue = p->nIncUpdates;
p->nIncUpdates = 0; p->nIncUpdates = 0;
return RetValue;
} }
void Abc_SclTimeIncInsert( SC_Man * p, Abc_Obj_t * pObj ) void Abc_SclTimeIncInsert( SC_Man * p, Abc_Obj_t * pObj )
{ {
......
...@@ -519,7 +519,7 @@ extern void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPa ...@@ -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 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_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_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_SclTimeIncInsert( SC_Man * p, Abc_Obj_t * pObj );
extern void Abc_SclTimeIncUpdateLevel( 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 ); extern void Abc_SclTimePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int nTreeCRatio, int fUseWireLoads, int fShowAll, int fPrintPath, int fDumpStats );
......
...@@ -800,10 +800,10 @@ void Abc_SclUpsizePrint( SC_Man * p, int Iter, int win, int nPathPos, int nPathN ...@@ -800,10 +800,10 @@ void Abc_SclUpsizePrint( SC_Man * p, int Iter, int win, int nPathPos, int nPathN
{ {
printf( "%4d ", Iter ); printf( "%4d ", Iter );
printf( "Win:%3d. ", win ); printf( "Win:%3d. ", win );
printf( "PO:%5d. ", nPathPos ); printf( "PO:%6d. ", nPathPos );
printf( "Path:%6d. ", nPathNodes ); printf( "Path:%7d. ", nPathNodes );
printf( "Gate:%5d. ", nUpsizes ); printf( "Gate:%5d. ", nUpsizes );
printf( "TFO:%6d. ", nTFOs ); printf( "TFO:%7d. ", nTFOs );
printf( "A: " ); printf( "A: " );
printf( "%.2f ", p->SumArea ); printf( "%.2f ", p->SumArea );
printf( "(%+5.1f %%) ", 100.0 * (p->SumArea - p->SumArea0)/ p->SumArea0 ); 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 ...@@ -859,9 +859,8 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
SC_Man * p; SC_Man * p;
Vec_Int_t * vPathPos = NULL; // critical POs Vec_Int_t * vPathPos = NULL; // critical POs
Vec_Int_t * vPathNodes = NULL; // critical nodes and PIs 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; 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; int nAllPos, nAllNodes, nAllTfos, nAllUpsizes;
if ( pPars->fVerbose ) if ( pPars->fVerbose )
{ {
...@@ -925,19 +924,17 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars ...@@ -925,19 +924,17 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
clk = Abc_Clock(); clk = Abc_Clock();
if ( pPars->fUseDept ) if ( pPars->fUseDept )
{ {
vTFO = Vec_IntAlloc( 0 ); if ( Vec_IntSize(p->vChanged) )
if ( Vec_IntSize(p->vChanged) )//&& pPars->BypassFreq == 0 ) nConeSize = Abc_SclTimeIncUpdate( p );
{
// Abc_SclComputeLoad( p );
Abc_SclTimeIncUpdate( p );
}
else else
Abc_SclTimeNtkRecompute( p, NULL, NULL, pPars->fUseDept, 0 ); Abc_SclTimeNtkRecompute( p, NULL, NULL, pPars->fUseDept, 0 );
} }
else else
{ {
vTFO = Abc_SclFindTFO( p->pNtk, vPathNodes ); Vec_Int_t * vTFO = Abc_SclFindTFO( p->pNtk, vPathNodes );
Abc_SclTimeCone( p, vTFO ); Abc_SclTimeCone( p, vTFO );
nConeSize = Vec_IntSize( vTFO );
Vec_IntFree( vTFO );
} }
p->timeTime += Abc_Clock() - clk; p->timeTime += Abc_Clock() - clk;
// Abc_SclUpsizePrintDiffs( p, pLib, pNtk ); // Abc_SclUpsizePrintDiffs( p, pLib, pNtk );
...@@ -955,14 +952,13 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars ...@@ -955,14 +952,13 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
nFramesNoChange++; nFramesNoChange++;
// report and cleanup // 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); nAllPos += Vec_IntSize(vPathPos);
nAllNodes += Vec_IntSize(vPathNodes); nAllNodes += Vec_IntSize(vPathNodes);
nAllTfos += Vec_IntSize(vTFO); nAllTfos += nConeSize;
nAllUpsizes += nUpsizes; nAllUpsizes += nUpsizes;
Vec_IntFree( vPathPos ); Vec_IntFree( vPathPos );
Vec_IntFree( vPathNodes ); Vec_IntFree( vPathNodes );
Vec_IntFree( vTFO );
// check timeout // check timeout
if ( nRuntimeLimit && Abc_Clock() > nRuntimeLimit ) if ( nRuntimeLimit && Abc_Clock() > nRuntimeLimit )
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment