58 for ( i = 0; i < nNames; i++ )
67 Buffer[0] =
'a' + i%26;
68 Buffer[1] =
'0' + i/26;
90 DdNode * bCover, * zCover, * zCover0, * zCover1;
92 int fPhase, nCubes, nCubes0, nCubes1;
109 if ( nCubes1 <= nCubes0 )
132 pSop[(nFanins + 3) * nCubes] = 0;
149 int i, nDecs, iLit = -1;
156 for ( i = 0; i < nDecs; i++ )
176 for ( i = 0; i < nDecs; i++ )
183 for ( i = 0; i < nDecs; i++ )
211 int i, nNodesDsd, iLit = -1;
234 for ( i = 0; i < nNodesDsd; i++ )
236 iLit =
Gia_ManRebuildNode( pManDsd, ppNodesDsd[i], pNew, ddNew, vFanins, vSop, vCube );
291 DdNode * bFunc0, * bFunc1, * bFunc;
357 if ( vFuncs == NULL )
367 printf(
"Ins = %d. Outs = %d. Shared BDD nodes = %d. Peak live nodes = %d. Peak nodes = %d.\n",
380 Dsd_TreePrint( stdout, pManDsd, ppNamesCi, ppNamesCo, 0, -1 );
void Gia_ManCreateRefs(Gia_Man_t *p)
static Vec_Ptr_t * Vec_PtrStart(int nSize)
void Cudd_RecursiveDerefZdd(DdManager *table, DdNode *n)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
int Gia_ManRebuildNode(Dsd_Manager_t *pManDsd, Dsd_Node_t *pNodeDsd, Gia_Man_t *pNew, DdManager *ddNew, Vec_Int_t *vFanins, Vec_Str_t *vSop, Vec_Str_t *vCube)
#define CUDD_UNIQUE_SLOTS
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
void Gia_ManStop(Gia_Man_t *p)
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
void Dsd_ManagerStop(Dsd_Manager_t *dMan)
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static char * Vec_StrArray(Vec_Str_t *p)
Dsd_Node_t ** Dsd_TreeCollectNodesDfs(Dsd_Manager_t *dMan, int *pnNodes)
DdManager * Dsd_ManagerReadDd(Dsd_Manager_t *pMan)
DdNode * Cudd_ReadLogicZero(DdManager *dd)
static int Gia_ManAppendCi(Gia_Man_t *p)
Dsd_Node_t * Dsd_ManagerReadInput(Dsd_Manager_t *pMan, int i)
static void Vec_PtrFreeFree(Vec_Ptr_t *p)
static int Gia_ObjRefNumId(Gia_Man_t *p, int Id)
int Abc_NtkDeriveFlatGiaSop(Gia_Man_t *pGia, int *gFanins, char *pSop)
int Dsd_NodeReadDecsNum(Dsd_Node_t *p)
static int Gia_ObjRefDecId(Gia_Man_t *p, int Id)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
DdNode * Cudd_bddAndLimit(DdManager *dd, DdNode *f, DdNode *g, unsigned int limit)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
static Vec_Str_t * Vec_StrAlloc(int nCap)
static void Vec_StrPush(Vec_Str_t *p, char Entry)
static int Vec_PtrSize(Vec_Ptr_t *p)
int Cudd_ReadPeakLiveNodeCount(DdManager *dd)
Dsd_Node_t * Dsd_ManagerReadRoot(Dsd_Manager_t *pMan, int i)
static int Abc_LitNotCond(int Lit, int c)
#define Gia_ManForEachCiId(p, Id, i)
Gia_Man_t * Gia_ManCollapseTest(Gia_Man_t *p, int fVerbose)
void Gia_ManCollapseTestTest(Gia_Man_t *p)
Dsd_Node_t * Dsd_ManagerReadConst1(Dsd_Manager_t *pMan)
static void Vec_StrGrow(Vec_Str_t *p, int nCapMin)
Vec_Ptr_t * Gia_ManCollapse(Gia_Man_t *p, DdManager *dd, int nBddLimit, int fVerbose)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Vec_StrFree(Vec_Str_t *p)
ABC_NAMESPACE_IMPL_START int Abc_ConvertZddToSop(DdManager *dd, DdNode *zCover, char *pSop, int nFanins, Vec_Str_t *vCube, int fPhase)
DECLARATIONS ///.
static int Vec_IntEntry(Vec_Int_t *p, int i)
static void Vec_StrFill(Vec_Str_t *p, int nSize, char Fill)
#define ABC_NAMESPACE_IMPL_END
DdManager * Cudd_Init(unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int cacheSize, unsigned long maxMemory)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define Gia_ManForEachAnd(p, pObj, i)
DdNode * Cudd_zddIsop(DdManager *dd, DdNode *L, DdNode *U, DdNode **zdd_I)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
STRUCTURE DEFINITIONS ///.
Dsd_Manager_t * Dsd_ManagerStart(DdManager *dd, int nSuppMax, int fVerbose)
FUNCTION DECLARATIONS ///.
static int Vec_PtrCountZero(Vec_Ptr_t *p)
void Gia_ObjCollapseDeref(Gia_Man_t *p, DdManager *dd, Vec_Ptr_t *vFuncs, int Id)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
#define Dsd_IsComplement(p)
MACRO DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
DdNode * Dsd_TreeGetPrimeFunction(DdManager *dd, Dsd_Node_t *pNode)
FUNCTION DEFINITIONS ///.
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
void Cudd_AutodynDisable(DdManager *unique)
static int Gia_ManCiNum(Gia_Man_t *p)
long Cudd_ReadNodeCount(DdManager *dd)
static Gia_Obj_t * Gia_ManCo(Gia_Man_t *p, int v)
Vec_Ptr_t * Gia_GetFakeNames(int nNames)
FUNCTION DEFINITIONS ///.
static int Vec_IntSize(Vec_Int_t *p)
int Dsd_NodeReadMark(Dsd_Node_t *p)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Gia_Man_t * Gia_ManRebuild(Gia_Man_t *p, Dsd_Manager_t *pManDsd, DdManager *ddNew)
void Gia_ManCollapseDeref(DdManager *dd, Vec_Ptr_t *vFuncs)
DdNode * Cudd_bddIthVar(DdManager *dd, int i)
#define Cudd_NotCond(node, c)
int Cudd_zddVarsFromBddVars(DdManager *dd, int multiplicity)
enum Dsd_Type_t_ Dsd_Type_t
void Cudd_AutodynEnable(DdManager *unique, Cudd_ReorderingType method)
void Gia_ManHashAlloc(Gia_Man_t *p)
int Abc_CountZddCubes(DdManager *dd, DdNode *zCover)
void Dsd_Decompose(Dsd_Manager_t *dMan, DdNode **pbFuncs, int nFuncs)
DECOMPOSITION FUNCTIONS ///.
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Dsd_Type_t Dsd_NodeReadType(Dsd_Node_t *p)
FUNCTION DEFINITIONS ///.
Dsd_Node_t * Dsd_NodeReadDec(Dsd_Node_t *p, int i)
static void Vec_IntClear(Vec_Int_t *p)
int Gia_ManFactorNode(Gia_Man_t *p, char *pSop, Vec_Int_t *vLeaves)
static void Vec_PtrShrink(Vec_Ptr_t *p, int nSizeNew)
int Gia_ManRebuildIsop(DdManager *dd, DdNode *bLocal, Gia_Man_t *pNew, Vec_Int_t *vFanins, Vec_Str_t *vSop, Vec_Str_t *vCube)
char * Abc_UtilStrsav(char *s)
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
int Gia_ManHashOr(Gia_Man_t *p, int iLit0, int iLit1)
void Dsd_NodeSetMark(Dsd_Node_t *p, int Mark)
static void ** Vec_PtrArray(Vec_Ptr_t *p)
int Cudd_SharingSize(DdNode **nodeArray, int n)
#define Gia_ManForEachCoId(p, Id, i)
static int Gia_ManObjNum(Gia_Man_t *p)
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)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
static int Gia_ManCoNum(Gia_Man_t *p)
static int Gia_ManRegNum(Gia_Man_t *p)