45 static inline int Gia_ManHashOne(
int iLit0,
int iLit1,
int iLitC,
int TableSize )
47 unsigned Key = iLitC * 2011;
52 return (
int)(Key % TableSize);
84 iLit0 ^= iLit1, iLit1 ^= iLit0, iLit0 ^= iLit1;
162 int * pHTableOld, * pPlace;
163 int nHTableOld, iNext,
Counter, Counter2, i;
172 for ( i = 0; i < nHTableOld; i++ )
174 iNext = (pThis? pThis->
Value : 0);
176 iNext = (pThis? pThis->
Value : 0) )
186 assert( Counter == Counter2 );
210 for ( i = 0; i < Limit; i++ )
218 printf(
"%d ", Counter );
340 Gia_Obj_t * pNode0, * pNode1, * pFanA, * pFanB, * pFanC, * pFanD;
363 if ( pFanA == p1 || pFanB == p1 )
379 if ( pFanC == p0 || pFanD == p0 )
386 if ( pFanA == pFanC || pFanB == pFanC )
388 if ( pFanB == pFanC || pFanB == pFanD )
390 if ( pFanA == pFanD || pFanB == pFanD )
392 if ( pFanA == pFanC || pFanA == pFanD )
399 if ( pFanB == pFanC || pFanB == pFanD )
401 if ( pFanA == pFanC || pFanA == pFanD )
408 if ( pFanD == pFanA || pFanD == pFanB )
410 if ( pFanC == pFanA || pFanC == pFanB )
415 if ( pFanA == pFanD && pFanB ==
Gia_Not(pFanC) )
417 if ( pFanB == pFanC && pFanA ==
Gia_Not(pFanD) )
419 if ( pFanA == pFanC && pFanB ==
Gia_Not(pFanD) )
421 if ( pFanB == pFanD && pFanA ==
Gia_Not(pFanC) )
473 if ( iLit0 == iLit1 )
480 iLit0 ^= iLit1, iLit1 ^= iLit0, iLit0 ^= iLit1;
522 return iLitC ? iLit1 : iLit0;
527 assert( iLit0 > 1 && iLit1 > 1 && iLitC > 1 );
528 if ( iLit0 == iLit1 )
530 if ( iLitC == iLit0 || iLitC ==
Abc_LitNot(iLit1) )
532 if ( iLitC == iLit1 || iLitC ==
Abc_LitNot(iLit0) )
537 iLit0 ^= iLit1, iLit1 ^= iLit0, iLit0 ^= iLit1, iLitC =
Abc_LitNot(iLitC);
575 return iLit0 ? iLit1 : 0;
577 return iLit1 ? iLit0 : 0;
578 if ( iLit0 == iLit1 )
591 iLit0 ^= iLit1, iLit1 ^= iLit0, iLit0 ^= iLit1;
607 return *pPlace = iNode;
630 return iLit0 ? iLit1 : 0;
632 return iLit1 ? iLit0 : 0;
633 if ( iLit0 == iLit1 )
638 iLit0 ^= iLit1, iLit1 ^= iLit0, iLit0 ^= iLit1;
679 int iTemp0, iTemp1, fCompl = 0;
680 if ( iData0 > iData1 )
681 iData0 ^= iData1, iData1 ^= iData0, iData0 ^= iData1, iCtrl =
Abc_LitNot(iCtrl);
769 int i, k = 0, Lit1, Lit2, LitRes;
static int Gia_ObjToLit(Gia_Man_t *p, Gia_Obj_t *pObj)
int Gia_ManHashMaj(Gia_Man_t *p, int iData0, int iData1, int iData2)
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
static Gia_Obj_t * Gia_ObjChild0(Gia_Obj_t *pObj)
static int Gia_ObjFaninLit0(Gia_Obj_t *pObj, int ObjId)
static int Gia_ObjFaninLit2(Gia_Man_t *p, int ObjId)
static int Abc_PrimeCudd(unsigned int p)
static int Gia_ManAppendMuxReal(Gia_Man_t *p, int iLitC, int iLit1, int iLit0)
static Gia_Obj_t * Gia_ManAddStrash(Gia_Man_t *p, Gia_Obj_t *p0, Gia_Obj_t *p1)
void Gia_ManStop(Gia_Man_t *p)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static Gia_Obj_t * Gia_Regular(Gia_Obj_t *p)
static int Gia_ObjFaninLit2p(Gia_Man_t *p, Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ObjFromLit(Gia_Man_t *p, int iLit)
static int Gia_ObjFaninLit0p(Gia_Man_t *p, Gia_Obj_t *pObj)
int Gia_ManHashMux(Gia_Man_t *p, int iCtrl, int iData1, int iData0)
static int Gia_ManAppendCi(Gia_Man_t *p)
void Gia_ManCleanValue(Gia_Man_t *p)
static int Abc_Var2Lit(int Var, int fCompl)
static Gia_Obj_t * Gia_ObjRecognizeMuxTwo(Gia_Obj_t *pNode0, Gia_Obj_t *pNode1, Gia_Obj_t **ppNodeT, Gia_Obj_t **ppNodeE)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
int Gia_ManHashAndMulti(Gia_Man_t *p, Vec_Int_t *vLits)
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static int Abc_LitNotCond(int Lit, int c)
static Gia_Obj_t * Gia_ObjChild1(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_Not(Gia_Obj_t *p)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Gia_ManAndNum(Gia_Man_t *p)
int Gia_ManHashMuxReal(Gia_Man_t *p, int iLitC, int iLit1, int iLit0)
static int Abc_MinInt(int a, int b)
static int Abc_LitIsCompl(int Lit)
static int * Gia_ManHashFind(Gia_Man_t *p, int iLit0, int iLit1, int iLitC)
static Gia_Obj_t * Gia_ManHashAndP(Gia_Man_t *p, Gia_Obj_t *p0, Gia_Obj_t *p1)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
void Gia_ManHashAlloc(Gia_Man_t *p)
static int Gia_ObjFaninLit1(Gia_Obj_t *pObj, int ObjId)
int Gia_ManHashXorReal(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define ABC_NAMESPACE_IMPL_END
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define Gia_ManForEachAnd(p, pObj, i)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManHashProfile(Gia_Man_t *p)
static ABC_NAMESPACE_IMPL_START int Gia_ManHashOne(int iLit0, int iLit1, int iLitC, int TableSize)
DECLARATIONS ///.
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
static int Vec_IntEntryLast(Vec_Int_t *p)
static int Abc_LitNot(int Lit)
void Gia_ManHashResize(Gia_Man_t *p)
static int Vec_IntSize(Vec_Int_t *p)
static int Gia_IsComplement(Gia_Obj_t *p)
void Gia_ManHashStop(Gia_Man_t *p)
static void Vec_IntShrink(Vec_Int_t *p, int nSizeNew)
int Gia_ManHashLookup(Gia_Man_t *p, Gia_Obj_t *p0, Gia_Obj_t *p1)
int Gia_ManHashAndTry(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ManBufNum(Gia_Man_t *p)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
int Gia_ManHashOr(Gia_Man_t *p, int iLit0, int iLit1)
#define ABC_CALLOC(type, num)
static int Abc_Lit2Var(int Lit)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
static int Abc_LitRegular(int Lit)
static int Gia_ObjFaninLit1p(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
void Gia_ManHashStart(Gia_Man_t *p)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
char * Abc_UtilStrsav(char *s)
static int Gia_ManAppendXorReal(Gia_Man_t *p, int iLit0, int iLit1)
Gia_Man_t * Gia_ManRehash(Gia_Man_t *p, int fAddStrash)
static int Gia_ManObjNum(Gia_Man_t *p)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ManRegNum(Gia_Man_t *p)