76 pEntry->Type = pObj->
Type;
113 pObj->pData[0] = ~(pObj0->pData[0] | pObj1->pData[0]);
115 pObj->pData[0] = (~pObj0->pData[0] & pObj1->pData[0]);
117 pObj->pData[0] = (pObj0->pData[0] & ~pObj1->pData[0]);
119 pObj->pData[0] = (pObj0->pData[0] & pObj1->pData[0]);
156 pObj->pData[0] = ~pObj0->pData[0];
158 pObj->pData[0] = pObj0->pData[0];
176 for ( f = 0; f < nFrames; f++ )
178 for ( pEntry = pAig; pEntry->Type !=
AIG_OBJ_VOID; pEntry++ )
186 if ( pEntry->iFan0 == 0 )
192 pEntry->pData[0] = ~0;
214 int nTotal = 32 * nSimWords;
215 return (
float)2.0 * nOnes / nTotal * (nTotal - nOnes) / nTotal;
231 int nTotal = 32 * nSimWords;
232 return (
float)nOnes /
nTotal;
248 int nTotal = 32 * nSimWords;
250 return (
float)(nTotal-nOnes) / nTotal;
252 return (
float)nOnes /
nTotal;
274 pSwitching = (
float *)vSwitching->pArray;
283 nFramesReal = nFrames;
286 if ( nFramesReal <= nPref )
288 printf(
"The total number of frames (%d) should exceed prefix (%d).\n", nFramesReal, nPref );\
289 printf(
"Setting the total number of frames to be %d.\n", nFrames );
290 nFramesReal = nFrames;
297 for ( pEntry = pAig; pEntry->Type !=
AIG_OBJ_VOID; pEntry++ )
370 p->
nBytes = 2*(2*nNodes + nOuts);
429 *p->
pCur++ = (x & 0x7f) | 0x80;
450 for ( i = 0; (ch = *p->
pCur++) & 0x80; i++ )
451 x |= (ch & 0x7f) << (7 * i);
452 return x | (ch << (7 * i));
487 if ( p->
iPrev == -1 )
489 else if ( p->
iPrev <= iFan0 )
528 if ( p->
iPrev == -1 )
560 printf(
"\nBytes alloc = %5d. Bytes used = %7d. Ave per node = %4.2f. \n",
float Saig_ManComputeSwitching(int nOnes, int nSimWords)
static int Aig_ObjFaninId0(Aig_Obj_t *pObj)
static int Saig_ObjIsLo(Aig_Man_t *p, Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
static void Saig_ManSimulateNode(Saig_SimObj_t *pAig, Saig_SimObj_t *pObj)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static Aig_Obj_t * Saig_ObjLoToLi(Aig_Man_t *p, Aig_Obj_t *pObj)
void Aig_CManAddNode(Aig_CMan_t *p, int iFan0, int iFan1)
Aig_CMan_t * Aig_CManStart(int nIns, int nNodes, int nOuts)
static int Saig_SimObjFaninC1(Saig_SimObj_t *pObj)
#define Aig_ManForEachCo(p, pObj, i)
#define ABC_ALLOC(type, num)
float Saig_ManComputeProbOne(int nOnes, int nSimWords)
unsigned Aig_ManRandom(int fReset)
static abctime Abc_Clock()
static int Aig_ObjFaninId1(Aig_Obj_t *pObj)
int Aig_CManGetPo(Aig_CMan_t *p)
static int Aig_ManNodeNum(Aig_Man_t *p)
static int Saig_SimObjFanin0(Saig_SimObj_t *pObj)
float Saig_ManComputeProbOnePlus(int nOnes, int nSimWords, int fCompl)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static int Aig_ManCoNum(Aig_Man_t *p)
static Vec_Int_t * Vec_IntStart(int nSize)
static int Aig_WordCountOnes(unsigned uWord)
Vec_Int_t * Saig_ManComputeSwitchProb4s(Aig_Man_t *p, int nFrames, int nPref, int fProbOne)
typedefABC_NAMESPACE_IMPL_START struct Saig_SimObj_t_ Saig_SimObj_t
DECLARATIONS ///.
#define Aig_ManForEachNode(p, pObj, i)
static int Saig_SimObjFanin1(Saig_SimObj_t *pObj)
void Saig_ManSimulateFrames(Saig_SimObj_t *pAig, int nFrames, int nPref)
static int Aig_ManCiNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
static int Saig_SimObjFaninC0(Saig_SimObj_t *pObj)
void Aig_CManStop(Aig_CMan_t *p)
Saig_SimObj_t * Saig_ManCreateMan(Aig_Man_t *p)
FUNCTION DEFINITIONS ///.
int Aig_CManRestoreNum(Aig_CMan_t *p)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static int Aig_ManObjNumMax(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
void Aig_CManGetNode(Aig_CMan_t *p, int *piFan0, int *piFan1)
Aig_CMan_t * Aig_CManCreate(Aig_Man_t *p)
#define Aig_ManForEachObj(p, pObj, i)
void Aig_CManStoreNum(Aig_CMan_t *p, unsigned x)
static void Saig_ManSimulateNode2(Saig_SimObj_t *pAig, Saig_SimObj_t *pObj)
#define ABC_CALLOC(type, num)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
ABC_DLL char * Abc_FrameReadFlag(char *pFlag)
static void Saig_ManSimulateOneInput(Saig_SimObj_t *pAig, Saig_SimObj_t *pObj)
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
int nTotal
DECLARATIONS ///.
void Aig_CManAddPo(Aig_CMan_t *p, int iFan0)
void Aig_CManRestart(Aig_CMan_t *p)