162 int nObjBits, nObjMask;
163 int f, fMax, k, Entry, Prev, iStart, iStop, Size;
166 nObjMask = (1 << nObjBits) - 1;
177 printf(
"%d=%d ", k, Entry-Prev ), Prev = Entry;
183 for ( fMax = 0; fMax < nFrames; fMax++ )
187 for ( f = 0; f <= fMax; f++ )
191 for ( k = iStop - 1; k >= iStart; k-- )
198 Entry = ((fMax-f) << nObjBits) |
Gia_ObjId(p, pObj);
229 int i, k, iRank, iFanin, Degree, Shift;
255 for ( k = 0; k < 2; k++ )
290 printf(
"Convergence = %d. Dangling objects = %d. Average degree = %.3f ",
338 for ( i = pArray[0]; i > 1; i-- )
339 pArray[i] = pArray[i-1];
347 assert( Degree >= 0 && Degree < pArray[0] );
350 return pArray[Degree + 1];
441 int f, i, Lit, Beg, End;
447 for ( f = 0; f < fMax; f++ )
453 for ( i = Beg; i < End; i++ )
692 Vec_Int_t * vIns = NULL, * vAnds, * vOuts;
699 for ( f = p->pPars->nFrames - 1; f >= 0; f-- )
743 for ( f = 0; f < pPars->
nFrames; f++ )
749 printf(
"Frame %3d : CI = %6d. AND = %6d. CO = %6d.\n",
819 printf(
"Before cleanup = %d nodes. After cleanup = %d nodes.\n",
824 printf(
"Before cleanup = %d nodes. After cleanup = %d nodes.\n",
859 for ( f = 0; f < pPars->
nFrames; f++ )
863 for ( f = 0; f < pPars->
nFrames; f++ )
919 printf(
"Before cleanup = %d nodes. After cleanup = %d nodes.\n",
924 printf(
"Before cleanup = %d nodes. After cleanup = %d nodes.\n",
948 printf(
"Computing specialized unrolling with %d frames...\n", nFrames );
954 for ( f = 0; nFrames == 0 || f < nFrames; f++ )
956 if ( fVerbose && (f % 100 == 0) )
958 printf(
"%6d : ", f );
976 printf(
"Computed prefix of %d frames.\n", f );
982 printf(
"Before cleanup = %d nodes. After cleanup = %d nodes.\n",
Gia_Man_t * Gia_ManDupMarked(Gia_Man_t *p)
static int * Vec_IntArray(Vec_Int_t *p)
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
static Vec_Ptr_t * Vec_PtrStart(int nSize)
Gia_ManUnr_t * Gia_ManUnrStart(Gia_Man_t *pAig, Gia_ParFra_t *pPars)
static int Gia_ObjUnrReadCopy0(Gia_ManUnr_t *p, Gia_Obj_t *pObj, int Id)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Gia_ManFra_t * Gia_ManFraStart(Gia_Man_t *pAig, Gia_ParFra_t *pPars)
Gia_Man_t * Gia_ManFrames(Gia_Man_t *pAig, Gia_ParFra_t *pPars)
static int Gia_ObjUnrReadCi(Gia_ManUnr_t *p, int Id, int f, Gia_Man_t *pNew)
void Gia_ManStop(Gia_Man_t *p)
typedefABC_NAMESPACE_IMPL_START struct Gia_ManFra_t_ Gia_ManFra_t
DECLARATIONS ///.
#define Gia_ManForEachCo(p, pObj, i)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
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)
Vec_Ptr_t * Gia_ManUnrollAbs(Gia_Man_t *p, int nFrames)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Gia_Man_t * Gia_ManUnroll(Gia_Man_t *pAig, Gia_ParFra_t *pPars)
Gia_Man_t * Gia_ManFrames2(Gia_Man_t *pAig, Gia_ParFra_t *pPars)
static int Gia_ManAppendCi(Gia_Man_t *p)
static int Abc_Var2Lit(int Var, int fCompl)
void * Gia_ManUnrollStart(Gia_Man_t *pAig, Gia_ParFra_t *pPars)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
void Gia_ManFraStop(Gia_ManFra_t *p)
static abctime Abc_Clock()
static void Vec_VecFree(Vec_Vec_t *p)
static void Vec_IntSort(Vec_Int_t *p, int fReverse)
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)
Gia_Man_t * Gia_ManFramesInit(Gia_Man_t *pAig, Gia_ParFra_t *pPars)
void Gia_ManStopP(Gia_Man_t **p)
static int Gia_ObjUnrReadCopy1(Gia_ManUnr_t *p, Gia_Obj_t *pObj, int Id)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Gia_ManAndNum(Gia_Man_t *p)
static Vec_Int_t * Vec_IntStart(int nSize)
int Gia_ManCombMarkUsed(Gia_Man_t *p)
Gia_Man_t * Gia_ManFramesInitSpecial(Gia_Man_t *pAig, int nFrames, int fVerbose)
static Gia_Obj_t * Gia_ManPi(Gia_Man_t *p, int v)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
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
void * Gia_ManUnrollAdd(void *pMan, int fMax)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
void Gia_ManCollectCis(Gia_Man_t *p, int *pNodes, int nNodes, Vec_Int_t *vSupp)
#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)
void Gia_ManFillValue(Gia_Man_t *p)
void Gia_ManUnrollDup_rec(Gia_Man_t *pNew, Gia_Obj_t *pObj, int Id)
FUNCTION DEFINITIONS ///.
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
static void Vec_IntFreeP(Vec_Int_t **p)
#define Gia_ManForEachPi(p, pObj, i)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
static void Gia_ObjUnrWrite(Gia_ManUnr_t *p, int Id, int Entry)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static int Gia_ManAppendAnd2(Gia_Man_t *p, int iLit0, int iLit1)
static int Vec_IntEntryLast(Vec_Int_t *p)
void Gia_ManFraSetDefaultParams(Gia_ParFra_t *p)
static int Abc_LitNot(int Lit)
static int Vec_IntSize(Vec_Int_t *p)
static int Vec_IntSum(Vec_Int_t *p)
void Gia_ManUnrollStop(void *pMan)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
int Gia_ManUnrollLastLit(void *pMan)
void Gia_ManCollectAnds(Gia_Man_t *p, int *pNodes, int nNodes, Vec_Int_t *vNodes)
static int Abc_Base2Log(unsigned n)
static int Vec_VecSizeSize(Vec_Vec_t *p)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
#define ABC_CALLOC(type, num)
static int Abc_Lit2Var(int Lit)
static int Gia_ObjIsPo(Gia_Man_t *p, Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManUnrollDup(Gia_Man_t *p, Vec_Int_t *vLimit)
static int Gia_ObjUnrRead(Gia_ManUnr_t *p, int Id, int Degree)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Vec_Int_t * Gia_ManCollectPoIds(Gia_Man_t *p)
#define Gia_ManForEachRo(p, pObj, i)
static int * Vec_IntEntryP(Vec_Int_t *p, int i)
#define Gia_ManForEachRi(p, pObj, i)
void Gia_ManHashAlloc(Gia_Man_t *p)
void Gia_ManIncrementTravId(Gia_Man_t *p)
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 int Gia_ObjIsCi(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
char * Abc_UtilStrsav(char *s)
#define Gia_ManForEachPo(p, pObj, i)
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
int Gia_ManHashOr(Gia_Man_t *p, int iLit0, int iLit1)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
void Gia_ManFraSupports(Gia_ManFra_t *p)
static int Gia_ObjCioId(Gia_Obj_t *pObj)
static int Gia_Obj2Lit(Gia_Man_t *p, 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_ManRegNum(Gia_Man_t *p)