Skip to content

Commit

Permalink
Merge pull request #236 from MyskYko/fix_rwr
Browse files Browse the repository at this point in the history
update reverse level when co is replaced
  • Loading branch information
alanminko authored Aug 6, 2023
2 parents 039f05c + 3daecc0 commit e387ddf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/base/abc/abcAig.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,16 @@ void Abc_AigReplace_int( Abc_Aig_t * pMan, Abc_Obj_t * pOld, Abc_Obj_t * pNew, i
{
if ( Abc_ObjIsCo(pFanout) )
{
pFanin1 = Abc_ObjRegular( pNew );
if ( pFanin1->fMarkB )
Abc_AigRemoveFromLevelStructureR( pMan->vLevelsR, pFanin1 );
if ( fUpdateLevel && pMan->pNtkAig->vLevelsR )
{
Abc_ObjSetReverseLevel( pFanin1, Abc_ObjReverseLevel(pOld) );
assert( pFanin1->fMarkB == 0 );
pFanin1->fMarkB = 1;
Vec_VecPush( pMan->vLevelsR, Abc_ObjReverseLevel(pFanin1), pFanin1 );
}
Abc_ObjPatchFanin( pFanout, pOld, pNew );
continue;
}
Expand Down

0 comments on commit e387ddf

Please sign in to comment.