diff options
Diffstat (limited to 'src/aig/gia')
-rw-r--r-- | src/aig/gia/giaIf.c | 4 | ||||
-rw-r--r-- | src/aig/gia/giaUtil.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c index 72c65da0..f3820ab4 100644 --- a/src/aig/gia/giaIf.c +++ b/src/aig/gia/giaIf.c @@ -409,6 +409,7 @@ If_Man_t * Gia_ManToIf( Gia_Man_t * p, If_Par_t * pPars ) // create levels with choices Gia_ManChoiceLevel( p ); // mark representative nodes + if ( p->pSibls ) Gia_ManMarkFanoutDrivers( p ); // start the mapping manager and set its parameters pIfMan = If_ManStart( pPars ); @@ -445,12 +446,13 @@ If_Man_t * Gia_ManToIf( Gia_Man_t * p, If_Par_t * pPars ) { Gia_Obj_t * pSibl, * pPrev; for ( pPrev = pObj, pSibl = Gia_ObjSiblObj(p, i); pSibl; pPrev = pSibl, pSibl = Gia_ObjSiblObj(p, Gia_ObjId(p, pSibl)) ) - If_ObjSetChoice( If_ManObj(pIfMan, Gia_ObjValue(pObj)), If_ManObj(pIfMan, Gia_ObjValue(pSibl)) ); + If_ObjSetChoice( If_ManObj(pIfMan, Gia_ObjValue(pPrev)), If_ManObj(pIfMan, Gia_ObjValue(pSibl)) ); If_ManCreateChoice( pIfMan, If_ManObj(pIfMan, Gia_ObjValue(pObj)) ); pPars->fExpRed = 0; } // assert( If_ObjLevel(pIfObj) == Gia_ObjLevel(pNode) ); } + if ( p->pSibls ) Gia_ManCleanMark0( p ); return pIfMan; } diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c index 2faf424e..e5f6eb17 100644 --- a/src/aig/gia/giaUtil.c +++ b/src/aig/gia/giaUtil.c @@ -339,6 +339,7 @@ void Gia_ManFillValue( Gia_Man_t * p ) ***********************************************************************/ void Gia_ObjSetPhase( Gia_Obj_t * pObj ) { + assert( !Gia_ObjIsXor(pObj) ); if ( Gia_ObjIsAnd(pObj) ) pObj->fPhase = (Gia_ObjPhase(Gia_ObjFanin0(pObj)) ^ Gia_ObjFaninC0(pObj)) & (Gia_ObjPhase(Gia_ObjFanin1(pObj)) ^ Gia_ObjFaninC1(pObj)); @@ -1342,8 +1343,9 @@ void Gia_ManMarkFanoutDrivers( Gia_Man_t * p ) { Gia_Obj_t * pObj; int i; - Gia_ManCleanMark0( p ); Gia_ManForEachObj( p, pObj, i ) + { + pObj->fMark0 = 0; if ( Gia_ObjIsAnd(pObj) ) { Gia_ObjFanin0(pObj)->fMark0 = 1; @@ -1351,6 +1353,7 @@ void Gia_ManMarkFanoutDrivers( Gia_Man_t * p ) } else if ( Gia_ObjIsCo(pObj) ) Gia_ObjFanin0(pObj)->fMark0 = 1; + } } |