179 *ppLeafToAdd = pFanin1;
180 *pNodeToMark1 = pFanin0;
181 *pNodeToMark2 = NULL;
186 *ppLeafToAdd = pFanin0;
187 *pNodeToMark1 = pFanin1;
188 *pNodeToMark2 = NULL;
194 pTemp = pFanin0, pFanin0 = pFanin1, pFanin1 = pTemp;
199 *pNodeToMark1 = NULL;
200 pGrandToAdd = pFanin0;
204 *pNodeToMark1 = pFanin0;
208 if ( pGrandToAdd && pGrandToAdd != pGrand )
210 pGrandToAdd = pGrand;
215 if ( pGrandToAdd && pGrandToAdd != pGrand )
217 pGrandToAdd = pGrand;
221 *pNodeToMark2 = pFanin1;
225 if ( pGrandToAdd && pGrandToAdd != pGrand )
227 pGrandToAdd = pGrand;
232 if ( pGrandToAdd && pGrandToAdd != pGrand )
234 pGrandToAdd = pGrand;
236 assert( pGrandToAdd != NULL );
237 *ppLeafToAdd = pGrandToAdd;
318 Abc_Obj_t * pNode, * pFaninBest, * pNext;
319 int CostBest, CostCur, i;
329 if ( CostBest > CostCur ||
330 (CostBest == CostCur && pNode->
Level > pFaninBest->
Level) )
338 if ( pFaninBest == NULL )
343 if ( vLeaves->nSize - 1 + CostBest > nSizeLimit )
370 assert( vLeaves->nSize <= nSizeLimit );
391 Abc_Obj_t * pNode = NULL, * pLeafToAdd, * pNodeToMark1, * pNodeToMark2;
407 assert( !pLeafToAdd->fMarkB );
408 pLeafToAdd->fMarkB = 1;
415 assert( !pNodeToMark1->fMarkB );
416 pNodeToMark1->fMarkB = 1;
421 assert( !pNodeToMark2->fMarkB );
422 pNodeToMark2->fMarkB = 1;
450 if ( fIncludeFanins )
454 for ( i = 0; i < nRoots; i++ )
501 DdNode * bFunc0, * bFunc1, * bFunc = NULL;
539 DdNode * bFunc0, * bFunc1, * bFunc, * bTrans, * bTemp, * bCube, * bResult;
697 int i, k, v, LevelMin;
702 assert( vVec->nSize == 0 );
709 if ( pNode->
Level > (
unsigned)LevelMax )
713 if ( LevelMin < (
int)pNode->
Level )
714 LevelMin = pNode->
Level;
#define Vec_VecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
DdNode * Abc_NodeConeBdd(DdManager *dd, DdNode **pbVars, Abc_Obj_t *pRoot, Vec_Ptr_t *vLeaves, Vec_Ptr_t *vVisited)
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static Abc_Obj_t * Abc_ObjFanin1(Abc_Obj_t *pObj)
static void Vec_VecPush(Vec_Vec_t *p, int Level, void *Entry)
static Vec_Vec_t * Vec_VecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
static void Abc_NodesMark(Vec_Ptr_t *vVisited)
FUNCTION DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
static int Abc_ObjFaninC1(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_NtkManCutReadCutLarge(Abc_ManCut_t *p)
void Cudd_Deref(DdNode *node)
static void Abc_NodeConeMarkCollect_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vVisited)
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
#define Vec_VecForEachLevelStart(vGlob, vVec, i, LevelStart)
DdNode * Cudd_bddExistAbstract(DdManager *manager, DdNode *f, DdNode *cube)
static int Abc_NodeBuildCutLevelTwo_int(Vec_Ptr_t *vVisited, Vec_Ptr_t *vLeaves, int nFaninLimit)
static int Abc_ObjFaninC0(Abc_Obj_t *pObj)
static int Abc_ObjIsPi(Abc_Obj_t *pObj)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
ABC_DLL int Abc_NodeMffcLabelAig(Abc_Obj_t *pNode)
void Abc_NodeConeCollect(Abc_Obj_t **ppRoots, int nRoots, Vec_Ptr_t *vLeaves, Vec_Ptr_t *vVisited, int fIncludeFanins)
Abc_ManCut_t * Abc_NtkManCutStart(int nNodeSizeMax, int nConeSizeMax, int nNodeFanStop, int nConeFanStop)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static void Vec_PtrRemove(Vec_Ptr_t *p, void *Entry)
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
static void Abc_NodesUnmark(Vec_Ptr_t *vVisited)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
static int Abc_NodeGetLeafCostOne(Abc_Obj_t *pNode, int nFaninLimit)
Vec_Ptr_t * Abc_NodeFindCut(Abc_ManCut_t *p, Abc_Obj_t *pRoot, int fContain)
#define ABC_NAMESPACE_IMPL_END
static int Abc_NodeBuildCutLevelOne_int(Vec_Ptr_t *vVisited, Vec_Ptr_t *vLeaves, int nSizeLimit, int nFaninLimit)
Vec_Ptr_t * Abc_NtkManCutReadVisited(Abc_ManCut_t *p)
Vec_Ptr_t * Abc_NtkManCutReadCutSmall(Abc_ManCut_t *p)
DdNode * Cudd_bddXnor(DdManager *dd, DdNode *f, DdNode *g)
DdNode * Abc_NodeConeDcs(DdManager *dd, DdNode **pbVarsX, DdNode **pbVarsY, Vec_Ptr_t *vLeaves, Vec_Ptr_t *vRoots, Vec_Ptr_t *vVisited)
#define Vec_VecForEachEntryStart(Type, vGlob, pEntry, i, k, LevelStart)
#define ABC_NAMESPACE_IMPL_START
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
void Abc_NtkManCutStop(Abc_ManCut_t *p)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
Vec_Ptr_t * Abc_NodeCollectTfoCands(Abc_ManCut_t *p, Abc_Obj_t *pRoot, Vec_Ptr_t *vLeaves, int LevelMax)
#define Cudd_NotCond(node, c)
DdNode * Cudd_bddAnd(DdManager *dd, DdNode *f, DdNode *g)
static void Vec_PtrClear(Vec_Ptr_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Abc_NodeGetLeafCostTwo(Abc_Obj_t *pNode, int nFaninLimit, Abc_Obj_t **ppLeafToAdd, Abc_Obj_t **pNodeToMark1, Abc_Obj_t **pNodeToMark2)
static int Abc_ObjIsComplement(Abc_Obj_t *p)
static void Abc_NodesUnmarkB(Vec_Ptr_t *vVisited)
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)
static void Vec_VecPushUnique(Vec_Vec_t *p, int Level, void *Entry)