Commit 9f2c4e99 by Alan Mishchenko

Bug fix in gate-sizing.

parent 4ab7905b
...@@ -338,7 +338,7 @@ int Abc_SclFindBypasses( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notc ...@@ -338,7 +338,7 @@ int Abc_SclFindBypasses( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notc
SC_Cell * pCellOld, * pCellNew; SC_Cell * pCellOld, * pCellNew;
Vec_Ptr_t * vFanouts; Vec_Ptr_t * vFanouts;
Vec_Int_t * vRecalcs, * vEvals; Vec_Int_t * vRecalcs, * vEvals;
Abc_Obj_t * pBuf, * pFanin, * pFanout, * pExtra = NULL; Abc_Obj_t * pBuf, * pFanin, * pFanout, * pExtra;
int i, j, iNode, gateBest, gateBest2, fanBest, Counter = 0; int i, j, iNode, gateBest, gateBest2, fanBest, Counter = 0;
float dGainBest, dGainBest2; float dGainBest, dGainBest2;
...@@ -355,6 +355,7 @@ int Abc_SclFindBypasses( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notc ...@@ -355,6 +355,7 @@ int Abc_SclFindBypasses( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notc
pFanin = Abc_ObjFanin0(pBuf); pFanin = Abc_ObjFanin0(pBuf);
if ( !Abc_ObjIsNode(pFanin) ) if ( !Abc_ObjIsNode(pFanin) )
continue; continue;
pExtra = NULL;
if ( p->pNtk->vPhases == NULL ) if ( p->pNtk->vPhases == NULL )
{ {
if ( Abc_SclIsInv(pBuf) ) if ( Abc_SclIsInv(pBuf) )
...@@ -388,6 +389,9 @@ int Abc_SclFindBypasses( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notc ...@@ -388,6 +389,9 @@ int Abc_SclFindBypasses( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notc
// skip if fanin already has fanout as a fanout // skip if fanin already has fanout as a fanout
if ( Abc_NodeFindFanin(pFanout, pFanin) >= 0 ) if ( Abc_NodeFindFanin(pFanout, pFanin) >= 0 )
continue; continue;
// skip if fanin already has fanout as a fanout
if ( pExtra && Abc_NodeFindFanin(pFanout, pExtra) >= 0 )
continue;
// prepare // prepare
Abc_SclLoadStore3( p, pBuf ); Abc_SclLoadStore3( p, pBuf );
Abc_SclUpdateLoadSplit( p, pBuf, pFanout ); Abc_SclUpdateLoadSplit( p, pBuf, pFanout );
......
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