From cbb7ff8642236fbc21576dec7b57b9e4cb7e60ef Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 2 Aug 2008 08:01:00 -0700 Subject: Version abc80802 --- src/aig/dch/dchAig.c | 76 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 74 deletions(-) (limited to 'src/aig/dch/dchAig.c') diff --git a/src/aig/dch/dchAig.c b/src/aig/dch/dchAig.c index 31b1eea3..239ece18 100644 --- a/src/aig/dch/dchAig.c +++ b/src/aig/dch/dchAig.c @@ -96,89 +96,17 @@ Aig_Man_t * Dch_DeriveTotalAig( Vec_Ptr_t * vAigs ) } Aig_ObjCreatePo( pAigTotal, Aig_ObjChild0Copy(pObj) ); } +/* // mark the cone of the first AIG Aig_ManIncrementTravId( pAigTotal ); Aig_ManForEachObj( pAig, pObj, i ) if ( pObj->pData ) Aig_ObjSetTravIdCurrent( pAigTotal, pObj->pData ); +*/ // cleanup should not be done return pAigTotal; } -/**Function************************************************************* - - Synopsis [Derives the AIG with choices from representatives.] - - Description [] - - SideEffects [] - - SeeAlso [] - -***********************************************************************/ -void Dch_DeriveChoiceAig_rec( Aig_Man_t * pNew, Aig_Man_t * pOld, Aig_Obj_t * pObj ) -{ - Aig_Obj_t * pRepr, * pObjNew, * pReprNew; - if ( pObj->pData ) - return; - // construct AIG for the representative - pRepr = pOld->pReprs[pObj->Id]; - if ( pRepr != NULL ) - Dch_DeriveChoiceAig_rec( pNew, pOld, pRepr ); - // skip choices with combinatinal loops - if ( Aig_ObjCheckTfi( pOld, pObj, pRepr ) ) - { - pOld->pReprs[pObj->Id] = NULL; - return; - } - Dch_DeriveChoiceAig_rec( pNew, pOld, Aig_ObjFanin0(pObj) ); - Dch_DeriveChoiceAig_rec( pNew, pOld, Aig_ObjFanin1(pObj) ); - pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) ); - if ( pRepr == NULL ) - return; - // add choice - assert( pObj->nRefs == 0 ); - pObjNew = pObj->pData; - pReprNew = pRepr->pData; - pNew->pEquivs[pObjNew->Id] = pNew->pEquivs[pReprNew->Id]; - pNew->pEquivs[pReprNew->Id] = pObjNew; -} - -/**Function************************************************************* - - Synopsis [Derives the AIG with choices from representatives.] - - Description [] - - SideEffects [] - - SeeAlso [] - -***********************************************************************/ -Aig_Man_t * Dch_DeriveChoiceAig( Aig_Man_t * pAig ) -{ - Aig_Man_t * pChoices; - Aig_Obj_t * pObj; - int i; - // start recording equivalences - pChoices = Aig_ManStart( Aig_ManObjNumMax(pAig) ); - pChoices->pEquivs = CALLOC( Aig_Obj_t *, Aig_ManObjNumMax(pAig) ); - // map constants and PIs - Aig_ManCleanData( pAig ); - Aig_ManConst1(pAig)->pData = Aig_ManConst1(pChoices); - Aig_ManForEachPi( pAig, pObj, i ) - pObj->pData = Aig_ObjCreatePi( pChoices ); - // construct choice nodes from the POs - assert( pAig->pReprs != NULL ); - Aig_ManForEachPo( pAig, pObj, i ) - { - Dch_DeriveChoiceAig_rec( pChoices, pAig, Aig_ObjFanin0(pObj) ); - Aig_ObjCreatePo( pChoices, Aig_ObjChild0Copy(pObj) ); - } - // there is no need for cleanup - return pChoices; -} - //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// -- cgit v1.2.3