diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2007-06-24 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2007-06-24 08:01:00 -0700 |
commit | d6804597a397379f826810a736ccbe99bf56c497 (patch) | |
tree | 9ead35b5d0dd58628c773576765b249c87c71dda /src/aig/dar/darObj.c | |
parent | d47752011d94805850f8713258634d1bde5e639f (diff) | |
download | abc-d6804597a397379f826810a736ccbe99bf56c497.tar.gz abc-d6804597a397379f826810a736ccbe99bf56c497.tar.bz2 abc-d6804597a397379f826810a736ccbe99bf56c497.zip |
Version abc70624
Diffstat (limited to 'src/aig/dar/darObj.c')
-rw-r--r-- | src/aig/dar/darObj.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/aig/dar/darObj.c b/src/aig/dar/darObj.c index 2db13c71..85b142e6 100644 --- a/src/aig/dar/darObj.c +++ b/src/aig/dar/darObj.c @@ -122,9 +122,15 @@ void Dar_ObjConnect( Dar_Man_t * p, Dar_Obj_t * pObj, Dar_Obj_t * pFan0, Dar_Obj pObj->pFanin1 = pFan1; // increment references of the fanins and add their fanouts if ( pFan0 != NULL ) + { + assert( Dar_ObjFanin0(pObj)->Type > 0 ); Dar_ObjRef( Dar_ObjFanin0(pObj) ); + } if ( pFan1 != NULL ) + { + assert( Dar_ObjFanin1(pObj)->Type > 0 ); Dar_ObjRef( Dar_ObjFanin1(pObj) ); + } // set level and phase if ( pFan1 != NULL ) { @@ -270,10 +276,12 @@ void Dar_ObjReplace( Dar_Man_t * p, Dar_Obj_t * pObjOld, Dar_Obj_t * pObjNew, in // the object cannot be the same assert( pObjOld != pObjNewR ); // make sure object is not pointing to itself -// assert( pObjOld != Dar_ObjFanin0(pObjNewR) ); + assert( pObjOld != Dar_ObjFanin0(pObjNewR) ); assert( pObjOld != Dar_ObjFanin1(pObjNewR) ); // recursively delete the old node - but leave the object there + pObjNewR->nRefs++; Dar_ObjDelete_rec( p, pObjOld, 0 ); + pObjNewR->nRefs--; // if the new object is complemented or already used, create a buffer p->nObjs[pObjOld->Type]--; if ( Dar_IsComplement(pObjNew) || Dar_ObjRefs(pObjNew) > 0 || (fNodesOnly && !Dar_ObjIsNode(pObjNew)) ) |