73 if ( pNtkNew == NULL )
80 printf(
"Abc_NtkDsdGlobal: The network check has failed.\n" );
100 char ** ppNamesCi, ** ppNamesCo;
116 if ( pManDsd == NULL )
141 Dsd_TreePrint( stdout, pManDsd, ppNamesCi, ppNamesCo, fShort, -1 );
168 Abc_Obj_t * pNode, * pNodeNew, * pDriver;
182 for ( i = 0; i < nNodesDsd; i++ )
218 DdNode * bLocal, * bTemp, * bVar;
228 for ( i = 0; i < nDecs; i++ )
248 for ( i = 0; i < nDecs; i++ )
260 for ( i = 0; i < nDecs; i++ )
295 pNodeNew->pData = bLocal;
322 int pCounters[11] = {0};
334 for ( i = 0; i < vNodes->nSize; i++ )
340 printf(
"Number of non-decomposable functions:\n" );
341 for ( i = 3; i < 10; i++ )
342 printf(
"Inputs = %d. Functions = %6d.\n", i, pCounters[i] );
343 printf(
"Inputs > %d. Functions = %6d.\n", 9, pCounters[10] );
352 printf(
"Abc_NtkDsdRecursive: The network check has failed.\n" );
398 Abc_Obj_t * pRoot = NULL, * pFanin, * pNode1, * pNode2, * pNodeC;
399 Dsd_Node_t ** ppNodesDsd, * pNodeDsd, * pFaninDsd;
400 int i, nNodesDsd, iVar, fCompl;
420 for ( i = 0; i < nNodesDsd; i++ )
521 DdNode * bVar, * bCof0, * bCof1;
522 int SuppSumMin = 1000000;
523 int i, nSSD, nSSQ, iVar;
527 for ( i = 0; i < nVars; i++ )
550 if ( SuppSumMin > nSSD + nSSQ )
552 SuppSumMin = nSSD + nSSQ;
576 for ( i = 0; i < nCubes; i++ )
599 int i, nMints =
Abc_MaxInt( 1, (
int)(0.01 * nPerc * nSpace) );
602 for ( i = 0; i < nMints; i++ )
605 for ( i = 0; i < nMints; i++ )
615 DdNode * bFunc, * bFuncOld;
656 for ( c = 0; c < 2; c++ )
680 if ( pNtkNew == NULL )
684 printf(
"Abc_NtkSparsify: The network check has failed.\n" );
Abc_Ntk_t * Abc_NtkDsdGlobal(Abc_Ntk_t *pNtk, int fVerbose, int fPrint, int fShort)
FUNCTION DEFINITIONS ///.
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
int Abc_NtkDsdLocal(Abc_Ntk_t *pNtk, int fVerbose, int fRecursive)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Abc_Ntk_t * Abc_NtkSparsifyInternal(Abc_Ntk_t *pNtk, int nPerc, int fVerbose)
Abc_Ntk_t * Abc_NtkSparsify(Abc_Ntk_t *pNtk, int nPerc, int fVerbose)
static int Abc_NtkIsComb(Abc_Ntk_t *pNtk)
static int Abc_NodeFindMuxVar(DdManager *dd, DdNode *bFunc, int nVars)
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
double Cudd_CountMinterm(DdManager *manager, DdNode *node, int nvars)
void Dsd_ManagerStop(Dsd_Manager_t *dMan)
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_NtkDsdConstructNode(Dsd_Manager_t *pManDsd, Dsd_Node_t *pNodeDsd, Abc_Ntk_t *pNtkNew, int *pCounters)
static void Abc_NtkDsdConstruct(Dsd_Manager_t *pManDsd, Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkNew)
ABC_DLL int Abc_NtkMinimumBase(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
void Cudd_Srandom(long seed)
void Cudd_Deref(DdNode *node)
void Dsd_TreePrint2(FILE *pFile, Dsd_Manager_t *dMan, char *pInputNames[], char *pOutputNames[], int Output)
Dsd_Node_t ** Dsd_TreeCollectNodesDfs(Dsd_Manager_t *dMan, int *pnNodes)
DdManager * Dsd_ManagerReadDd(Dsd_Manager_t *pMan)
DdNode ** Cudd_bddPickArbitraryMinterms(DdManager *dd, DdNode *f, DdNode **vars, int n, int k)
Dsd_Node_t * Dsd_ManagerReadInput(Dsd_Manager_t *pMan, int i)
ABC_DLL char ** Abc_NtkCollectCioNames(Abc_Ntk_t *pNtk, int fCollectCos)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
int Dsd_NodeReadDecsNum(Dsd_Node_t *p)
ABC_DLL Abc_Obj_t * Abc_NtkDupObj(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int fCopyName)
static ABC_NAMESPACE_IMPL_START Abc_Ntk_t * Abc_NtkDsdInternal(Abc_Ntk_t *pNtk, int fVerbose, int fPrint, int fShort)
DECLARATIONS ///.
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeConst1(Abc_Ntk_t *pNtk)
static int Abc_ObjFaninC0(Abc_Obj_t *pObj)
ABC_DLL Abc_Ntk_t * Abc_NtkDup(Abc_Ntk_t *pNtk)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
ABC_DLL Abc_Obj_t * Abc_NtkCloneObj(Abc_Obj_t *pNode)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCo(pNtk, pCo, i)
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
ABC_DLL char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
DdNode * Cudd_bddIte(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
static int Abc_MaxInt(int a, int b)
Dsd_Node_t * Dsd_ManagerReadRoot(Dsd_Manager_t *pMan, int i)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
static Vec_Ptr_t * Abc_NtkCollectNodesForDsd(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
static void * Abc_ObjGlobalBdd(Abc_Obj_t *pObj)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
ABC_DLL Abc_Ntk_t * Abc_NtkAlloc(Abc_NtkType_t Type, Abc_NtkFunc_t Func, int fUseMemMan)
DECLARATIONS ///.
ABC_DLL void * Abc_NtkFreeGlobalBdds(Abc_Ntk_t *pNtk, int fFreeMan)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
Dsd_Node_t * Dsd_ManagerReadConst1(Dsd_Manager_t *pMan)
static int Abc_NodeIsForDsd(Abc_Obj_t *pNode)
ABC_DLL Abc_Ntk_t * Abc_NtkStartFrom(Abc_Ntk_t *pNtk, Abc_NtkType_t Type, Abc_NtkFunc_t Func)
DdNode * Cudd_Cofactor(DdManager *dd, DdNode *f, DdNode *g)
#define ABC_NAMESPACE_IMPL_END
ABC_DLL void Abc_NtkFinalize(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkNew)
static int Abc_AigNodeIsAnd(Abc_Obj_t *pNode)
STRUCTURE DEFINITIONS ///.
Dsd_Node_t ** Dsd_TreeCollectNodesDfsOne(Dsd_Manager_t *pDsdMan, Dsd_Node_t *pNode, int *pnNodes)
DdNode * Cudd_bddOr(DdManager *dd, DdNode *f, DdNode *g)
Dsd_Manager_t * Dsd_ManagerStart(DdManager *dd, int nSuppMax, int fVerbose)
FUNCTION DECLARATIONS ///.
ABC_DLL void Abc_ObjRemoveFanins(Abc_Obj_t *pObj)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define Dsd_IsComplement(p)
MACRO DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
DdNode * Dsd_TreeGetPrimeFunction(DdManager *dd, Dsd_Node_t *pNode)
FUNCTION DEFINITIONS ///.
ABC_DLL int Abc_NtkLogicMakeSimpleCos(Abc_Ntk_t *pNtk, int fDuplicate)
static void Abc_NodeDecompDsdAndMux(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes, Dsd_Manager_t *pManDsd, int fRecursive, int *pCounters)
int Dsd_NodeReadMark(Dsd_Node_t *p)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void * Abc_NtkGlobalBddMan(Abc_Ntk_t *pNtk)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
static int Abc_NtkIsBddLogic(Abc_Ntk_t *pNtk)
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeConst0(Abc_Ntk_t *pNtk)
DdNode * Abc_NtkSparsifyInternalOne(DdManager *ddNew, DdNode *bFunc, int nFanins, int nPerc)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
DdNode * Cudd_bddIthVar(DdManager *dd, int i)
DdNode * Cudd_bddXor(DdManager *dd, DdNode *f, DdNode *g)
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
unsigned int Cudd_ReadKeys(DdManager *dd)
DdNode * Extra_bddComputeSum(DdManager *dd, DdNode **pbCubes, int nCubes)
#define Cudd_NotCond(node, c)
static Abc_Obj_t * Abc_ObjNotCond(Abc_Obj_t *p, int c)
enum Dsd_Type_t_ Dsd_Type_t
void Cudd_Quit(DdManager *unique)
void Dsd_Decompose(Dsd_Manager_t *dMan, DdNode **pbFuncs, int nFuncs)
DECOMPOSITION FUNCTIONS ///.
ABC_DLL void * Abc_NtkBuildGlobalBdds(Abc_Ntk_t *pNtk, int fBddSizeMax, int fDropInternal, int fReorder, int fVerbose)
unsigned int Cudd_ReadDead(DdManager *dd)
static Abc_Obj_t * Abc_ObjFanin(Abc_Obj_t *pObj, int i)
Dsd_Type_t Dsd_NodeReadType(Dsd_Node_t *p)
FUNCTION DEFINITIONS ///.
Dsd_Node_t * Dsd_DecomposeOne(Dsd_Manager_t *pDsdMan, DdNode *bFunc)
Dsd_Node_t * Dsd_NodeReadDec(Dsd_Node_t *p, int i)
static int Abc_ObjIsComplement(Abc_Obj_t *p)
int Cudd_SupportSize(DdManager *dd, DdNode *f)
void Dsd_NodeSetMark(Dsd_Node_t *p, int Mark)
ABC_DLL int Abc_NodeMinimumBase(Abc_Obj_t *pNode)
void Dsd_TreePrint(FILE *pFile, Dsd_Manager_t *dMan, char *pInputNames[], char *pOutputNames[], int fShortNames, int Output)
static void Vec_PtrFree(Vec_Ptr_t *p)