47 unsigned x = (unsigned)Num;
51 Vec_StrPush( p->vStorage, (
char)((x & 0x7f) | 0x80) );
71 for ( i = 0; (ch =
Vec_StrEntry(p->vStorage, p->iStart++)) & 0x80; i++ )
72 x |= (ch & 0x7f) << (7 * i);
73 return x | (ch << (7 * i));
89 int i, Number, NumberPrev;
96 assert( NumberPrev < Number );
120 for ( i = 1; i < Size; i++ )
248 int Value0, Value1, Value;
262 pObj->
fMark0 = (Value & 1);
263 pObj->
fMark1 = ((Value >> 1) & 1);
302 Abc_Print( 1,
"Cec_ManPatVerifyPattern(): Verification failed.\n" );
373 pMan->nPatLits += nPatLits;
374 pMan->nPatLitsAll += nPatLits;
400 pMan->timeTotal +=
Abc_Clock() - clkTotal;
423 unsigned * pInfo, * pPres;
425 for ( i = 0; i < nLits; i++ )
433 for ( i = 0; i < nLits; i++ )
459 int k, kMax = -1, nPatterns = 0;
460 int iStartOld = pMan->iStart;
468 while ( pMan->iStart <
Vec_StrSize(pMan->vStorage) )
472 for ( k = 1; k < nBits; k++, k += ((k % (32 * nWordsInit)) == 0) )
490 pMan->iStart = iStartOld;
491 if ( pMan->fVerbose )
493 Abc_Print( 1,
"Total = %5d. Max used = %5d. Full = %5d. Series = %d. ",
494 nPatterns, kMax, nWordsInit*32, pMan->nSeries );
517 int k, nSize, iStart, kMax = 0, nPatterns = 0;
521 assert( nRegs <= nInputs );
542 for ( k = 0; k < nSize; k++ )
545 for ( k = 1; k < nBits; k++, k += ((k % (32 * nWordsInit)) == 0) )
void Cec_ManPatSavePattern(Cec_ManPat_t *pMan, Cec_ManSat_t *p, Gia_Obj_t *pObj)
static int * Vec_IntArray(Vec_Int_t *p)
Vec_Ptr_t * Cec_ManPatPackPatterns(Vec_Int_t *vCexStore, int nInputs, int nRegs, int nWordsInit)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
int Cec_ManPatComputePattern_rec(Cec_ManSat_t *pSat, Gia_Man_t *p, Gia_Obj_t *pObj)
static ABC_NAMESPACE_IMPL_START void Cec_ManPatStoreNum(Cec_ManPat_t *p, int Num)
DECLARATIONS ///.
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ManCi(Gia_Man_t *p, int v)
void Cec_ManPatComputePattern1_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vPat)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static void Cec_ManPatRestore(Cec_ManPat_t *p, Vec_Int_t *vPat)
static int Gia_ObjIsTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Abc_InfoHasBit(unsigned *p, int i)
static void Abc_InfoXorBit(unsigned *p, int i)
void Gia_ManRandomInfo(Vec_Ptr_t *vInfo, int iInputStart, int iWordStart, int iWordStop)
static int Abc_Var2Lit(int Var, int fCompl)
static void Vec_PtrCleanSimInfo(Vec_Ptr_t *vInfo, int iWord, int nWords)
static int Gia_XsimNotCond(int Value, int fCompl)
static int Gia_XsimAndCond(int Value0, int fCompl0, int Value1, int fCompl1)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
static void Vec_StrPush(Vec_Str_t *p, char Entry)
void Cec_ManPatSavePatternCSat(Cec_ManPat_t *pMan, Vec_Int_t *vPat)
static void Vec_IntSort(Vec_Int_t *p, int fReverse)
static int Abc_LitIsCompl(int Lit)
static char Vec_StrEntry(Vec_Str_t *p, int i)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Cec_ManPatVerifyPattern(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vPat)
void Cec_ManPatCleanMark0(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
void Cec_ManPatPrintStats(Cec_ManPat_t *p)
static void Gia_ObjSetTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Cec_ManPat_t_ Cec_ManPat_t
INCLUDES ///.
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntPush(Vec_Int_t *p, int Entry)
int Cec_ManPatComputePattern3_rec(Gia_Man_t *p, Gia_Obj_t *pObj)
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
static void Abc_Print(int level, const char *format,...)
Vec_Ptr_t * Cec_ManPatCollectPatterns(Cec_ManPat_t *pMan, int nInputs, int nWordsInit)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
void Cec_ManPatComputePattern2_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vPat)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static void Abc_InfoSetBit(unsigned *p, int i)
static int Vec_StrSize(Vec_Str_t *p)
static int Vec_PtrReadWordsSimInfo(Vec_Ptr_t *p)
int Cec_ObjSatVarValue(Cec_ManSat_t *p, Gia_Obj_t *pObj)
FUNCTION DEFINITIONS ///.
static int Vec_IntSize(Vec_Int_t *p)
int Cec_ManPatCollectTry(Vec_Ptr_t *vInfo, Vec_Ptr_t *vPres, int iBit, int *pLits, int nLits)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
void Cec_ManPatComputePattern4_rec(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Abc_Lit2Var(int Lit)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
static void Vec_PtrReallocSimInfo(Vec_Ptr_t *vInfo)
static void Cec_ManPatStore(Cec_ManPat_t *p, Vec_Int_t *vPat)
void Gia_ManIncrementTravId(Gia_Man_t *p)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
static void Vec_IntClear(Vec_Int_t *p)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjCioId(Gia_Obj_t *pObj)
static Vec_Ptr_t * Vec_PtrAllocSimInfo(int nEntries, int nWords)
static int Cec_ManPatRestoreNum(Cec_ManPat_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)