diff options
Diffstat (limited to 'src/aig/dar')
-rw-r--r-- | src/aig/dar/darBalance.c | 2 | ||||
-rw-r--r-- | src/aig/dar/darLib.c | 8 | ||||
-rw-r--r-- | src/aig/dar/darScript.c | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/aig/dar/darBalance.c b/src/aig/dar/darBalance.c index 07685c98..6dd308f9 100644 --- a/src/aig/dar/darBalance.c +++ b/src/aig/dar/darBalance.c @@ -70,7 +70,7 @@ int Dar_BalanceCone_rec( Aig_Obj_t * pRoot, Aig_Obj_t * pObj, Vec_Ptr_t * vSuper return 0; } // if the new node is complemented or a PI, another gate begins - if ( pObj != pRoot && (Aig_IsComplement(pObj) || Aig_ObjType(pObj) != Aig_ObjType(pRoot) || Aig_ObjRefs(pObj) > 1) ) + if ( pObj != pRoot && (Aig_IsComplement(pObj) || Aig_ObjType(pObj) != Aig_ObjType(pRoot) || Aig_ObjRefs(pObj) > 1 || Vec_PtrSize(vSuper) > 10000) ) { Vec_PtrPush( vSuper, pObj ); Aig_Regular(pObj)->fMarkB = 1; diff --git a/src/aig/dar/darLib.c b/src/aig/dar/darLib.c index e0e97055..b3cf1438 100644 --- a/src/aig/dar/darLib.c +++ b/src/aig/dar/darLib.c @@ -770,7 +770,7 @@ void Dar_LibObjPrint_rec( Dar_LibObj_t * pObj ) SeeAlso [] ***********************************************************************/ -void Dar_LibEvalAssignNums( Dar_Man_t * p, int Class ) +void Dar_LibEvalAssignNums( Dar_Man_t * p, int Class, Aig_Obj_t * pRoot ) { Dar_LibObj_t * pObj; Dar_LibDat_t * pData, * pData0, * pData1; @@ -797,13 +797,15 @@ void Dar_LibEvalAssignNums( Dar_Man_t * p, int Class ) continue; pFanin0 = Aig_NotCond( pData0->pFunc, pObj->fCompl0 ); pFanin1 = Aig_NotCond( pData1->pFunc, pObj->fCompl1 ); + if ( Aig_Regular(pFanin0) == pRoot || Aig_Regular(pFanin1) == pRoot ) + continue; pData->pFunc = Aig_TableLookupTwo( p->pAig, pFanin0, pFanin1 ); if ( pData->pFunc ) { // update the level to be more accurate pData->Level = Aig_Regular(pData->pFunc)->Level; // mark the node if it is part of MFFC - pData->fMffc = Aig_ObjIsTravIdCurrent(p->pAig, pData->pFunc); + pData->fMffc = Aig_ObjIsTravIdCurrent(p->pAig, Aig_Regular(pData->pFunc)); } } } @@ -871,7 +873,7 @@ void Dar_LibEval( Dar_Man_t * p, Aig_Obj_t * pRoot, Dar_Cut_t * pCut, int Requir nNodesSaved = Dar_LibCutMarkMffc( p->pAig, pRoot, pCut->nLeaves ); // evaluate the cut Class = s_DarLib->pMap[pCut->uTruth]; - Dar_LibEvalAssignNums( p, Class ); + Dar_LibEvalAssignNums( p, Class, pRoot ); // profile outputs by their savings p->nTotalSubgs += s_DarLib->nSubgr0[Class]; p->ClassSubgs[Class] += s_DarLib->nSubgr0[Class]; diff --git a/src/aig/dar/darScript.c b/src/aig/dar/darScript.c index bc86de20..1354e841 100644 --- a/src/aig/dar/darScript.c +++ b/src/aig/dar/darScript.c @@ -90,7 +90,8 @@ Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose ) Aig_ManStop( pTemp ); if ( fVerbose ) Aig_ManPrintStats( pAig ); } - + +//Aig_ManDumpBlif( pAig, "inter.blif", NULL, NULL ); // rewrite Dar_ManRewrite( pAig, pParsRwr ); pAig = Aig_ManDupDfs( pTemp = pAig ); |