169 unsigned * pInfo, * pInfo2;
175 for ( w = 0; w < p->
nWords; w++ )
176 pInfo[w] = pInfo2[w];
193 unsigned * pInfo, * pInfo1, * pInfo2;
194 int k, fComp1, fComp2;
202 if ( fComp1 && fComp2 )
203 for ( k = 0; k < nSimWords; k++ )
204 pInfo[k] = ~pInfo1[k] & ~pInfo2[k];
205 else if ( fComp1 && !fComp2 )
206 for ( k = 0; k < nSimWords; k++ )
207 pInfo[k] = ~pInfo1[k] & pInfo2[k];
208 else if ( !fComp1 && fComp2 )
209 for ( k = 0; k < nSimWords; k++ )
210 pInfo[k] = pInfo1[k] & ~pInfo2[k];
212 for ( k = 0; k < nSimWords; k++ )
213 pInfo[k] = pInfo1[k] & pInfo2[k];
229 unsigned * pInfo, * pInfo1;
237 for ( k = 0; k < nSimWords; k++ )
238 pInfo[k] = ~pInfo1[k];
240 for ( k = 0; k < nSimWords; k++ )
241 pInfo[k] = pInfo1[k];
280 unsigned * pInfoCare, * pInfoNode;
284 for ( i = 0; i < p->
nPats; i++ )
329 assert( nPats > 0 && nPats < nWords * 8 * (
int)
sizeof(
unsigned) );
331 if ( nPats < 8 *
sizeof(
unsigned) )
335 pInfo[0] |= ((~0) << nPats);
336 nPats = 8 *
sizeof(unsigned);
339 iWords = nPats / (8 *
sizeof(unsigned));
342 for ( w = iWords; w <
nWords; w++ )
360 unsigned * pInfo, * pInfo2;
367 for ( j = 0; j < p->
nPats; j++ )
368 for ( w = 0; w < p->
nWords; w++ )
369 *pInfo2++ = pInfo[w];
386 unsigned * pInfo, * pInfo2;
393 for ( j = 0; j < p->
nPats; j++, pInfo2 += p->
nWords )
395 for ( w = 0; w < p->
nWords; w++ )
396 pInfo2[w] = ~pInfo2[w];
413 unsigned * pInfoCare, * pInfoNode;
414 int i, nDcs, nOnes, nZeros;
417 nDcs = nOnes = nZeros = 0;
418 for ( i = 0; i < p->
nPats; i++ )
432 printf(
"On = %3d (%7.2f %%) ", nOnes, 100.0*nOnes/p->
nPats );
433 printf(
"Off = %3d (%7.2f %%) ", nZeros, 100.0*nZeros/p->
nPats );
434 printf(
"Dc = %3d (%7.2f %%) ", nDcs, 100.0*nDcs/p->
nPats );
435 printf(
"P0 = %3d ", p->
nPats0 );
436 printf(
"P1 = %3d ", p->
nPats1 );
483 for ( Limit = 0; Limit < 10; Limit++ )
void Res_SimReportOne(Res_Sim_t *p)
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
void Res_SimTransferOne(Abc_Obj_t *pNode, Vec_Ptr_t *vSimInfo, int nSimWords)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
static int Abc_ObjFaninC1(Abc_Obj_t *pObj)
static int Abc_InfoHasBit(unsigned *p, int i)
void Res_SimSetRandom(Res_Sim_t *p)
void Res_SimAdjust(Res_Sim_t *p, Abc_Ntk_t *pAig)
void Res_SimSetGiven(Res_Sim_t *p, Vec_Ptr_t *vInfo)
static void Abc_InfoFill(unsigned *p, int nWords)
static int Abc_ObjFaninC0(Abc_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
static int Abc_ObjFaninId0(Abc_Obj_t *pObj)
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
#define Abc_AigForEachAnd(pNtk, pNode, i)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
void Res_SimFree(Res_Sim_t *p)
void Res_SimDeriveInfoReplicate(Res_Sim_t *p)
void Res_SimProcessPats(Res_Sim_t *p)
int Res_SimPrepare(Res_Sim_t *p, Abc_Ntk_t *pAig, int nTruePis, int fVerbose)
#define ABC_NAMESPACE_IMPL_END
static Vec_Vec_t * Vec_VecStart(int nSize)
static void Abc_InfoClear(unsigned *p, int nWords)
void Res_SimPrintOutPatterns(Res_Sim_t *p, Abc_Ntk_t *pAig)
ABC_NAMESPACE_IMPL_START Res_Sim_t * Res_SimAlloc(int nWords)
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static void Abc_InfoSetBit(unsigned *p, int i)
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
void Extra_PrintBinary(FILE *pFile, unsigned Sign[], int nBits)
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
void Res_SimDeriveInfoComplement(Res_Sim_t *p)
void Res_SimPerformRound(Res_Sim_t *p)
void Res_SimPerformOne(Abc_Obj_t *pNode, Vec_Ptr_t *vSimInfo, int nSimWords)
void Res_SimPadSimInfo(Vec_Ptr_t *vPats, int nPats, int nWords)
static void Abc_InfoRandom(unsigned *p, int nWords)
static int Abc_ObjFaninId1(Abc_Obj_t *pObj)
#define Abc_NtkForEachPo(pNtk, pPo, i)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static Vec_Ptr_t * Vec_PtrAllocSimInfo(int nEntries, int nWords)
#define Abc_NtkForEachPi(pNtk, pPi, i)
static void Vec_PtrFree(Vec_Ptr_t *p)