diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-08-02 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-08-02 08:01:00 -0700 |
commit | cbb7ff8642236fbc21576dec7b57b9e4cb7e60ef (patch) | |
tree | ae99229ba649fe84e3f1a895570c38601b4b68e4 /src/aig/dch/dchAig.c | |
parent | 582a059e34d913ed52dfc18049e407055ebd7879 (diff) | |
download | abc-cbb7ff8642236fbc21576dec7b57b9e4cb7e60ef.tar.gz abc-cbb7ff8642236fbc21576dec7b57b9e4cb7e60ef.tar.bz2 abc-cbb7ff8642236fbc21576dec7b57b9e4cb7e60ef.zip |
Version abc80802
Diffstat (limited to 'src/aig/dch/dchAig.c')
-rw-r--r-- | src/aig/dch/dchAig.c | 76 |
1 files changed, 2 insertions, 74 deletions
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 /// //////////////////////////////////////////////////////////////////////// |