70 if ( pObj->
pEquiv == NULL )
99 assert( p->pHaig == NULL );
104 printf(
"Starting : " );
115 p->pHaig->pData = vLatches;
141 assert( p->pHaig != NULL );
145 pNew->pHaig = p->pHaig;
163 assert( p->pHaig != NULL );
186 assert( p->pHaig != NULL );
224 if ( pObjNew == pObjOld )
249 Ivy_Obj_t * pObjOldHaigR, * pObjNewHaigR;
253 assert( p->pHaig != NULL );
256 pObjOldHaig = pObjOld->
pEquiv;
267 if ( pObjOldHaigR == pObjNewHaigR )
280 p->pHaig->nClassesSkip++;
287 if ( pObjOldHaigR->
pEquiv == NULL )
291 pObjOldHaigR->
pEquiv = pObjNewHaigR;
320 int nChoices, nChoiceNodes,
Counter, i;
321 assert( p->pHaig != NULL );
322 nChoices = nChoiceNodes = 0;
330 nChoiceNodes += (int)(Counter > 1);
331 nChoices += Counter - 1;
335 *pnChoices = nChoices;
352 int nChoices, nChoiceNodes;
354 assert( p->pHaig != NULL );
358 printf(
"Final : " );
365 printf(
"Total choice nodes = %d. Total choices = %d. Skipped classes = %d.\n",
366 nChoiceNodes, nChoices, p->pHaig->nClassesSkip );
372 printf(
"HAIG is acyclic\n" );
375 printf(
"HAIG contains a cycle\n" );
419 printf(
"Compatibility fails.\n" );
442 Vec_Int_t * vNodes, * vLatches, * vLatchesD;
452 assert( p->pHaig != NULL );
457 printf(
"Setting PI %d\n", pObj->
Id );
480 for ( k = 0; k < 10; k++ )
486 printf(
"Iter %d : Non-determinate = %d\n", k, Counter );
500 printf(
"Processing choice node %d\n", pObj->
Id );
506 printf(
"Processing secondary node %d\n", pTemp->
Id );
519 printf(
"Using latch %d with fanin %d\n", pObj->
Id,
Ivy_ObjFanin0(pObj)->Id );
Ivy_Obj_t * Ivy_Latch(Ivy_Man_t *p, Ivy_Obj_t *pObj, Ivy_Init_t Init)
static int Ivy_IsComplement(Ivy_Obj_t *p)
int Ivy_ManIsAcyclic(Ivy_Man_t *p)
static Ivy_Init_t Ivy_ManHaigSimulateAnd(Ivy_Init_t In0, Ivy_Init_t In1)
void Ivy_ManHaigStart(Ivy_Man_t *p, int fVerbose)
FUNCTION DEFINITIONS ///.
int Ivy_ManHaigCountChoices(Ivy_Man_t *p, int *pnChoices)
static Ivy_Obj_t * Ivy_ManConst1(Ivy_Man_t *p)
static Ivy_Obj_t * Ivy_ManPi(Ivy_Man_t *p, int i)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define Ivy_ManForEachPi(p, pObj, i)
ITERATORS ///.
void Ivy_ManHaigPostprocess(Ivy_Man_t *p, int fVerbose)
static int Ivy_ObjIsTerm(Ivy_Obj_t *pObj)
static Ivy_Init_t Ivy_ManHaigSimulateChoice(Ivy_Init_t In0, Ivy_Init_t In1)
#define Ivy_ManForEachLatch(p, pObj, i)
Ivy_Man_t * Ivy_ManDup(Ivy_Man_t *p)
static int Ivy_HaigObjCountClass(Ivy_Obj_t *pObj)
static Ivy_Init_t Ivy_InitNotCond(Ivy_Init_t Init, int fCompl)
void Ivy_ManStop(Ivy_Man_t *p)
static Ivy_Obj_t * Ivy_ObjFanin1(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjChild1Equiv(Ivy_Obj_t *pObj)
Vec_Int_t * Ivy_ManDfsSeq(Ivy_Man_t *p, Vec_Int_t **pvLatches)
static ABC_NAMESPACE_IMPL_START Ivy_Obj_t * Ivy_HaigObjRepr(Ivy_Obj_t *pObj)
DECLARATIONS ///.
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Ivy_ObjFaninC1(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjChild0Equiv(Ivy_Obj_t *pObj)
static int Ivy_ObjRefs(Ivy_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
void Ivy_ManHaigCreateChoice(Ivy_Man_t *p, Ivy_Obj_t *pObjOld, Ivy_Obj_t *pObjNew)
static Ivy_Obj_t * Ivy_Regular(Ivy_Obj_t *p)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static Ivy_Type_t Ivy_ObjType(Ivy_Obj_t *pObj)
static int Ivy_ObjIsNode(Ivy_Obj_t *pObj)
void Ivy_ManHaigSimulate(Ivy_Man_t *p)
void Ivy_ManHaigStop(Ivy_Man_t *p)
void Ivy_ManPrintStats(Ivy_Man_t *p)
int Ivy_ManCheckChoices(Ivy_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Ivy_Man_t_ Ivy_Man_t
INCLUDES ///.
#define ABC_NAMESPACE_IMPL_START
static int Ivy_ObjIsConst1(Ivy_Obj_t *pObj)
int Ivy_ObjIsInTfi_rec(Ivy_Obj_t *pObjNew, Ivy_Obj_t *pObjOld, int Levels)
void Ivy_ManHaigTrasfer(Ivy_Man_t *p, Ivy_Man_t *pNew)
static Ivy_Obj_t * Ivy_NotCond(Ivy_Obj_t *p, int c)
#define Ivy_ManForEachNodeVec(p, vIds, pObj, i)
static int Ivy_ObjIsCi(Ivy_Obj_t *pObj)
#define Ivy_ManForEachObj(p, pObj, i)
static void Vec_IntFree(Vec_Int_t *p)
void Ivy_ManHaigCreateObj(Ivy_Man_t *p, Ivy_Obj_t *pObj)
static int Ivy_ObjFaninC0(Ivy_Obj_t *pObj)
Ivy_Obj_t * Ivy_And(Ivy_Man_t *p, Ivy_Obj_t *p0, Ivy_Obj_t *p1)