91 Abc_Print( 1,
"Simulator could not allocate %.2f GB for simulation info.\n",
99 Abc_Print( 1,
"Memory: AIG = %7.2f MB. SimInfo = %7.2f MB.\n",
122 for ( w = p->nWords-1; w >= 0; w-- )
140 for ( w = p->nWords-1; w >= 0; w-- )
158 for ( w = p->nWords-1; w >= 0; w-- )
176 for ( w = p->nWords-1; w >= 0; w-- )
177 pInfo[w] = pInfo0[w];
197 for ( w = p->nWords-1; w >= 0; w-- )
198 pInfo[w] = ~pInfo0[w];
200 for ( w = p->nWords-1; w >= 0; w-- )
201 pInfo[w] = pInfo0[w];
224 for ( w = p->nWords-1; w >= 0; w-- )
225 pInfo[w] = ~(pInfo0[w] | pInfo1[w]);
227 for ( w = p->nWords-1; w >= 0; w-- )
228 pInfo[w] = ~pInfo0[w] & pInfo1[w];
233 for ( w = p->nWords-1; w >= 0; w-- )
234 pInfo[w] = pInfo0[w] & ~pInfo1[w];
236 for ( w = p->nWords-1; w >= 0; w-- )
237 pInfo[w] = pInfo0[w] & pInfo1[w];
255 unsigned * pInfo0, * pInfo1;
312 for ( w = 0; w <
nWords; w++ )
313 if ( p0[w] != p1[w] )
319 for ( w = 0; w <
nWords; w++ )
320 if ( p0[w] != ~p1[w] )
342 for ( w = 0; w <
nWords; w++ )
349 for ( w = 0; w <
nWords; w++ )
369 int Repr =
GIA_VOID, EntPrev = -1, Ent, i;
404 unsigned * pSim0, * pSim1;
443 1291, 1699, 1999, 2357, 2953, 3313, 3907, 4177,
444 4831, 5147, 5647, 6343, 6899, 7103, 7873, 8147 };
448 for ( i = 0; i <
nWords; i++ )
449 uHash ^= ~pSim[i] * s_Primes[i & 0xf];
451 for ( i = 0; i <
nWords; i++ )
452 uHash ^= pSim[i] * s_Primes[i & 0xf];
453 return (
int)(uHash % nTableSize);
471 int * pTable, nTableSize, i, k, Key;
480 if ( pTable[Key] == 0 )
559 for ( w = 0; w < p->nWords; w++ )
615 for ( f = 0; f <= iFrame; f++, Counter += p->nPis )
618 for ( w = nWords-1; w >= 0; w-- )
643 int i, RetValue = 0, iOut, iPat;
651 for ( i = 0; i < pPars->
nIters; i++ )
666 Abc_Print( 1,
"Output %d of miter \"%s\" was asserted in frame %d. ", iOut, pAig->
pName, i );
670 Abc_Print( 1,
"\nGenerated counter-example is INVALID. " );
690 if ( i < pPars->nIters - 1 )
695 Abc_Print( 1,
"No bug detected after simulating %d frames with %d words. ", i, pPars->
nWords );
static void Gia_Sim2SimulateRound(Gia_Sim2_t *p)
static void Gia_Sim2InfoTransfer(Gia_Sim2_t *p)
static int Gia_Sim2InfoIsZero(Gia_Sim2_t *p, unsigned *pInfo)
void Gia_Sim2Delete(Gia_Sim2_t *p)
FUNCTION DEFINITIONS ///.
static int Abc_PrimeCudd(unsigned int p)
int Gia_Sim2ClassRefineOne(Gia_Sim2_t *p, int i)
static int Gia_ObjPhase(Gia_Obj_t *pObj)
#define Gia_ManForEachCo(p, pObj, i)
int Gia_ManVerifyCex(Gia_Man_t *pAig, Abc_Cex_t *p, int fDualOut)
DECLARATIONS ///.
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
void Gia_Sim2InfoRefineEquivs(Gia_Sim2_t *p)
static void Gia_Sim2InfoOne(Gia_Sim2_t *p, unsigned *pInfo)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Abc_InfoHasBit(unsigned *p, int i)
ABC_NAMESPACE_IMPL_START Abc_Cex_t * Abc_CexAlloc(int nRegs, int nRealPis, int nFrames)
DECLARATIONS ///.
int Gia_Sim2CompareEqual(unsigned *p0, unsigned *p1, int nWords, int fCompl)
static int Gia_WordFindFirstBit(unsigned uWord)
static int Gia_ObjValue(Gia_Obj_t *pObj)
static void Gia_Sim2InfoZero(Gia_Sim2_t *p, unsigned *pInfo)
#define ABC_ALLOC(type, num)
static abctime Abc_Clock()
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
Gia_Sim2_t * Gia_Sim2Create(Gia_Man_t *pAig, Gia_ParSim_t *pPars)
void Gia_Sim2ProcessRefined(Gia_Sim2_t *p, Vec_Int_t *vRefined)
unsigned Gia_ManRandom(int fReset)
FUNCTION DEFINITIONS ///.
static unsigned * Gia_Sim2Data(Gia_Sim2_t *p, int i)
#define Gia_ManForEachRiRo(p, pObjRi, pObjRo, i)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static void Gia_Sim2SimulateCo(Gia_Sim2_t *p, Gia_Obj_t *pObj)
static void Gia_ObjSetRepr(Gia_Man_t *p, int Id, int Num)
static int s_Primes[MAX_PRIMES]
int Gia_Sim2CompareZero(unsigned *p0, int nWords, int fCompl)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Gia_Sim2SimulateNode(Gia_Sim2_t *p, Gia_Obj_t *pObj)
Abc_Cex_t * Gia_Sim2GenerateCounter(Gia_Man_t *pAig, int iFrame, int iOut, int nWords, int iPat)
int Gia_ManEquivCountLitsAll(Gia_Man_t *p)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static void Gia_Sim2InfoRandom(Gia_Sim2_t *p, unsigned *pInfo)
static int Gia_ObjIsConst(Gia_Man_t *p, int Id)
#define ABC_NAMESPACE_IMPL_END
#define Gia_ClassForEachObj1(p, i, iObj)
int Gia_Sim2HashKey(unsigned *pSim, int nWords, int nTableSize)
#define Gia_ManForEachAnd(p, pObj, i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static void Vec_IntFreeP(Vec_Int_t **p)
#define Gia_ManForEachPi(p, pObj, i)
static void Abc_Print(int level, const char *format,...)
static int Gia_ObjNext(Gia_Man_t *p, int Id)
#define ABC_NAMESPACE_IMPL_START
static void Gia_ObjSetNext(Gia_Man_t *p, int Id, int Num)
static void Abc_InfoSetBit(unsigned *p, int i)
typedefABC_NAMESPACE_IMPL_START struct Gia_Sim2_t_ Gia_Sim2_t
DECLARATIONS ///.
static int Vec_IntSize(Vec_Int_t *p)
static int Gia_Sim2CheckPos(Gia_Sim2_t *p, int *piPo, int *piPat)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
#define ABC_CALLOC(type, num)
void Gia_ManResetRandom(Gia_ParSim_t *pPars)
#define Gia_ManForEachClass(p, i)
#define Gia_ManForEachRo(p, pObj, i)
void Gia_ManSetPhase(Gia_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
#define Gia_ManForEachObj1(p, pObj, i)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
static int Gia_ManPiNum(Gia_Man_t *p)
static void Vec_IntClear(Vec_Int_t *p)
int Gia_ManSimSimulateEquiv(Gia_Man_t *pAig, Gia_ParSim_t *pPars)
void Gia_Sim2ClassCreate(Gia_Man_t *p, Vec_Int_t *vClass)
#define Gia_ManForEachPo(p, pObj, i)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
static int Gia_ManObjNum(Gia_Man_t *p)
static int Gia_ObjRepr(Gia_Man_t *p, int Id)
static void Gia_Sim2InfoCopy(Gia_Sim2_t *p, unsigned *pInfo, unsigned *pInfo0)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
static int Gia_ManRegNum(Gia_Man_t *p)