37 if ( fComp0 && fComp1 )
for ( w = 0; w <
nWords; w++ ) pSim[w] = ~(pSim0[w] | pSim1[w]);
38 else if ( fComp0 )
for ( w = 0; w <
nWords; w++ ) pSim[w] = ~pSim0[w] & pSim1[w];
39 else if ( fComp1 )
for ( w = 0; w <
nWords; w++ ) pSim[w] = pSim0[w] &~pSim1[w];
40 else for ( w = 0; w <
nWords; w++ ) pSim[w] = pSim0[w] & pSim1[w];
46 if ( fComp0 )
for ( w = 0; w <
nWords; w++ ) pSim[w] = ~pSim0[w];
47 else for ( w = 0; w <
nWords; w++ ) pSim[w] = pSim0[w];
53 if ( fComp0 )
for ( w = 0; w <
nWords; w++ ) pSim[w] = ~(
word)0;
54 else for ( w = 0; w <
nWords; w++ ) pSim[w] = 0;
60 if ( fComp0 )
for ( w = 0; w <
nWords; w++ ) pSim[w] |= ~pSim0[w];
61 else for ( w = 0; w <
nWords; w++ ) pSim[w] |= pSim0[w];
67 if ( t == 0 )
return -1;
68 if ( (t & 0x00000000FFFFFFFF) == 0 ) { n += 32; t >>= 32; }
69 if ( (t & 0x000000000000FFFF) == 0 ) { n += 16; t >>= 16; }
70 if ( (t & 0x00000000000000FF) == 0 ) { n += 8; t >>= 8; }
71 if ( (t & 0x000000000000000F) == 0 ) { n += 4; t >>= 4; }
72 if ( (t & 0x0000000000000003) == 0 ) { n += 2; t >>= 2; }
73 if ( (t & 0x0000000000000001) == 0 ) { n++; }
79 for ( w = 0; w <
nWords; w++ )
87 x = x - ((x >> 1) &
ABC_CONST(0x5555555555555555));
89 x = (x + (x >> 4)) &
ABC_CONST(0x0F0F0F0F0F0F0F0F);
93 return (
int)(x & 0xFF);
98 for ( w = 0; w <
nWords; w++ )
124 for ( i = 0; i < nObjs; i++ )
125 memcpy( pArray + 2*i*nWords, p->pArray + i*nWords,
sizeof(
word) * nWords );
126 ABC_FREE( p->pArray ); p->pArray = pArray;
127 p->nSize = p->nCap = 2*nWords*nObjs;
172 for ( w = 1; w <
nWords; w++ )
208 word * pSimPiCare, * pSimPiAig;
219 for ( w = 0; w <
nWords; w++ )
221 pSimPiAig[w] = pSimPiCare[w] | ~pCareMask[w];
223 pSimPiAig[w] = pSimPiCare[w] & pCareMask[w];
243 if ( p->
vSims == NULL )
250 word * pSim, * pSim0, * pSim1;
void Ssc_GiaSavePiPattern(Gia_Man_t *p, Vec_Int_t *vPat)
static word Ssc_Random1(int Bit)
word * Ssc_GiaGetCareMask(Gia_Man_t *p)
static word Ssc_Random2()
static int Gia_ManPoNum(Gia_Man_t *p)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
void Ssc_GiaResetPiPattern(Gia_Man_t *p, int nWords)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Abc_InfoHasBit(unsigned *p, int i)
static void Ssc_SimDup(word *pSim, word *pSim0, int nWords, int fComp0)
int Ssc_GiaCountCaresSim(Gia_Man_t *p)
static int Ssc_SimFindBit(word *pSim, int nWords)
void Ssc_GiaPrintPiPatterns(Gia_Man_t *p)
void Ssc_GiaSimRound(Gia_Man_t *p)
static int Vec_WrdSize(Vec_Wrd_t *p)
static word * Gia_ObjSimPi(Gia_Man_t *p, int PiId)
static int Ssc_SimCountBits(word *pSim, int nWords)
unsigned Gia_ManRandom(int fReset)
FUNCTION DEFINITIONS ///.
#define Gia_ManForEachCi(p, pObj, i)
static int Ssc_SimCountBitsWord(word x)
static ABC_NAMESPACE_IMPL_START word Ssc_Random()
DECLARATIONS ///.
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Ssc_SimConst(word *pSim, int nWords, int fComp0)
void Vec_WrdDoubleSimInfo(Vec_Wrd_t *p, int nObjs)
FUNCTION DEFINITIONS ///.
static void Vec_WrdFill(Vec_Wrd_t *p, int nSize, word Fill)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
static void Ssc_SimAnd(word *pSim, word *pSim0, word *pSim1, int nWords, int fComp0, int fComp1)
#define Gia_ManForEachAnd(p, pObj, i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Vec_Int_t * Ssc_GiaFindPivotSim(Gia_Man_t *p)
static Vec_Wrd_t * Vec_WrdAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
static void Abc_InfoSetBit(unsigned *p, int i)
static Vec_Wrd_t * Vec_WrdStart(int nSize)
static int Gia_ManCiNum(Gia_Man_t *p)
static int Vec_IntSize(Vec_Int_t *p)
void Ssc_GiaResetSimInfo(Gia_Man_t *p)
Vec_Int_t * Ssc_GiaGetOneSim(Gia_Man_t *p)
static word * Gia_ObjSimObj(Gia_Man_t *p, Gia_Obj_t *pObj)
static void Ssc_SimOr(word *pSim, word *pSim0, int nWords, int fComp0)
#define ABC_CONST(number)
PARAMETERS ///.
#define ABC_CALLOC(type, num)
static word * Gia_ObjSim(Gia_Man_t *p, int Id)
static int Ssc_SimFindBitWord(word t)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static int Gia_ManPiNum(Gia_Man_t *p)
void Ssc_GiaRandomPiPattern(Gia_Man_t *p, int nWords, Vec_Int_t *vPivot)
#define Gia_ManForEachPo(p, pObj, i)
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
static int Gia_ObjSimWords(Gia_Man_t *p)
static int Gia_ManObjNum(Gia_Man_t *p)
int Ssc_GiaTransferPiPattern(Gia_Man_t *pAig, Gia_Man_t *pCare, Vec_Int_t *vPivot)
#define ABC_FALLOC(type, num)
int Ssc_GiaEstimateCare(Gia_Man_t *p, int nWords)