73 if ( !fExor && pTemp ==
Aig_Not(pTempNext) )
78 if ( pTemp != pTempNext )
90 assert( pTemp != pTempNext );
247 for ( Current--; Current >= 0; Current-- )
276 Aig_Obj_t * pObj1, * pObj2, * pObj3, * pGhost;
280 assert( LeftBound <= RightBound );
281 if ( LeftBound == RightBound )
289 for ( i = RightBound; i >= LeftBound; i-- )
300 if ( pObj3 == pObj2 )
309 if ( pObj3 == pObj2 )
377 for ( i = vStore->nSize-1; i > 0; i-- )
380 pObj2 = (
Aig_Obj_t *)vStore->pArray[i-1];
383 vStore->pArray[i ] = pObj2;
384 vStore->pArray[i-1] = pObj1;
403 assert( vSuper->nSize > 1 );
407 while ( vSuper->nSize > 1 )
442 if ( nBaseSize >= nLutSize )
462 int i, nBaseSizeAll, nBaseSize;
463 assert( vSuper->nSize > 1 );
475 if ( nBaseSizeAll + nBaseSize > nLutSize &&
Vec_PtrSize(vSubset) > 1 )
477 nBaseSizeAll += nBaseSize;
510 if ( pObjOld->
pData )
516 if ( vSuper->nSize == 0 )
522 if ( pObjNew == NULL )
527 if ( vSuper->nSize == 1 )
530 #ifdef USE_LUTSIZE_BALANCE
565 pNew->nAsserts = p->nAsserts;
566 pNew->nConstrs = p->nConstrs;
567 pNew->nBarBufs = p->nBarBufs;
568 pNew->Time2Quit = p->Time2Quit;
575 if ( p->pManTime != NULL )
588 pObj->
pData = pObjNew;
591 pObjNew->
Level = (int)arrTime;
598 if ( pObjNew == NULL )
623 pObj->
pData = pObjNew;
625 if ( p->nBarBufs == 0 )
631 if ( pObjNew == NULL )
646 int k = i < p->nBarBufs ?
Aig_ManCoNum(p) - p->nBarBufs + i : i - p->nBarBufs;
650 if ( pObjNew == NULL )
658 if ( i < p->nBarBufs )
672 printf(
"Dar_ManBalance(): The check has failed.\n" );
723 printf(
"There is no EXOR gates.\n" );
746 printf(
" %d", pTemp->
Level );
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Aig_Man_t * Aig_ManDupExor(Aig_Man_t *p)
static Vec_Ptr_t * Vec_PtrStart(int nSize)
Vec_Ptr_t * Dar_BalanceCone(Aig_Obj_t *pObj, Vec_Vec_t *vStore, int Level)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
ABC_DLL int Aig_ManCheck(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
#define Aig_ManForEachExor(p, pObj, i)
static void Vec_VecPush(Vec_Vec_t *p, int Level, void *Entry)
static Vec_Vec_t * Vec_VecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static Aig_Type_t Aig_ObjType(Aig_Obj_t *pObj)
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
void Tim_ManIncrementTravId(Tim_Man_t *p)
DECLARATIONS ///.
static Vec_Int_t * Vec_IntDup(Vec_Int_t *pVec)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
int Aig_ManVerifyTopoOrder(Aig_Man_t *p)
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
static Aig_Obj_t * Aig_ObjChild0(Aig_Obj_t *pObj)
Aig_Obj_t * Aig_TableLookup(Aig_Man_t *p, Aig_Obj_t *pGhost)
void Aig_ManStop(Aig_Man_t *p)
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
static int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
Aig_Obj_t * Aig_ObjReal_rec(Aig_Obj_t *pObj)
void Dar_BalancePushUniqueOrderByLevel(Vec_Ptr_t *vStore, Aig_Obj_t *pObj, int fExor)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
void Tim_ManSetCoArrival(Tim_Man_t *p, int iCo, float Delay)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
static int Aig_IsComplement(Aig_Obj_t *p)
void Dar_BalancePrintStats(Aig_Man_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static void Vec_PtrSort(Vec_Ptr_t *p, int(*Vec_PtrSortCompare)()) ___unused
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static Aig_Obj_t * Aig_ManConst0(Aig_Man_t *p)
#define Aig_ManForEachCo(p, pObj, i)
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
static abctime Abc_Clock()
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
static void * Vec_PtrPop(Vec_Ptr_t *p)
void Dar_BalanceUniqify(Aig_Obj_t *pObj, Vec_Ptr_t *vNodes, int fExor)
Aig_Obj_t * Aig_Oper(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1, Aig_Type_t Type)
static void Vec_PtrRemove(Vec_Ptr_t *p, void *Entry)
Aig_Man_t * Dar_ManBalance(Aig_Man_t *p, int fUpdateLevel)
int Aig_SupportSize(Aig_Man_t *p, Aig_Obj_t *pObj)
int Dar_BalanceFindLeft(Vec_Ptr_t *vSuper)
Aig_Obj_t * Dar_Balance_rec(Aig_Man_t *pNew, Aig_Obj_t *pObjOld, Vec_Vec_t *vStore, int Level, int fUpdateLevel)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static int Aig_ManCoNum(Aig_Man_t *p)
void Dar_BalancePermute(Aig_Man_t *p, Vec_Ptr_t *vSuper, int LeftBound, int fExor)
static int Aig_ObjIsBuf(Aig_Obj_t *pObj)
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
static Aig_Obj_t * Aig_ManCi(Aig_Man_t *p, int i)
static int Aig_ManCiNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
static Aig_Obj_t * Aig_ObjChild1(Aig_Obj_t *pObj)
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
Tim_Man_t * Tim_ManDup(Tim_Man_t *p, int fUnitDelay)
int Aig_NodeCompareLevelsDecrease(Aig_Obj_t **pp1, Aig_Obj_t **pp2)
static Aig_Obj_t * Aig_ObjCreateGhost(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1, Aig_Type_t Type)
void Aig_ManSetCioIds(Aig_Man_t *p)
int Aig_BaseSize(Aig_Man_t *p, Aig_Obj_t *pObj, int nLutSize)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
static int Aig_ManObjNumMax(Aig_Man_t *p)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
static int Aig_ObjIsExor(Aig_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
static int Aig_ObjToLit(Aig_Obj_t *pObj)
static int Aig_ManRegNum(Aig_Man_t *p)
#define Aig_ManForEachObj(p, pObj, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Vec_VecSize(Vec_Vec_t *p)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
static int Aig_ObjLevel(Aig_Obj_t *pObj)
void Aig_ManCleanCioIds(Aig_Man_t *p)
static int Aig_ObjId(Aig_Obj_t *pObj)
static void Vec_PtrClear(Vec_Ptr_t *p)
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
static int Aig_ManExorNum(Aig_Man_t *p)
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
static int Aig_ObjRefs(Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
static void Vec_PtrShrink(Vec_Ptr_t *p, int nSizeNew)
Aig_Obj_t * Dar_BalanceBuildSuper(Aig_Man_t *p, Vec_Ptr_t *vSuper, Aig_Type_t Type, int fUpdateLevel)
char * Abc_UtilStrsav(char *s)
float Tim_ManGetCiArrival(Tim_Man_t *p, int iCi)
void Aig_ManCleanData(Aig_Man_t *p)
int Aig_ManCleanup(Aig_Man_t *p)
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
void Dar_BalanceCone_rec(Aig_Obj_t *pRoot, Aig_Obj_t *pObj, Vec_Ptr_t *vSuper)
Aig_Man_t * Dar_ManBalanceXor(Aig_Man_t *pAig, int fExor, int fUpdateLevel, int fVerbose)
ABC_NAMESPACE_IMPL_START int Dar_ObjCompareLits(Aig_Obj_t **pp1, Aig_Obj_t **pp2)
DECLARATIONS ///.
static int Aig_ObjCioId(Aig_Obj_t *pObj)
static void Vec_PtrFree(Vec_Ptr_t *p)
Aig_Obj_t * Dar_BalanceBuildSuperTop(Aig_Man_t *p, Vec_Ptr_t *vSuper, Aig_Type_t Type, int fUpdateLevel, int nLutSize)