Commit d3595d23 by Alan Mishchenko

Improvements to gate sizing (bug fix).

parent 7cf176c4
...@@ -143,6 +143,7 @@ void Abc_SclFindCriticalNodeWindow_rec( SC_Man * p, Abc_Obj_t * pObj, Vec_Int_t ...@@ -143,6 +143,7 @@ void Abc_SclFindCriticalNodeWindow_rec( SC_Man * p, Abc_Obj_t * pObj, Vec_Int_t
if ( fSlackFan >= 0 ) if ( fSlackFan >= 0 )
Abc_SclFindCriticalNodeWindow_rec( p, pNext, vPath, fSlackFan ); Abc_SclFindCriticalNodeWindow_rec( p, pNext, vPath, fSlackFan );
} }
if ( Abc_ObjFaninNum(pObj) > 0 )
Vec_IntPush( vPath, Abc_ObjId(pObj) ); Vec_IntPush( vPath, Abc_ObjId(pObj) );
} }
Vec_Int_t * Abc_SclFindCriticalNodeWindow( SC_Man * p, Vec_Int_t * vPathCos, int Window ) Vec_Int_t * Abc_SclFindCriticalNodeWindow( SC_Man * p, Vec_Int_t * vPathCos, int Window )
...@@ -196,7 +197,7 @@ Vec_Int_t * Abc_SclFindNodesToUpdate( Abc_Obj_t * pPivot, Vec_Int_t ** pvEvals ) ...@@ -196,7 +197,7 @@ Vec_Int_t * Abc_SclFindNodesToUpdate( Abc_Obj_t * pPivot, Vec_Int_t ** pvEvals )
// collect fanins, node, and fanouts // collect fanins, node, and fanouts
vNodes = Vec_IntAlloc( 16 ); vNodes = Vec_IntAlloc( 16 );
Abc_ObjForEachFanin( pPivot, pNext, i ) Abc_ObjForEachFanin( pPivot, pNext, i )
if ( Abc_ObjIsNode(pNext) ) if ( Abc_ObjIsNode(pNext) && Abc_ObjFaninNum(pNext) > 0 )
Vec_IntPush( vNodes, Abc_ObjId(pNext) ); Vec_IntPush( vNodes, Abc_ObjId(pNext) );
Vec_IntPush( vNodes, Abc_ObjId(pPivot) ); Vec_IntPush( vNodes, Abc_ObjId(pPivot) );
Abc_ObjForEachFanout( pPivot, pNext, i ) Abc_ObjForEachFanout( pPivot, pNext, i )
...@@ -539,11 +540,12 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int nIters, int Wind ...@@ -539,11 +540,12 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int nIters, int Wind
// update for best gates and recompute timing // update for best gates and recompute timing
ABC_SWAP( Vec_Int_t *, p->vGatesBest, p->vGates ); ABC_SWAP( Vec_Int_t *, p->vGatesBest, p->vGates );
Abc_SclTimeNtkRecompute( p, &p->SumArea, &p->MaxDelay, 0 ); Abc_SclTimeNtkRecompute( p, &p->SumArea, &p->MaxDelay, 0 );
p->timeTotal = clock() - p->timeTotal;
if ( fVerbose ) if ( fVerbose )
{
Abc_SclUpsizePrint( p, i, Window, nAllPos/i, nAllNodes/i, nAllUpsizes/i, nAllTfos/i, 1 ); Abc_SclUpsizePrint( p, i, Window, nAllPos/i, nAllNodes/i, nAllUpsizes/i, nAllTfos/i, 1 );
// report runtime // report runtime
p->timeTotal = clock() - p->timeTotal;
if ( fVerbose )
{
p->timeOther = p->timeTotal - p->timeCone - p->timeSize - p->timeTime; p->timeOther = p->timeTotal - p->timeCone - p->timeSize - p->timeTime;
ABC_PRTP( "Runtime: Critical path", p->timeCone, p->timeTotal ); ABC_PRTP( "Runtime: Critical path", p->timeCone, p->timeTotal );
ABC_PRTP( "Runtime: Sizing eval ", p->timeSize, p->timeTotal ); ABC_PRTP( "Runtime: Sizing eval ", p->timeSize, p->timeTotal );
......
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