222 Vec_Int_t * vPis, * vPPis, * vFlops, * vNodes;
271 if ( !~pCopy->
Value )
303 int Counter0, Counter1;
308 printf(
"Gia_ManPrintFlopClasses(): The number of flop map entries differs from the number of flops.\n" );
313 printf(
"Flop-level abstraction: Excluded FFs = %d Included FFs = %d (%.2f %%) ",
314 Counter0, Counter1, 100.0*Counter1/(Counter0 + Counter1 + 1) );
316 printf(
"and there are other FF classes..." );
333 Vec_Int_t * vPis, * vPPis, * vFlops, * vNodes;
339 printf(
"Gia_ManPrintGateClasses(): The number of flop map entries differs from the number of flops.\n" );
345 printf(
"Gate-level abstraction: PI = %d PPI = %d FF = %d (%.2f %%) AND = %d (%.2f %%) Obj = %d (%.2f %%)\n",
371 int i, k, Entry, iStart, iStop = -1, nFrames;
372 int nObjBits, nObjMask, iObj, iFrame,
nWords;
374 int * pCountAll, * pCountUni;
379 pCountAll =
ABC_ALLOC(
int, nFrames + 1 );
380 pCountUni =
ABC_ALLOC(
int, nFrames + 1 );
386 nObjMask = (1 << nObjBits) - 1;
389 printf(
"Frame Core F0 F1 F2 F3 ...\n" );
390 for ( i = 0; i < nFrames; i++ )
394 memset( pCountAll, 0,
sizeof(
int) * (nFrames + 1) );
395 memset( pCountUni, 0,
sizeof(
int) * (nFrames + 1) );
398 iObj = (Entry & nObjMask);
399 iFrame = (Entry >> nObjBits);
404 pCountUni[iFrame+1]++;
407 pCountAll[iFrame+1]++;
410 assert( pCountAll[0] == (iStop - iStart) );
412 printf(
"%3d :", i );
413 printf(
"%7d", pCountAll[0] );
416 for ( k = 0; k < 4; k++ )
417 printf(
"%5d", pCountAll[k+1] );
419 for ( k = i-4; k <= i; k++ )
420 printf(
"%5d", pCountAll[k+1] );
424 for ( k = 0; k <= i; k++ )
426 printf(
"%5d", pCountAll[k+1] );
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
void Gia_ManStop(Gia_Man_t *p)
static int Gia_ManPoNum(Gia_Man_t *p)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Vec_IntCountEntry(Vec_Int_t *p, int Entry)
static int Abc_InfoHasBit(unsigned *p, int i)
Vec_Int_t * Gia_GlaCollectAssigned(Gia_Man_t *p, Vec_Int_t *vGateClasses)
static int Gia_ManAppendCi(Gia_Man_t *p)
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
static int Gia_ObjFaninId1p(Gia_Man_t *p, Gia_Obj_t *pObj)
ABC_NAMESPACE_IMPL_START void Gia_ManDupAbsFlops_rec(Gia_Man_t *pNew, Gia_Obj_t *pObj)
DECLARATIONS ///.
#define ABC_ALLOC(type, num)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
Gia_Man_t * Gia_ManDupAbsGates(Gia_Man_t *p, Vec_Int_t *vGateClasses)
void Gia_ManGlaCollect(Gia_Man_t *p, Vec_Int_t *vGateClasses, Vec_Int_t **pvPis, Vec_Int_t **pvPPis, Vec_Int_t **pvFlops, Vec_Int_t **pvNodes)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Gia_ManAndNum(Gia_Man_t *p)
void Gia_ManPrintObjClasses(Gia_Man_t *p)
static Vec_Int_t * Vec_IntStart(int nSize)
static int Abc_LitIsCompl(int Lit)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManSeqCleanup(Gia_Man_t *p)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Gia_ManPrintGateClasses(Gia_Man_t *p)
void Gia_ManDupAbsGates_rec(Gia_Man_t *pNew, Gia_Obj_t *pObj)
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
static int Gia_ObjIsRo(Gia_Man_t *p, Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ObjRoToRi(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define ABC_NAMESPACE_IMPL_END
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
static int Vec_IntUniqify(Vec_Int_t *p)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManFillValue(Gia_Man_t *p)
#define Gia_ManForEachPi(p, pObj, i)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ObjCopy(Gia_Man_t *p, Gia_Obj_t *pObj)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
static void Abc_InfoSetBit(unsigned *p, int i)
static int Vec_IntSize(Vec_Int_t *p)
Gia_Man_t * Gia_ManDupAbsFlops(Gia_Man_t *p, Vec_Int_t *vFlopClasses)
FUNCTION DECLARATIONS ///.
static int Abc_Base2Log(unsigned n)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
static int Gia_ObjFaninId0p(Gia_Man_t *p, Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
#define Gia_ManForEachRo(p, pObj, i)
static int Abc_BitWordNum(int nBits)
static int * Vec_IntEntryP(Vec_Int_t *p, int i)
#define Vec_IntForEachEntryStartStop(vVec, Entry, i, Start, Stop)
#define Gia_ManForEachRi(p, pObj, i)
void Gia_ManHashAlloc(Gia_Man_t *p)
static void Vec_IntFree(Vec_Int_t *p)
char * Abc_UtilStrsav(char *s)
#define Gia_ManForEachPo(p, pObj, i)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
void Gia_ManPrintFlopClasses(Gia_Man_t *p)
static int Gia_ManObjNum(Gia_Man_t *p)
int nTotal
DECLARATIONS ///.
void Gia_ManHashStop(Gia_Man_t *p)
static int Gia_ObjIsPi(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Gia_ManRegNum(Gia_Man_t *p)