Commit 9eb1be8e by Alan Mishchenko

Bug fix in 'addbuffs'.

parent 38494b41
...@@ -2038,10 +2038,10 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fVerbose ) ...@@ -2038,10 +2038,10 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fVerbose )
int i, k, nLevelMax = Abc_NtkLevel( pNtk ); int i, k, nLevelMax = Abc_NtkLevel( pNtk );
Abc_NtkForEachCo( pNtk, pObj, i ) Abc_NtkForEachCo( pNtk, pObj, i )
pObj->Level = nLevelMax + 1; pObj->Level = nLevelMax + 1;
vBuffs = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) * nLevelMax ); vBuffs = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) * (nLevelMax + 1) );
Abc_NtkForEachObj( pNtk, pObj, i ) Abc_NtkForEachObj( pNtk, pObj, i )
{ {
if ( i == Vec_PtrSize(vBuffs) / nLevelMax ) if ( i == Vec_PtrSize(vBuffs) / (nLevelMax + 1) )
break; break;
if ( !Abc_ObjIsNode(pObj) && !Abc_ObjIsCo(pObj) ) if ( !Abc_ObjIsNode(pObj) && !Abc_ObjIsCo(pObj) )
continue; continue;
......
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