diff --git a/src/opt/fret/fretMain.c b/src/opt/fret/fretMain.c index f742cda03..e7995bf52 100644 --- a/src/opt/fret/fretMain.c +++ b/src/opt/fret/fretMain.c @@ -202,8 +202,9 @@ Abc_FlowRetime_MinReg( Abc_Ntk_t * pNtk, int fVerbose, pNtk = Abc_FlowRetime_NtkSilentRestrash( pNtk, 1 ); } + i = Abc_NtkLevel(pNtk); vprintf("\tfinal reg count = %d\n", Abc_NtkLatchNum(pNtk)); - vprintf("\tfinal levels = %d\n", Abc_NtkLevel(pNtk)); + vprintf("\tfinal levels = %d\n", i); #if defined(DEBUG_CHECK) Abc_NtkDoCheck( pNtk ); @@ -1380,4 +1381,3 @@ void Abc_ObjPrintNeighborhood( Abc_Obj_t *pObj, int depth ) { Vec_PtrFree(vNodes); } ABC_NAMESPACE_IMPL_END - diff --git a/src/opt/fret/fretTime.c b/src/opt/fret/fretTime.c index 9d55fc929..67fcabf8c 100644 --- a/src/opt/fret/fretTime.c +++ b/src/opt/fret/fretTime.c @@ -94,14 +94,13 @@ void Abc_FlowRetime_ConstrainConserv( Abc_Ntk_t * pNtk ) { // clear all exact constraints pManMR->nExactConstraints = 0; - while( Vec_PtrSize( pManMR->vExactNodes )) { - pObj = (Abc_Obj_t*)Vec_PtrPop( pManMR->vExactNodes ); - + Abc_NtkForEachObj( pNtk, pObj, i ) { if ( Vec_PtrSize( FTIMEEDGES(pObj) )) { pArray = Vec_PtrReleaseArray( FTIMEEDGES(pObj) ); ABC_FREE( pArray ); } } + Vec_PtrClear( pManMR->vExactNodes ); #if !defined(IGNORE_TIMING) if (pManMR->fIsForward) {