126 p->nPis1 = p->nPis + 1;
127 p->nCis1 = p->nCis + 1;
128 p->nCisNos1 = p->nCis + p->nNos + 1;
129 p->nCisNosPos1 = p->nCis + p->nNos + p->nPos + 1;
130 p->nObjs = p->nCis + p->nNos + p->nCos + 1;
159 assert( iWord == p->nWords );
239 return (uOld << 16) | (uNew & 0xffff);
256 unsigned * pSimInfo =
ABC_ALLOC(
unsigned, p->nObjs );
262 for ( f = 0; f < nFrames; f++ )
266 for ( i = 1; i < p->nPis1; i++ )
268 for ( ; i < p->nCis1; i++ )
273 for ( i = 1; i < p->nPis1; i++ )
275 for ( ; i < p->nCis1; i++ )
278 for ( ; i < p->nCisNos1; i++ )
280 for ( ; i < p->nObjs; i++ )
286 for ( i = 0; i < p->nObjs; i++ )
287 pNumOnes[i] +=
Aig_WordCountOnes( (pSimInfo[i] ^ (pSimInfo[i] >> 16)) & 0xffff );
291 for ( i = 0; i < p->nObjs; i++ )
312 int nTotal = 32 * nSimWords;
313 return (
float)2.0 * nOnes / nTotal * (nTotal - nOnes) / nTotal;
329 int nTotal = 32 * nSimWords;
330 return (
float)nOnes /
nTotal;
356 pSwitching = (
float *)vSwitching->pArray;
364 nFramesReal = nFrames;
367 if ( nFramesReal <= nPref )
369 printf(
"The total number of frames (%d) should exceed prefix (%d).\n", nFramesReal, nPref );
370 printf(
"Setting the total number of frames to be %d.\n", nFrames );
371 nFramesReal = nFrames;
390 assert( Counter == pAig->nObjs );
404 assert( Counter == pAig->nObjs );
418 assert( Counter == pAig->nObjs );
Vec_Int_t * Faig_ManComputeSwitchProbs4(Aig_Man_t *p, int nFrames, int nPref, int fProbOne)
static int Aig_ObjFaninId0(Aig_Obj_t *pObj)
static unsigned Faig_SimulateTransferShift(unsigned uOld, unsigned uNew)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
float Faig_ManComputeSwitching(int nOnes, int nSimWords)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
typedefABC_NAMESPACE_IMPL_START struct Faig_Man_t_ Faig_Man_t
DECLARATIONS ///.
int Faig_ManIsCorrect(Aig_Man_t *pAig)
FUNCTION DEFINITIONS ///.
static int Faig_CheckIdLo(Faig_Man_t *p, int i)
Vec_Int_t * Saig_ManComputeSwitchProb3s(Aig_Man_t *p, int nFrames, int nPref, int fProbOne)
float Faig_ManComputeProbOne(int nOnes, int nSimWords)
static int Faig_CheckIdObj(Faig_Man_t *p, int i)
static int Faig_ObjLoToLi(Faig_Man_t *p, int i)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static unsigned Faig_SimulateCo(Faig_Man_t *p, int Id, unsigned *pSimInfo)
#define Aig_ManForEachCo(p, pObj, i)
#define ABC_ALLOC(type, num)
static int Faig_ObjLiToLo(Faig_Man_t *p, int i)
unsigned Aig_ManRandom(int fReset)
static abctime Abc_Clock()
static int Aig_ObjFaninId1(Aig_Obj_t *pObj)
static int Faig_ObjFaninC(int iFan)
static int Aig_ManNodeNum(Aig_Man_t *p)
static int Faig_CheckIdLi(Faig_Man_t *p, int i)
static int Faig_ObjIdToNumLo(Faig_Man_t *p, int i)
static int Aig_ManCoNum(Aig_Man_t *p)
static int Faig_ObjIdToNumCo(Faig_Man_t *p, int i)
static Vec_Int_t * Vec_IntStart(int nSize)
static int Aig_WordCountOnes(unsigned uWord)
#define Aig_ManForEachNode(p, pObj, i)
static unsigned Faig_SimulateRandomShift(unsigned uOld)
static int Faig_NodeChild0(Faig_Man_t *p, int n)
static int Aig_ManCiNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
static int Faig_ObjIdToNumLi(Faig_Man_t *p, int i)
Faig_Man_t * Faig_ManAlloc(Aig_Man_t *pAig)
static int Faig_CheckIdPo(Faig_Man_t *p, int i)
static int Faig_NodeChild1(Faig_Man_t *p, int n)
static int Faig_ObjIdToNumNo(Faig_Man_t *p, int i)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static int Aig_ManObjNumMax(Aig_Man_t *p)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static int Aig_ManRegNum(Aig_Man_t *p)
static int Faig_CheckIdNo(Faig_Man_t *p, int i)
#define ABC_CALLOC(type, num)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
static int Faig_ObjFanin(int iFan)
ABC_DLL char * Abc_FrameReadFlag(char *pFlag)
static int Faig_CheckIdCo(Faig_Man_t *p, int i)
static int Faig_ObjIdToNumPo(Faig_Man_t *p, int i)
static int Faig_CoChild0(Faig_Man_t *p, int n)
Faig_Man_t * Faig_ManCreate(Aig_Man_t *pAig)
int * Faig_ManSimulateFrames(Faig_Man_t *p, int nFrames, int nPref, int fTrans)
static int Faig_CheckIdPi(Faig_Man_t *p, int i)
int nTotal
DECLARATIONS ///.
static int Faig_ObjIdToNumPi(Faig_Man_t *p, int i)
static unsigned Faig_SimulateNode(Faig_Man_t *p, int Id, unsigned *pSimInfo)