mirror of https://github.com/YosysHQ/abc.git
Two rare corner-case bugs in &if mapper.
This commit is contained in:
parent
baf2a6508d
commit
787dbb9433
|
|
@ -230,9 +230,13 @@ If_Man_t * Abc_NtkToIf( Abc_Ntk_t * pNtk, If_Par_t * pPars )
|
|||
Abc_AigConst1(pNtk)->pCopy = (Abc_Obj_t *)If_ManConst1( pIfMan );
|
||||
Abc_NtkForEachCi( pNtk, pNode, i )
|
||||
{
|
||||
pNode->pCopy = (Abc_Obj_t *)If_ManCreateCi( pIfMan );
|
||||
If_Obj_t * pIfObj = If_ManCreateCi( pIfMan );
|
||||
pNode->pCopy = (Abc_Obj_t *)pIfObj;
|
||||
// transfer logic level information
|
||||
Abc_ObjIfCopy(pNode)->Level = pNode->Level;
|
||||
// mark the largest level
|
||||
if ( pIfMan->nLevelMax < (int)pIfObj->Level )
|
||||
pIfMan->nLevelMax = (int)pIfObj->Level;
|
||||
}
|
||||
|
||||
// load the AIG into the mapper
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
|
|||
if ( p->pPars->fPower )
|
||||
pCut->Power = (Mode == 2)? If_CutPowerDerefed( p, pCut, pObj ) : If_CutPowerFlow( p, pCut, pObj );
|
||||
// save the best cut from the previous iteration
|
||||
if ( !fPreprocess )
|
||||
if ( !fPreprocess || pCut->nLeaves <= 1 )
|
||||
If_CutCopy( p, pCutSet->ppCuts[pCutSet->nCuts++], pCut );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue