Merge pull request #458 from jfkey/bug/level-update

Fix assertion failure in `Abc_AigUpdateLevelR_int` during refactor/rewrite/resub
This commit is contained in:
alanminko 2025-12-24 07:23:19 -08:00 committed by GitHub
commit 7a4d8ec907
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -905,7 +905,7 @@ void Abc_AigReplace_int( Abc_Aig_t * pMan, Abc_Obj_t * pOld, Abc_Obj_t * pNew, i
{
Abc_ObjSetReverseLevel( pFanin1, Abc_ObjReverseLevel(pOld) );
assert( pFanin1->fMarkB == 0 );
if ( !Abc_ObjIsCi(pFanin1) )
if ( !Abc_ObjIsCi(pFanin1) && !Abc_AigNodeIsConst(pFanin1) )
{
pFanin1->fMarkB = 1;
Vec_VecPush( pMan->vLevelsR, Abc_ObjReverseLevel(pFanin1), pFanin1 );
@ -1139,7 +1139,7 @@ void Abc_AigUpdateLevelR_int( Abc_Aig_t * pMan )
// iterate through the fanins
Abc_ObjForEachFanin( pNode, pFanin, v )
{
if ( Abc_ObjIsCi(pFanin) )
if ( Abc_ObjIsCi(pFanin) || Abc_AigNodeIsConst(pFanin) )
continue;
// get the new reverse level of this fanin
LevelNew = 0;