diff --git a/src/base/abci/abcMini.c b/src/base/abci/abcMini.c index 40e28dad6..3b5640541 100644 --- a/src/base/abci/abcMini.c +++ b/src/base/abci/abcMini.c @@ -148,7 +148,7 @@ Mini_Aig_t * Abc_MiniAigFromNtk ( Abc_Ntk_t *pNtk ) { Abc_Ntk_t *pNtkRes = NULL; Mini_Aig_t *pAig; - if (Abc_NtkHasMapping(pNtk)) { + if (!Abc_NtkIsStrash(pNtk)) { pNtk = pNtkRes = Abc_NtkStrash( pNtk, 0, 1, 0 ); if ( pNtkRes == NULL ) { diff --git a/src/opt/rar/rewire_miaig.cpp b/src/opt/rar/rewire_miaig.cpp index 7ff05cccc..f9490e1c2 100644 --- a/src/opt/rar/rewire_miaig.cpp +++ b/src/opt/rar/rewire_miaig.cpp @@ -49,7 +49,7 @@ Abc_Ntk_t *Abc_ManRewireInt(Abc_Ntk_t *pNtk, Gia_Man_t *pExc, int nIters, float pNtkMiaig.setExc(pExc); Rewire::Miaig pNew = pNtkMiaig.rewire(nIters, levelGrowRatio, nExpands, nGrowth, nDivs, nFaninMax, nTimeOut, fMapped, nMappedMode, nDist, fCheck, fVerbose); pNew.setName(Abc_NtkName(pNtk)); - if (nMode == 2) { + if (nMode > 0) { pNew.countTransistors(1, nMappedMode); } @@ -1245,11 +1245,11 @@ Miaig Miaig::rewire(int nIters, float levelGrowRatio, int nExpands, int nGrowth, if (nVerbose) printf("%5g (AND2 = %5g Level = %3d) ", newTarget, pNew.countAnd2(), pNew.countLevel()); if (nVerbose) Time_PrintEndl("Elapsed time", Time_Clock() - clkStart); PrevBest = newTarget; - pBests = {pNew.dup(0, fMapped), pNew.dup(0, fMapped)}; + pBests = {pNew.dup(0), pNew.dup(0)}; pBest = pNew.dup(0, fMapped), improved = 1; iterNotImproveAfterRestart = 0; } else if (PrevBest == newTarget) { - randomAddBest(pBests, pNew.dup(0, fMapped), nBestSave); + randomAddBest(pBests, pNew.dup(0), nBestSave); } // compare if (maxLevel ? pNew.countLevel() > maxLevel : 0) {