diff options
Diffstat (limited to 'src/aig/dar')
-rw-r--r-- | src/aig/dar/darBalance.c | 12 | ||||
-rw-r--r-- | src/aig/dar/darRefact.c | 13 |
2 files changed, 22 insertions, 3 deletions
diff --git a/src/aig/dar/darBalance.c b/src/aig/dar/darBalance.c index 574c72d9..5c9a144f 100644 --- a/src/aig/dar/darBalance.c +++ b/src/aig/dar/darBalance.c @@ -199,6 +199,14 @@ void Dar_BalancePermute( Aig_Man_t * p, Vec_Ptr_t * vSuper, int LeftBound, int f Vec_PtrWriteEntry( vSuper, RightBound, pObj3 ); return; } + if ( Aig_Regular(pObj1) == Aig_Regular(pObj3) ) + { + if ( pObj3 == pObj2 ) + return; + Vec_PtrWriteEntry( vSuper, i, pObj2 ); + Vec_PtrWriteEntry( vSuper, RightBound, pObj3 ); + return; + } pGhost = Aig_ObjCreateGhost( p, pObj1, pObj3, fExor? AIG_OBJ_EXOR : AIG_OBJ_AND ); if ( Aig_TableLookup( p, pGhost ) ) { @@ -394,7 +402,7 @@ Aig_Man_t * Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel ) pObjNew = Aig_ObjCreatePi(pNew); pObj->pData = pObjNew; // set the arrival time of the new PI - arrTime = Tim_ManGetPiArrival( p->pManTime, Aig_ObjPioNum(pObj) ); + arrTime = Tim_ManGetCiArrival( p->pManTime, Aig_ObjPioNum(pObj) ); pObjNew->Level = (int)arrTime; } else if ( Aig_ObjIsPo(pObj) ) @@ -406,7 +414,7 @@ Aig_Man_t * Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel ) Aig_ObjCreatePo( pNew, pObjNew ); // save arrival time of the output arrTime = (float)Aig_Regular(pObjNew)->Level; - Tim_ManSetPoArrival( p->pManTime, Aig_ObjPioNum(pObj), arrTime ); + Tim_ManSetCoArrival( p->pManTime, Aig_ObjPioNum(pObj), arrTime ); } else assert( 0 ); diff --git a/src/aig/dar/darRefact.c b/src/aig/dar/darRefact.c index 0637fee0..09b9b3a4 100644 --- a/src/aig/dar/darRefact.c +++ b/src/aig/dar/darRefact.c @@ -600,10 +600,21 @@ p->timeOther = p->timeTotal - p->timeCuts - p->timeEval; Aig_ManFanoutStop( pAig ); if ( p->pPars->fUpdateLevel ) Aig_ManStopReverseLevels( pAig ); +/* + Aig_ManForEachObj( p->pAig, pObj, i ) + if ( Aig_ObjIsNode(pObj) && Aig_ObjRefs(pObj) == 0 ) + { + printf( "Unreferenced " ); + Aig_ObjPrintVerbose( pObj, 0 ); + printf( "\n" ); + } +*/ + // remove dangling nodes (they should not be here!) + Aig_ManCleanup( pAig ); // stop the rewriting manager Dar_ManRefStop( p ); - Aig_ManCheckPhase( pAig ); +// Aig_ManCheckPhase( pAig ); if ( !Aig_ManCheck( pAig ) ) { printf( "Dar_ManRefactor: The network check has failed.\n" ); |