37 #define JF_WORD_MAX ((JF_LEAF_MAX > 6) ? 1 << (JF_LEAF_MAX-6) : 1)
86 static inline int Jf_CutSize(
int * pCut ) {
return pCut[0] & 0xF; }
87 static inline int Jf_CutCost(
int * pCut ) {
return (pCut[0] >> 4) & 0xF; }
88 static inline int Jf_CutFunc(
int * pCut ) {
return ((
unsigned)pCut[0] >> 8); }
89 static inline int Jf_CutSetAll(
int f,
int c,
int s ) {
return (f << 8) | (c << 4) | s; }
96 static inline int *
Jf_CutLits(
int * pCut ) {
return pCut + 1; }
107 #define Jf_ObjForEachCut( pList, pCut, i ) for ( i = 0, pCut = pList + 1; i < pList[0]; i++, pCut += Jf_CutSize(pCut) + 1 )
108 #define Jf_CutForEachLit( pCut, Lit, i ) for ( i = 1; i <= Jf_CutSize(pCut) && (Lit = Jf_CutLit(pCut, i)); i++ )
109 #define Jf_CutForEachVar( pCut, Var, i ) for ( i = 1; i <= Jf_CutSize(pCut) && (Var = Jf_CutVar(pCut, i)); i++ )
130 if ( uTruth == 0 || ~uTruth == 0 )
137 int i, k, c, Literal, Cube;
139 for ( c = 0; c < 2; c ++ )
149 Literal = 3 & (Cube >> (k << 1));
152 else if ( Literal == 2 )
154 else if ( Literal != 0 )
166 int i, Entry, * pMap, nVars = 0;
180 pObj->
fMark0 = 0, pMap[i] = nVars++;
216 for ( i = 0; i < pCnf->
nClauses; i++ )
247 Gia_Obj_t * pObj, * pCtrl, * pData0, * pData1;
310 int Counts[595] = {0}, Costs[595] = {0};
311 int i, iFunc, Total = 0, CostTotal = 0, Other = 0, CostOther = 0;
312 printf(
"DSD classes that appear in more than %.1f %% of mapped nodes:\n", 0.1 * p->
pPars->
nVerbLimit );
328 for ( i = 0; i < 595; i++ )
329 if ( Counts[i] && 100.0 * Counts[i] / Total >= 0.1 * p->
pPars->
nVerbLimit )
331 printf(
"%5d : ", i );
333 printf(
"%8d ", Counts[i] );
334 printf(
"%5.1f %% ", 100.0 * Counts[i] / Total );
335 printf(
"%8d ", Costs[i] );
336 printf(
"%5.1f %%", 100.0 * Costs[i] / CostTotal );
342 CostOther += Costs[i];
344 printf(
"Other : " );
345 printf(
"%-20s ",
"" );
346 printf(
"%8d ", Other );
347 printf(
"%5.1f %% ", 100.0 * Other / Total );
348 printf(
"%8d ", CostOther );
349 printf(
"%5.1f %%", 100.0 * CostOther / CostTotal );
454 printf(
"Best cut of node %d : ",
Gia_ObjId(p->
pGia, pObj) );
462 for ( k = 1; k < i; k++ )
468 for ( i = 0; i < 32; i++ )
469 Count += ((n >> i) & 1);
474 i = i - ((i >> 1) & 0x55555555);
475 i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
476 i = ((i + (i >> 4)) & 0x0F0F0F0F);
477 return (i*(0x01010101))>>24;
481 i = i - ((i >> 1) & 0x5555555555555555);
482 i = (i & 0x3333333333333333) + ((i >> 2) & 0x3333333333333333);
483 i = ((i + (i >> 4)) & 0x0F0F0F0F0F0F0F0F);
484 return (i*(0x0101010101010101))>>56;
488 unsigned Sign = 0;
int i;
490 Sign |= 1 << (
Jf_CutVar(pCut, i) & 0x1F);
495 word Sign = 0;
int i;
511 if ( ++pCuts < pCut )
513 int nBlock = pCut - pCuts;
517 memmove( pCuts, pCut,
sizeof(
int) * nSize );
535 float Flow = 0;
int i;
558 if ( nSizeB == nSizeC )
560 for ( i = 1; i <= nSizeB; i++ )
561 if ( pBase[i] != pCut[i] )
565 assert( nSizeB > nSizeC );
566 for ( i = k = 1; i <= nSizeB; i++ )
568 if ( pBase[i] > pCut[k] )
570 if ( pBase[i] == pCut[k] )
582 int * pC0 = pCut0 + 1;
583 int * pC1 = pCut1 + 1;
587 if ( nSize0 == LutSize && nSize1 == LutSize )
589 for ( i = 0; i < nSize0; i++ )
591 if ( pC0[i] != pC1[i] )
600 if ( nSize0 == 0 )
goto FlushCut1;
601 if ( nSize1 == 0 )
goto FlushCut0;
604 if ( c == LutSize )
return 0;
605 if ( pC0[i] < pC1[k] )
608 if ( i >= nSize0 )
goto FlushCut1;
610 else if ( pC0[i] > pC1[k] )
613 if ( k >= nSize1 )
goto FlushCut0;
617 pC[c++] = pC0[i++]; k++;
618 if ( i >= nSize0 )
goto FlushCut1;
619 if ( k >= nSize1 )
goto FlushCut0;
624 if ( c + nSize0 > LutSize + i )
return 0;
631 if ( c + nSize1 > LutSize + k )
return 0;
652 for ( i = 1; i <= nLits; i++ )
653 if ( pCut[i] == iObj )
660 for ( i = 1; i <= nLits; i++ )
665 static inline int Jf_CutMerge0(
int * pCut0,
int * pCut1,
int * pCut,
int LutSize )
670 for ( i = 1; i <= nSize1; i++ )
673 if ( pCut[0] == LutSize )
675 pCut[++pCut[0]] = pCut1[i];
677 memcpy( pCut + 1, pCut0 + 1,
sizeof(
int) * nSize0 );
695 for ( i = 1; i <= nLits; i++ )
703 for ( i = 1; i <= nLits; i++ )
708 static inline int Jf_CutMerge1(
int * pCut0,
int * pCut1,
int * pCut,
int LutSize )
713 for ( i = 1; i <= nSize1; i++ )
716 if ( pCut[0] == LutSize )
718 pCut[++pCut[0]] = pCut1[i];
720 memcpy( pCut + 1, pCut0 + 1,
sizeof(
int) * nSize0 );
723 static inline int Jf_CutMerge2(
int * pCut0,
int * pCut1,
int * pCut,
int LutSize )
725 int ConfigMask = 0x3FFFF;
730 for ( i = 1; i <= nSize1; i++ )
733 if ( iPlace > nSize0 )
735 if ( pCut[0] == LutSize )
737 pCut[(iPlace = ++pCut[0])] = pCut1[i];
739 else if ( pCut0[iPlace] != pCut1[i] )
740 ConfigMask |= (1 << (iPlace+17));
741 ConfigMask ^= (((i-1) ^ 7) << (3*(iPlace-1)));
743 memcpy( pCut + 1, pCut0 + 1,
sizeof(
int) * nSize0 );
764 for ( k = 0; k < c; k++ )
765 if ( pSto[c]->pCut[0] >= pSto[k]->pCut[0] &&
766 (pSto[c]->Sign & pSto[k]->Sign) == pSto[k]->Sign &&
769 pSto[c]->
pCut[0] = -1;
773 for ( k = last = 0; k < c; k++ )
774 if ( !(pSto[c]->pCut[0] < pSto[k]->pCut[0] &&
775 (pSto[c]->Sign & pSto[k]->Sign) == pSto[c]->Sign &&
792 for ( k = 0; k < c; k++ )
793 if ( pSto[c]->pCut[0] >= pSto[k]->pCut[0] &&
794 (pSto[c]->Sign & pSto[k]->Sign) == pSto[k]->Sign &&
800 for ( k = 0; k < c; k++ )
801 if ( pSto[c]->pCut[0] >= pSto[k]->pCut[0] &&
802 (pSto[c]->Sign & pSto[k]->Sign) == pSto[k]->Sign &&
823 for ( i = 0; i < nSize-1; i++ )
826 for ( j = i+1; j < nSize; j++ )
827 if ( pSto[j]->pCut[0] < pSto[best_i]->pCut[0] )
920 int RetValue, Entry, i;
964 if ( c == cMax && p->
pCutCmp(pSto[c-1], pSto[c]) <= 0 )
968 for ( iPivot = c-1; iPivot >= 0; iPivot-- )
969 if ( p->
pCutCmp(pSto[iPivot], pSto[c]) < 0 )
974 for ( k = 0; k <= iPivot; k++ )
975 if ( pSto[c]->pCut[0] >= pSto[k]->pCut[0] &&
976 (pSto[c]->Sign & pSto[k]->Sign) == pSto[k]->
Sign &&
982 for ( k = 0; k <= iPivot; k++ )
983 if ( pSto[c]->pCut[0] >= pSto[k]->pCut[0] &&
984 (pSto[c]->Sign & pSto[k]->Sign) == pSto[k]->
Sign &&
990 for ( ++iPivot, k = c++; k > iPivot; k-- )
992 pSto[iPivot] = pTemp;
996 for ( k = last = iPivot+1; k < c; k++ )
997 if ( !(pSto[iPivot]->pCut[0] <= pSto[k]->pCut[0] &&
998 (pSto[iPivot]->Sign & pSto[k]->Sign) == pSto[iPivot]->Sign &&
1008 for ( k = last = iPivot+1; k < c; k++ )
1009 if ( !(pSto[iPivot]->pCut[0] <= pSto[k]->pCut[0] &&
1010 (pSto[iPivot]->Sign & pSto[k]->Sign) == pSto[iPivot]->Sign &&
1020 if ( c == cMax + 1 )
1027 for ( i = 0; i < c; i++ )
1029 printf(
"Flow =%9.5f ", pSto[i]->Flow );
1030 printf(
"Time = %5d ", pSto[i]->Time );
1031 printf(
"Func = %5d ", pSto[i]->iFunc );
1040 for ( i = 1; i < c; i++ )
1041 for ( k = 0; k < i; k++ )
1042 assert( pSto[k] != pSto[i] );
1047 for ( i = 1; i < c; i++ )
1049 for ( i = 1; i < c; i++ )
1050 for ( k = 0; k < i; k++ )
1071 int fCompl, truthId;
1080 fCompl = (int)(uTruth0[0] & uTruth1[0] & 1);
1081 Abc_TtAnd( uTruth, uTruth0, uTruth1, nWords, fCompl );
1082 pCutOut[0] =
Abc_TtMinBase( uTruth, pCutOut + 1, pCutOut[0], LutSize );
1083 assert( (uTruth[0] & 1) == 0 );
1120 for ( i = 0; i < c; i++ )
1121 if ( pSto[i]->pCut[0] <= nSize )
1134 int * pCut0, * pCut1, * pCuts0, * pCuts1;
1135 int nOldSupp, Config, i, k, c = 0;
1137 for ( i = 0; i <= CutNum+1; i++ )
1138 pSto[i] = Sto + i, pSto[i]->Cost = 0, pSto[i]->iFunc = ~0;
1148 p->
CutCount[0] += pCuts0[0] * pCuts1[0];
1159 pSto[c]->
Sign = Sign0[i] | Sign1[k];
1163 if ( !(Config =
Jf_CutMerge2(pCut0, pCut1, pSto[c]->pCut, LutSize)) )
1165 pSto[c]->
Sign = Sign0[i] | Sign1[k];
1166 nOldSupp = pSto[c]->
pCut[0];
1168 if ( pSto[c]->iFunc == -1 )
1172 assert( pSto[c]->pCut[0] <= nOldSupp );
1173 if ( pSto[c]->pCut[0] < nOldSupp )
1180 pSto[c]->
Sign = Sign0[i] | Sign1[k];
1181 nOldSupp = pSto[c]->
pCut[0];
1183 assert( pSto[c]->pCut[0] <= nOldSupp );
1184 if ( pSto[c]->pCut[0] < nOldSupp )
1186 if ( pSto[c]->iFunc >= (1 << 24) )
1187 printf(
"Hard limit on the number of different Boolean functions (2^23) is reached. Quitting...\n" ),
exit(1);
1202 pSto[c]->
pCut[0] = 2;
1211 pSto[c]->
pCut[0] = 1;
1220 assert( pSto[0]->Cost >= 0 );
1222 assert( pSto[0]->Flow >= 0 );
1228 for ( i = 0; i < c; i++ )
1232 for ( k = 1; k <= pSto[i]->pCut[0]; k++ )
1245 printf(
"Computing cuts...\r" );
1259 printf(
"CutPair = %lu ", p->
CutCount[0] );
1260 printf(
"Merge = %lu ", p->
CutCount[1] );
1261 printf(
"Eval = %lu ", p->
CutCount[2] );
1262 printf(
"Cut = %lu ", p->
CutCount[3] );
1264 printf(
"Memory: " );
1266 printf(
"Man = %.2f MB ", 6.0 *
sizeof(
int) *
Gia_ManObjNum(p->
pGia) / (1<<20) );
1309 float nRefsNew;
int i, * pCut;
1337 pFlow[i] = pFlow[i] * pRefs[i] / nRefsNew;
1338 pRefs[i] = nRefsNew;
1361 int * pCut, * pCutBest = NULL;
1367 if ( fEdge && !fEla )
1370 if ( pCutBest == NULL || AreaBest > Area || (AreaBest == Area && TimeBest > (Time =
Jf_CutArr(p, pCut))) )
1371 pCutBest = pCut, AreaBest = Area, TimeBest = Time;
1393 int i, CostBef, CostAft;
1407 assert( CostBef >= CostAft );
1438 Vec_Int_t * vLits = NULL, * vClas = NULL;
1439 int i, k, iLit, Class, * pCut;
1440 word uTruth = 0, * pTruth = &uTruth;
1491 Jf_ManGenCnf( uTruth, iLit, vLeaves, vLits, vClas, vCover );
1585 int i, k, iLit, Class, * pCut;
1703 printf(
"%s : ", pTitle );
1705 printf(
"Area =%9lu ", p->
pPars->
Area );
1706 printf(
"Edge =%9lu ", p->
pPars->
Edge );
1726 for ( i = 0; i < pPars->
nRounds; i++ )
1775 printf(
"CNF stats: Vars = %6d. Clauses = %7d. Literals = %8d. ", pCnf->
nVars, pCnf->
nClauses, pCnf->
nLiterals );
1790 for ( i = 0; i < pCnf->
nVars; i++ )
static void Jf_ObjBestCutConePrint(Jf_Man_t *p, Gia_Obj_t *pObj)
static int * Vec_IntArray(Vec_Int_t *p)
static void Gia_ObjRefFanin0Inc(Gia_Man_t *p, Gia_Obj_t *pObj)
int Jf_ManComputeDelay(Jf_Man_t *p, int fEval)
static void Jf_ObjAssignCut(Jf_Man_t *p, Gia_Obj_t *pObj)
static int Jf_ObjHasCutWithSize(Jf_Cut_t **pSto, int c, int nSize)
static word Jf_CutGetSign(int *pCut)
#define Jf_ObjForEachCut(pList, pCut, i)
Cnf_Dat_t * Jf_ManCreateCnfRemap(Gia_Man_t *p, Vec_Int_t *vLits, Vec_Int_t *vClas, int fAddOrCla)
static int Abc_Lit2LitV(int *pMap, int Lit)
Gia_Man_t * Jf_ManDeriveCnfMiter(Gia_Man_t *p, int fVerbose)
static int Jf_CutArea(Jf_Man_t *p, int *pCut, int fEdge)
static int Jf_CutFuncClass(int *pCut)
static int Abc_TtMinBase(word *pTruth, int *pVars, int nVars, int nVarsAll)
void Gia_ManStop(Gia_Man_t *p)
static void Vec_FltWriteEntry(Vec_Flt_t *p, int i, float Entry)
void Jf_ManGenCnf(word uTruth, int iLitOut, Vec_Int_t *vLeaves, Vec_Int_t *vLits, Vec_Int_t *vClas, Vec_Int_t *vCover)
FUNCTION DEFINITIONS ///.
static int Jf_CutMerge1(int *pCut0, int *pCut1, int *pCut, int LutSize)
void Jf_ManProfileClasses(Jf_Man_t *p)
static void Jf_CutPrint(int *pCut)
#define Gia_ManForEachCo(p, pObj, i)
void Gia_ObjComputeTruthTableStart(Gia_Man_t *p, int nVarsMax)
static void Jf_CutCheck(int *pCut)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
static int Jf_CutIsTriv(int *pCut, int i)
Gia_Man_t * Jf_ManDeriveMappingGia(Jf_Man_t *p)
static void Jf_ObjCleanUnit(Gia_Obj_t *p)
static int Jf_CutMerge2(int *pCut0, int *pCut1, int *pCut, int LutSize)
static void Vec_IntFillExtra(Vec_Int_t *p, int nSize, int Fill)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static void Gia_ObjRefFanin1Inc(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Jf_CutCost(int *pCut)
word * Gia_ObjComputeTruthTableCut(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vLeaves)
static Gia_Obj_t * Gia_Regular(Gia_Obj_t *p)
void Cnf_DataWriteIntoFile(Cnf_Dat_t *p, char *pFileName, int fReadable, Vec_Int_t *vForAlls, Vec_Int_t *vExists)
int Jf_CutAreaRefEdge_rec(Jf_Man_t *p, int *pCut)
static int Jf_CutLit(int *pCut, int i)
static int Abc_Lit2LitL(int *pMap, int Lit)
static char * Gia_ManName(Gia_Man_t *p)
static void Jf_CutSetSize(int *pCut, int s)
int Jf_TtComputeForCut(Jf_Man_t *p, int iFuncLit0, int iFuncLit1, int *pCut0, int *pCut1, int *pCutOut)
static int Jf_CountBits32(unsigned i)
static int Abc_Truth6WordNum(int nVars)
static void Vec_SetAlloc_(Vec_Set_t *p, int nPageSize)
FUNCTION DEFINITIONS ///.
static float Jf_ObjRefs(Jf_Man_t *p, int i)
static void Jf_ObjPropagateBuf(Jf_Man_t *p, Gia_Obj_t *pObj, int fReverse)
void Jf_ManTestCnf(Gia_Man_t *p)
static int Jf_CutFindLeaf1(int *pCut, int iLit)
static int Gia_ManAppendCi(Gia_Man_t *p)
static void Jf_ObjCheckPtrs(Jf_Cut_t **pSto, int c)
void Gia_ManCleanMark0(Gia_Man_t *p)
static int Abc_Var2Lit(int Var, int fCompl)
static int Gia_ObjRefNumId(Gia_Man_t *p, int Id)
void Gia_ObjComputeTruthTableStop(Gia_Man_t *p)
int Jf_ManComputeRefs(Jf_Man_t *p)
static int Gia_ObjRefDecId(Gia_Man_t *p, int Id)
static void Jf_ObjSetUnit(Gia_Obj_t *p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Mem_t_ Vec_Mem_t
DECLARATIONS ///.
int Jf_CutDeref_rec(Jf_Man_t *p, int *pCut)
static int Jf_ObjFunc0(Gia_Obj_t *p, int *c)
static int Gia_ObjRefNum(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_MemEntryNum(Vec_Mem_t *p)
static void Vec_IntSetEntry(Vec_Int_t *p, int i, int Entry)
static int Jf_CountBitsSimple(unsigned n)
void Jf_ManPrintStats(Jf_Man_t *p, char *pTitle)
#define ABC_ALLOC(type, num)
static int Jf_ObjAddCutToStore(Jf_Man_t *p, Jf_Cut_t **pSto, int c, int cMax)
static float Jf_ObjFlow(Jf_Man_t *p, int i)
static int Gia_ObjIsBuf(Gia_Obj_t *pObj)
static unsigned Jf_CutGetSign32(int *pCut)
static float * Vec_FltArray(Vec_Flt_t *p)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
static int Jf_CutMergeOrder(int *pCut0, int *pCut1, int *pCut, int LutSize)
void Jf_ManComputeCuts(Jf_Man_t *p, int fEdge)
Gia_Man_t * Jf_ManDeriveCnf(Gia_Man_t *p, int fCnfObjIds)
#define Gia_ManForEachObjReverse(p, pObj, i)
int Dsm_ManTruthToGia(void *p, word *pTruth, Vec_Int_t *vLeaves, Vec_Int_t *vCover)
static int * Jf_ObjCuts(Jf_Man_t *p, int i)
static int Jf_CutArr(Jf_Man_t *p, int *pCut)
static abctime Abc_Clock()
static word * Vec_SetEntry(Vec_Set_t *p, int h)
static int Abc_MaxInt(int a, int b)
#define Gia_ManForEachCoDriver(p, pObj, i)
static int Jf_ObjCutH(Jf_Man_t *p, int i)
static int Vec_SetAppend(Vec_Set_t *p, int *pArray, int nSize)
static void Vec_FltFill(Vec_Flt_t *p, int nSize, float Entry)
static Vec_Int_t * Vec_IntStartFull(int nSize)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static float Abc_MaxFloat(float a, float b)
static int Abc_LitNotCond(int Lit, int c)
static int Jf_ObjIsUnit(Gia_Obj_t *p)
#define ABC_SWAP(Type, a, b)
static void Jf_ObjSetBestCut(int *pCuts, int *pCut, Vec_Int_t *vTemp)
int Jf_ObjCutFilter(Jf_Man_t *p, Jf_Cut_t **pSto, int c)
int Kit_TruthToGia(Gia_Man_t *pMan, unsigned *pTruth, int nVars, Vec_Int_t *vMemory, Vec_Int_t *vLeaves, int fHash)
DECLARATIONS ///.
#define Jf_CutForEachLit(pCut, Lit, i)
static int Jf_CutVar(int *pCut, int i)
static int Jf_ObjArr(Jf_Man_t *p, int i)
void Jf_ManSetDefaultPars(Jf_Par_t *pPars)
static int Jf_CutSetAll(int f, int c, int s)
int Jf_ObjCutFilterBoth(Jf_Man_t *p, Jf_Cut_t **pSto, int c)
Jf_Man_t * Jf_ManAlloc(Gia_Man_t *pGia, Jf_Par_t *pPars)
static int Jf_CutCnfSize(Jf_Man_t *p, int *c)
static void Jf_ObjPrintStore(Jf_Man_t *p, Jf_Cut_t **pSto, int c)
static void Jf_CutSetFunc(int *pCut, int f)
static void Vec_IntGrow(Vec_Int_t *p, int nCapMin)
#define Gia_ManForEachCi(p, pObj, i)
#define Jf_CutForEachVar(pCut, Var, i)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
void Jf_ObjComputeCuts(Jf_Man_t *p, Gia_Obj_t *pObj, int fEdge)
static int Gia_ManAndNum(Gia_Man_t *p)
static Vec_Int_t * Vec_IntStart(int nSize)
void Gia_ManPrintCone(Gia_Man_t *p, Gia_Obj_t *pObj, int *pLeaves, int nLeaves, Vec_Int_t *vNodes)
static int Abc_LitIsCompl(int Lit)
static void Jf_CutRef(Jf_Man_t *p, int *pCut)
float Jf_CutCompareArea(Jf_Cut_t *pOld, Jf_Cut_t *pNew)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static void Abc_TtCopy(word *pOut, word *pIn, int nWords, int fCompl)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Jf_ObjCutPrint(int *pCuts)
int Kit_TruthIsop(unsigned *puTruth, int nVars, Vec_Int_t *vMemory, int fTryBoth)
FUNCTION DEFINITIONS ///.
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
static Vec_Mem_t * Vec_MemAllocForTT(int nVars, int fCompl)
void Jf_ManPropagateFlow(Jf_Man_t *p, int fEdge)
static int Jf_CutMerge0(int *pCut0, int *pCut1, int *pCut, int LutSize)
int Jf_CutCheckMffc_rec(Jf_Man_t *p, int *pCut, int Limit)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
static int Gia_ObjRefInc(Gia_Man_t *p, Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
static void Vec_SetFree_(Vec_Set_t *p)
void Jf_ManDumpCnf(Gia_Man_t *p, char *pFileName, int fVerbose)
void Gia_ManHashStart(Gia_Man_t *p)
static double Vec_MemMemory(Vec_Mem_t *p)
void Jf_ManPropagateEla(Jf_Man_t *p, int fEdge)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
static int Jf_CutFindLeaf0(int *pCut, int iObj)
void Jf_ManDeriveMapping(Jf_Man_t *p)
#define Gia_ManForEachAnd(p, pObj, i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Gia_Man_t * Jf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
static int Jf_CutCnfSizeF(Jf_Man_t *p, int f)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Jf_CutIsContained1(int *pBase, int *pCut)
static void Jf_CutSetCost(int *pCut, int c)
static void Vec_IntFreeP(Vec_Int_t **p)
static int Vec_IntCap(Vec_Int_t *p)
static void Vec_MemDumpTruthTables(Vec_Mem_t *p, char *pName, int nLutSize)
float * Jf_ManInitRefs(Jf_Man_t *pMan)
static void Vec_MemFree(Vec_Mem_t *p)
int Jf_CutRef_rec(Jf_Man_t *p, int *pCut)
void Jf_ManFree(Jf_Man_t *p)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
static void Jf_ObjCheckStore(Jf_Man_t *p, Jf_Cut_t **pSto, int c, int iObj)
static int Gia_ObjRefDec(Gia_Man_t *p, Gia_Obj_t *pObj)
int Jf_CutAreaRef_rec(Jf_Man_t *p, int *pCut)
int Gia_ObjIsMuxType(Gia_Obj_t *pNode)
static int Jf_CutSize(int *pCut)
static int Gia_ManCiNum(Gia_Man_t *p)
static ABC_NAMESPACE_IMPL_START word Truth[8]
DECLARATIONS ///.
static int Vec_IntSize(Vec_Int_t *p)
float(* pCutCmp)(Jf_Cut_t *, Jf_Cut_t *)
typedefABC_NAMESPACE_HEADER_START struct Vec_Set_t_ Vec_Set_t
INCLUDES ///.
static void Abc_TtExpand(word *pTruth0, int nVars, int *pCut0, int nCutSize0, int *pCut, int nCutSize)
#define JF_LEAF_MAX
DECLARATIONS ///.
void Jf_ObjComputeBestCut(Jf_Man_t *p, Gia_Obj_t *pObj, int fEdge, int fEla)
static int Jf_ObjFunc1(Gia_Obj_t *p, int *c)
static void Vec_IntShrink(Vec_Int_t *p, int nSizeNew)
#define ABC_CONST(number)
PARAMETERS ///.
Gia_Obj_t * Gia_ObjRecognizeMux(Gia_Obj_t *pNode, Gia_Obj_t **ppNodeT, Gia_Obj_t **ppNodeE)
static int Jf_ObjLit(int i, int c)
static int Gia_ManBufNum(Gia_Man_t *p)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
static void Jf_ObjSortCuts(Jf_Cut_t **pSto, int nSize)
static float Jf_CutFlow(Jf_Man_t *p, int *pCut)
Gia_Man_t * Jf_ManDeriveGia(Jf_Man_t *p)
static int Jf_CutCheckMffc(Jf_Man_t *p, int *pCut, int Limit)
#define ABC_CALLOC(type, num)
static int Abc_Lit2Var(int Lit)
static int Gia_ObjFaninId0p(Gia_Man_t *p, Gia_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
void Cnf_DataFree(Cnf_Dat_t *p)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Cnf_Dat_t * Jf_ManCreateCnf(Gia_Man_t *p, Vec_Int_t *vLits, Vec_Int_t *vClas)
static int Vec_MemHashInsert(Vec_Mem_t *p, word *pEntry)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
static void Vec_MemHashFree(Vec_Mem_t *p)
double Gia_ManMemory(Gia_Man_t *p)
static float Vec_FltEntry(Vec_Flt_t *p, int i)
static void Jf_CutDeref(Jf_Man_t *p, int *pCut)
static word * Vec_MemReadEntry(Vec_Mem_t *p, int i)
static int Jf_CutFunc(int *pCut)
static int Jf_CutIsContained0(int *pBase, int *pCut)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Abc_TtAnd(word *pOut, word *pIn1, word *pIn2, int nWords, int fCompl)
static void Vec_IntFree(Vec_Int_t *p)
static int * Jf_ObjCutBest(Jf_Man_t *p, int i)
float Jf_CutCompareDelay(Jf_Cut_t *pOld, Jf_Cut_t *pNew)
static int Jf_CutFuncCompl(int *pCut)
static void Vec_IntClear(Vec_Int_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)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
static int Jf_CountBits(word i)
static double Vec_ReportMemory(Vec_Set_t *p)
static int Jf_ObjDep(Jf_Man_t *p, int i)
static int Gia_ManObjNum(Gia_Man_t *p)
static int Jf_CutIsContainedOrder(int *pBase, int *pCut)
static int Jf_CutAreaOld(Jf_Man_t *p, int *pCut)
static int Gia_ObjRefIncId(Gia_Man_t *p, int Id)
#define ABC_FALLOC(type, num)
static int * Jf_CutLits(int *pCut)
void Gia_ManHashStop(Gia_Man_t *p)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
static int Gia_ManCoNum(Gia_Man_t *p)
static int Gia_ManRegNum(Gia_Man_t *p)