29 #define UNR_DIFF_NULL 0x7FFF
117 assert( i >= 0 && i < p->nSize );
118 p->pArray[i] =
Abc_MaxInt( p->pArray[i], Entry );
136 int i, Rank, Count, nExtras = 0;
143 printf(
"%2d : %8d (%6.2f %%)\n", i, Count, 100.0 * Count /
Vec_IntSize(vRanks) );
144 nExtras += Count * i;
146 printf(
"Extra space = %d (%6.2f %%) ", nExtras, 100.0 * nExtras /
Vec_IntSize(vRanks) );
191 int i, k, t, iObj, nInts, * pInts;
221 p->pEnd = p->pObjs + nInts;
233 for ( t =
Vec_IntSize(p->vOrderLim) - 2; t >= 0; t-- )
252 for ( k = 0; k < (int)pUnrObj->
RankMax; k++ )
253 pUnrObj->
Res[k] = -1;
254 assert( ((pInts - p->pObjs) & 1) == 0 );
259 assert( pInts - p->pObjs == nInts );
299 printf(
"Memory usage = %6.2f MB ", 4.0 * nInts / (1<<20) );
381 int i, iLit, iLit0, iLit1, hStart;
385 while ( p->pObjs + hStart < p->pEnd )
410 assert( p->pObjs + hStart == p->pEnd );
420 for ( f = 0; f < nFrames; f++ )
449 for ( f = 0; f < nFrames; f++ )
typedefABC_NAMESPACE_HEADER_START struct Unr_Man_t_ Unr_Man_t
INCLUDES ///.
Gia_Man_t * Unr_ManUnrollSimple(Gia_Man_t *pGia, int nFrames)
void Gia_ManStop(Gia_Man_t *p)
#define Gia_ManForEachCo(p, pObj, i)
Unr_Man_t * Unr_ManUnrollStart(Gia_Man_t *pGia, int fVerbose)
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
Gia_Man_t * Unr_ManUnrollFrame(Unr_Man_t *p, int f)
static int Gia_ManPoNum(Gia_Man_t *p)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define UNR_DIFF_NULL
DECLARATIONS ///.
void Unr_ManProfileRanks(Vec_Int_t *vRanks)
static int Gia_ManAppendCi(Gia_Man_t *p)
void Unr_ManFree(Unr_Man_t *p)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
static Unr_Obj_t * Unr_ManObj(Unr_Man_t *p, int h)
void Unr_ManSetup(Unr_Man_t *p, int fVerbose)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
static Vec_Int_t * Vec_IntStartFull(int nSize)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static int Abc_LitNotCond(int Lit, int c)
#define ABC_SWAP(Type, a, b)
static int Unr_ObjSize(Unr_Obj_t *pObj)
#define Gia_ManForEachCi(p, pObj, i)
#define Gia_ManForEachRiRo(p, pObjRi, pObjRo, i)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static Vec_Int_t * Vec_IntStart(int nSize)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
static int Gia_ObjIsRo(Gia_Man_t *p, Gia_Obj_t *pObj)
struct Unr_Obj_t_ Unr_Obj_t
static Gia_Obj_t * Gia_ObjRoToRi(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Vec_IntFindMax(Vec_Int_t *p)
static int Unr_ManFanin1Value(Unr_Man_t *p, Unr_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
void Gia_ManHashStart(Gia_Man_t *p)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define Gia_ManForEachAnd(p, pObj, i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
static void Unr_ManObjSetValue(Unr_Obj_t *pObj, int Value)
static void Vec_IntFreeP(Vec_Int_t **p)
#define Gia_ManForEachPi(p, pObj, i)
void Unr_ManSetup_rec(Unr_Man_t *p, int iObj, int iTent, Vec_Int_t *vRoots)
Gia_Man_t * Unr_ManUnroll(Gia_Man_t *pGia, int nFrames)
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
static int Unr_ManFanin0Value(Unr_Man_t *p, Unr_Obj_t *pObj)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
static int Gia_ManCiNum(Gia_Man_t *p)
static int Unr_ObjSizeInt(int Rank)
static int Vec_IntSize(Vec_Int_t *p)
static void Vec_IntWriteMaxEntry(Vec_Int_t *p, int i, int Entry)
FUNCTION DEFINITIONS ///.
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)
#define ABC_CALLOC(type, num)
static int Gia_ObjIsPo(Gia_Man_t *p, Gia_Obj_t *pObj)
void Unr_ManTest(Gia_Man_t *pGia, int nFrames)
#define Vec_IntForEachEntryStartStop(vVec, Entry, i, Start, Stop)
#define Gia_ManForEachRi(p, pObj, i)
void Gia_ManHashAlloc(Gia_Man_t *p)
Unr_Man_t * Unr_ManAlloc(Gia_Man_t *pGia)
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)
static int Unr_ManObjReadValue(Unr_Obj_t *pObj)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
char * Abc_UtilStrsav(char *s)
#define Gia_ManForEachPo(p, pObj, i)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ObjCioId(Gia_Obj_t *pObj)
static int Gia_ManObjNum(Gia_Man_t *p)
void Gia_ManHashStop(Gia_Man_t *p)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
static int Gia_ObjIsPi(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Gia_ManCoNum(Gia_Man_t *p)
static int Gia_ManRegNum(Gia_Man_t *p)