92 for ( i = 0; i < vFanins->nSize; i++ )
93 if ( vSupport->
pArray[i] == 0 )
151 if ( pFanin1 == pFanin2 )
251 for ( i = 0; i < nVars; i++ )
252 Counter += vSupport->
pArray[i];
274 if ( pObj == pFanin )
300 if ( pObj != pFanin )
323 if ( pObj == pFanin )
347 if ( pFanin == pSkip )
350 if ( pPerm[i] == -1 )
372 DdNode * bVar, * bFunc0, * bFunc1, * bTemp, * bFanin, * bFanout;
373 int RetValue, nSize, iFanin;
413 if ( bFanoutNew == NULL )
420 pFanoutNew->
pData = bFanoutNew;
432 Vec_Ptr_t * vFanouts, * vFanins, * vNodes;
434 int * pPermFanin, * pPermFanout;
441 fprintf( stdout,
"Converting to BDD has failed.\n" );
451 pPermFanin =
ABC_ALLOC(
int, nMaxSize + 1000 );
452 pPermFanout =
ABC_ALLOC(
int, nMaxSize + 1000 );
473 printf(
"Collapsing fanin %5d (supp =%2d) into fanout %5d (supp =%2d) ",
475 RetValue =
Abc_NodeCollapse( pNode, pFanout, vFanins, pPermFanin, pPermFanout );
538 int RetValue, nSize, iFanin;
552 pPermFanout[iFanin] = nSize;
557 return Hop_Compose( pMan, bFanout, bFanin, nSize );
568 if ( bFanoutNew == NULL )
574 pFanoutNew->
pData = bFanoutNew;
589 if ( Truth == 0x6666666666666666 || Truth == 0x9999999999999999 ||
590 Truth == 0x9696969696969696 || Truth == 0x6969696969696969 ||
591 Truth == 0x6996699669966996 || Truth == 0x9669966996699669 ||
592 Truth == 0x9669699696696996 || Truth == 0x6996966969969669 ||
593 Truth == 0x6996966996696996 || Truth == 0x9669699669969669 )
599 Vec_Ptr_t * vFanouts, * vFanins, * vNodes;
601 int * pPermFanin, * pPermFanout;
608 fprintf( stdout,
"Converting to AIG has failed.\n" );
614 pPermFanin =
ABC_ALLOC(
int, nMaxSize + 1000 );
615 pPermFanout =
ABC_ALLOC(
int, nMaxSize + 1000 );
644 printf(
"Collapsing fanin %5d (supp =%2d) into fanout %5d (supp =%2d) ",
646 RetValue =
Abc_NodeCollapse1( pNode, pFanout, vFanins, pPermFanin, pPermFanout );
666 for ( i = 0; i < nIterMax; i++ )
722 Vec_Ptr_t * vFanouts, * vFanins, * vNodes;
724 int * pPermFanin, * pPermFanout;
733 fprintf( stdout,
"Converting to BDD has failed.\n" );
745 fprintf( stdout,
"Converting to SOP has failed.\n" );
780 fprintf( stdout,
"Converting to BDD has failed.\n" );
785 pPermFanin =
ABC_ALLOC(
int, nMaxSize + 1000 );
786 pPermFanout =
ABC_ALLOC(
int, nMaxSize + 1000 );
798 printf(
"Collapsing fanin %5d (supp =%2d) into fanout %5d (supp =%2d) ",
800 RetValue =
Abc_NodeCollapse( pNode, pFanout, vFanins, pPermFanin, pPermFanout );
int Hop_ObjFanoutCount(Hop_Obj_t *pObj, Hop_Obj_t *pPivot)
Hop_Obj_t * Abc_NodeCollapseFunc1(Abc_Obj_t *pFanin, Abc_Obj_t *pFanout, Vec_Ptr_t *vFanins, int *pPermFanin, int *pPermFanout)
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
static int Abc_NtkIsLogic(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
void Abc_NodeSupportClear_rec(DdNode *bFunc)
static int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
void Cudd_Deref(DdNode *node)
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
int Abc_ObjFaninNumberNew(Vec_Ptr_t *vFanins, Abc_Obj_t *pFanin)
ABC_DLL int Abc_SopGetCubeNum(char *pSop)
ABC_DLL int Abc_NodeFindFanin(Abc_Obj_t *pNode, Abc_Obj_t *pFanin)
#define Cudd_Regular(node)
Hop_Obj_t * Hop_Compose(Hop_Man_t *p, Hop_Obj_t *pRoot, Hop_Obj_t *pFunc, int iVar)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
int Abc_NtkEliminate1(Abc_Ntk_t *pNtk, int ElimValue, int nMaxSize, int nIterMax, int fReverse, int fVerbose)
static void Vec_PtrSort(Vec_Ptr_t *p, int(*Vec_PtrSortCompare)()) ___unused
int Abc_NodeCountAppearancesAll(Abc_Obj_t *pNode)
ABC_DLL void Abc_NtkDeleteObj_rec(Abc_Obj_t *pObj, int fOnlyNodes)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
static Vec_Str_t * Vec_StrAlloc(int nCap)
DdNode * Cudd_bddIte(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
ABC_DLL Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
word Hop_ManComputeTruth6(Hop_Man_t *p, Hop_Obj_t *pObj, int nVars)
ABC_DLL int Abc_NtkCleanup(Abc_Ntk_t *pNtk, int fVerbose)
static Abc_Obj_t * Abc_NtkObj(Abc_Ntk_t *pNtk, int i)
int Abc_NodeCollapseSuppSize(Abc_Obj_t *pFanin, Abc_Obj_t *pFanout, Vec_Ptr_t *vFanins)
static int Vec_PtrSize(Vec_Ptr_t *p)
int Abc_NodeCollapsePermMap(Abc_Obj_t *pNode, Abc_Obj_t *pSkip, Vec_Ptr_t *vFanins, int *pPerm)
static int Abc_NtkIsAigLogic(Abc_Ntk_t *pNtk)
ABC_DLL Vec_Ptr_t * Abc_NtkDfsReverse(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
DdNode * Abc_NodeCollapseFunc(Abc_Obj_t *pFanin, Abc_Obj_t *pFanout, Vec_Ptr_t *vFanins, int *pPermFanin, int *pPermFanout)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
int Abc_NodeRemoveDupFanins_int(Abc_Obj_t *pNode)
void Abc_ObjSortInReverseOrder(Abc_Ntk_t *pNtk, Vec_Ptr_t *vNodes)
static ABC_NAMESPACE_IMPL_START int Abc_NodeSupport(DdNode *bFunc, Vec_Str_t *vSupport, int nVars)
DECLARATIONS ///.
Hop_Obj_t * Hop_Permute(Hop_Man_t *p, Hop_Obj_t *pRoot, int nRootVars, int *pPermute)
#define Cudd_IsComplement(node)
DdNode * Cudd_Cofactor(DdManager *dd, DdNode *f, DdNode *g)
DdNode * Cudd_bddPermute(DdManager *manager, DdNode *node, int *permut)
ABC_DLL int Abc_NtkToSop(Abc_Ntk_t *pNtk, int fDirect)
static void Vec_StrFree(Vec_Str_t *p)
int Abc_NtkMinimumBase(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
unsigned __int64 word
DECLARATIONS ///.
static void Vec_StrFill(Vec_Str_t *p, int nSize, char Fill)
#define ABC_NAMESPACE_IMPL_END
#define cuddIsConstant(node)
int Abc_NtkRemoveDupFanins(Abc_Ntk_t *pNtk)
int Abc_ObjCompareByNumber(Abc_Obj_t **pp1, Abc_Obj_t **pp2)
ABC_DLL int Abc_NtkToBdd(Abc_Ntk_t *pNtk)
DdNode * Cudd_bddAndAbstract(DdManager *manager, DdNode *f, DdNode *g, DdNode *cube)
DdNode * Cudd_bddXnor(DdManager *dd, DdNode *f, DdNode *g)
int Abc_NodeCollapse1(Abc_Obj_t *pFanin, Abc_Obj_t *pFanout, Vec_Ptr_t *vFanins, int *pPermFanin, int *pPermFanout)
int Abc_NtkEliminateSpecial(Abc_Ntk_t *pNtk, int nMaxSize, int fVerbose)
void Abc_NodeSupport_rec(DdNode *bFunc, Vec_Str_t *vSupport)
#define Abc_NtkForEachNode(pNtk, pNode, i)
ABC_DLL void Abc_ObjTransferFanout(Abc_Obj_t *pObjOld, Abc_Obj_t *pObjNew)
#define ABC_NAMESPACE_IMPL_START
int Abc_NodeRemoveDupFanins(Abc_Obj_t *pNode)
static ABC_NAMESPACE_IMPL_START word Truth[8]
DECLARATIONS ///.
static Abc_Obj_t * Abc_ObjRegular(Abc_Obj_t *p)
ABC_DLL int Abc_SopGetIthCareLit(char *pSop, int i)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
ABC_DLL Abc_Obj_t * Abc_NodeFindCoFanout(Abc_Obj_t *pNode)
int Abc_NodeCheckDupFanin(Abc_Obj_t *pFanin, Abc_Obj_t *pFanout, int *piFanin)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
static int Abc_NtkIsBddLogic(Abc_Ntk_t *pNtk)
DdNode * Cudd_bddIthVar(DdManager *dd, int i)
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
int Abc_NtkEliminate(Abc_Ntk_t *pNtk, int nMaxSize, int fReverse, int fVerbose)
ABC_DLL void Abc_NodeCollectFanins(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
int Abc_NodeCollapse(Abc_Obj_t *pFanin, Abc_Obj_t *pFanout, Vec_Ptr_t *vFanins, int *pPermFanin, int *pPermFanout)
int Abc_NodeIsExor(Abc_Obj_t *pNode)
ABC_DLL int Abc_NtkToAig(Abc_Ntk_t *pNtk)
int Abc_NodeMinimumBase(Abc_Obj_t *pNode)
ABC_DLL void Abc_ObjDeleteFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
static void Vec_PtrClear(Vec_Ptr_t *p)
ABC_DLL void Abc_NodeCollectFanouts(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
int Abc_NodeCountAppearances(Abc_Obj_t *pFanin, Abc_Obj_t *pFanout)
ABC_DLL int Abc_SopIsComplement(char *pSop)
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
Hop_Obj_t * Hop_IthVar(Hop_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
void Abc_NtkBddReorder(Abc_Ntk_t *pNtk, int fVerbose)
static void Vec_PtrFree(Vec_Ptr_t *p)
static int Hop_ManPiNum(Hop_Man_t *p)
int Abc_NtkEliminate1One(Abc_Ntk_t *pNtk, int ElimValue, int nMaxSize, int fReverse, int fVerbose)