rewire fix genlib change

This commit is contained in:
jiunhaochen 2025-04-17 16:14:49 +08:00
parent 01bfd8fbad
commit 0ab176d7c9
2 changed files with 3 additions and 3 deletions

View File

@ -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 )
{

View File

@ -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) {