127 int i, nSizeMax = -1;
166 int i, k, iFan, Level;
172 if ( Level < pLevels[iFan] )
173 Level = pLevels[iFan];
174 pLevels[i] = Level + 1;
222 if ( Level < pLevels[iFan] )
223 Level = pLevels[iFan];
224 pLevels[i] = Level + 1;
372 int i, pFanins[3], nCountDup = 0, nCountPis = 0, nCountMux = 0;
385 nCountDup += pFanin->
fMark0;
386 nCountMux += pFanin->
fMark1;
391 nCountDup += pFanin->
fMark0;
392 nCountMux += pFanin->
fMark1;
402 nCountDup += pFanin->
fMark0;
403 nCountMux += pFanin->
fMark1;
409 nCountDup += pFanin->
fMark0;
410 nCountMux += pFanin->
fMark1;
417 if ( nCountDup + nCountPis + nCountMux )
418 printf(
"Dup fanins = %d. CI fanins = %d. MUX fanins = %d. Total = %d. (%.2f %%)\n",
419 nCountDup, nCountPis, nCountMux, nCountDup + nCountPis, 100.0 * (nCountDup + nCountPis + nCountMux) /
Gia_ManLutNum(p) );
420 return nCountDup + nCountPis;
427 int i, k, iFan, nLutSize = 0, nLuts = 0, nFanins = 0, LevelMax = 0, Ave = 0, nMuxF = 0;
439 pLevels[i] =
Abc_MaxInt( pLevels[i], pLevels[pFanins[0]]+1 );
440 pLevels[i] =
Abc_MaxInt( pLevels[i], pLevels[pFanins[1]] );
441 pLevels[i] =
Abc_MaxInt( pLevels[i], pLevels[pFanins[2]] );
449 LevelMax =
Abc_MaxInt( LevelMax, pLevels[i] );
458 pLevels[i] =
Abc_MaxInt( pLevels[i], pLevels[iFan] );
460 LevelMax =
Abc_MaxInt( LevelMax, pLevels[i] );
468 HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
469 Abc_Print( 1,
"Mapping (K=%d) : ", nLutSize );
470 SetConsoleTextAttribute( hConsole, 14 );
474 SetConsoleTextAttribute( hConsole, 10 );
476 SetConsoleTextAttribute( hConsole, 12 );
482 SetConsoleTextAttribute( hConsole, 7 );
487 Abc_Print( 1,
"Mapping (K=%d) : ", nLutSize );
488 Abc_Print( 1,
"%slut =%7d%s ",
"\033[1;33m", nLuts,
"\033[0m" );
489 Abc_Print( 1,
"%sedge =%8d%s ",
"\033[1;32m", nFanins,
"\033[0m" );
490 Abc_Print( 1,
"%slev =%5d%s ",
"\033[1;31m", LevelMax,
"\033[0m" );
505 static char FileNameOld[1000] = {0};
507 FILE * pTable = fopen( pDumpFile,
"a+" );
511 fprintf( pTable,
"\n" );
512 fprintf( pTable,
"%s ", p->
pName );
520 fprintf( pTable,
" " );
521 fprintf( pTable,
"%d ", nLuts );
522 fprintf( pTable,
"%d ", LevelMax );
529 fprintf( pTable,
" " );
530 fprintf( pTable,
"%d ", nLuts );
531 fprintf( pTable,
"%d ", LevelMax );
534 fprintf( pTable,
"%.2f", 1.0*(
Abc_Clock() - clk)/CLOCKS_PER_SEC );
556 int nObjToShow = 200;
557 int nNumStr[5] = {0};
558 int i, k, Entry, nEntries, nEntries2, MaxSize = -1;
565 assert( Entry > 0 && Entry < 4 );
568 if ( fVerbose && nEntries2 < nObjToShow )
Abc_Print( 1,
"{ " );
569 for ( k = 0; k < Entry; k++, i++ )
571 if ( fVerbose && nEntries2 < nObjToShow )
Abc_Print( 1,
"}\n" );
575 assert( nEntries == nEntries2 );
576 if ( nNumStr[3] > 0 )
578 else if ( nNumStr[2] > 0 )
580 else if ( nNumStr[1] > 0 )
582 Abc_Print( 1,
"Packing (N=%d) : ", MaxSize );
583 for ( i = 1; i <= MaxSize; i++ )
584 Abc_Print( 1,
"%d x LUT = %d ", i, nNumStr[i] );
602 int i, SizeAll = 0, NodeAll = 0;
603 for ( i = 0; i <= nSizeMax; i++ )
605 SizeAll += i * pCounts[i];
606 NodeAll += pCounts[i];
609 for ( i = 2; i <= nSizeMax; i++ )
610 Abc_Print( 1,
"%d=%d %.1f %% ", i, pCounts[i], 100.0*pCounts[i]/NodeAll );
611 Abc_Print( 1,
"Ave = %.2f\n", 1.0*SizeAll/(NodeAll ? NodeAll : 1) );
615 int i, nSizeMax, pCounts[33] = {0};
619 Abc_Print( 1,
"The max LUT size (%d) is too large.\n", nSizeMax );
642 int i, iBox, iTerm1, nTerms, LevelMax = 0;
655 for ( i = 0; i < nTerms; i++ )
758 printf(
"Warning: The mapper will allocate %.1f GB for to represent the subject graph with %d AIG nodes.\n",
825 int i, iVar0, iVar1, iLit0, iLit1, iLit = 0;
835 else if ( iLit0 == iLit1 )
872 return pIfObj->
iCopy;
878 return pIfObj->
iCopy;
954 int i, iLit, iObjLit1;
988 int i, iObjLit1, iObjLit2;
991 for ( i = 0; i < 4; i++ )
993 int v = (int)((z >> (16+(i<<2))) & 7);
998 Truth = (z & 0xffff);
999 Truth |= (Truth << 16);
1000 Truth |= (Truth << 32);
1004 for ( i = 0; i < 4; i++ )
1006 int v = (int)((z >> (48+(i<<2))) & 7);
1014 Truth = ((z >> 32) & 0xffff);
1015 Truth |= (Truth << 16);
1016 Truth |= (Truth << 32);
1041 int i, Length, nLutLeaf, nLutLeaf2, nLutRoot, iObjLit1, iObjLit2, iObjLit3;
1068 if ( Length != 2 && Length != 3 )
1070 printf(
"Wrong LUT struct (%s)\n", pStr );
1073 for ( i = 0; i < Length; i++ )
1074 if ( pStr[i] -
'0' < 3 || pStr[i] -
'0' > 6 )
1076 printf(
"The LUT size (%d) should belong to {3,4,5,6}.\n", pStr[i] -
'0' );
1080 nLutLeaf = pStr[0] -
'0';
1081 nLutLeaf2 = ( Length == 3 ) ? pStr[1] -
'0' : 0;
1082 nLutRoot = pStr[Length-1] -
'0';
1083 if ( nLeaves > nLutLeaf - 1 + (nLutLeaf2 ? nLutLeaf2 - 1 : 0) + nLutRoot )
1085 printf(
"The node size (%d) is too large for the LUT structure %s.\n", nLeaves, pStr );
1107 static word TruthStore[16][1<<10] = {{0}}, *
pTruths[16];
1108 word Func0, Func1, Func2;
1109 char pLut0[32], pLut1[32], pLut2[32] = {0};
1111 if ( TruthStore[0][0] == 0 )
1122 int nWordsMax = (1 << 10);
1124 assert( nVarsMax <= 16 );
1125 for ( i = 0; i < nVarsMax; i++ )
1127 for ( i = 0; i < 6; i++ )
1128 for ( k = 0; k < nWordsMax; k++ )
1130 for ( i = 6; i < nVarsMax; i++ )
1131 for ( k = 0; k < nWordsMax; k++ )
1132 pTruths[i][k] = ((k >> (i-6)) & 1) ? ~(
word)0 : 0;
1149 for ( i = 0; i < nLeaves; i++ )
1161 if ( nLeaves < 8 &&
If_CluCheckExt( NULL, pRes, nLeaves, 4, 4, pLut0, pLut1, &Func0, &Func1 ) )
1167 else if (
If_CluCheckExt( NULL, pRes, nLeaves, 5, 4, pLut0, pLut1, &Func0, &Func1 ) )
1173 else if (
If_CluCheckExt( NULL, pRes, nLeaves, 4, 5, pLut0, pLut1, &Func0, &Func1 ) )
1180 Extra_PrintHex( stdout, (
unsigned *)pRes, nLeaves ); printf(
" " );
1182 printf(
"Node %d is not decomposable. Deriving LUT structures has failed.\n", iObj );
1190 if ( !
If_CluCheckExt( NULL, pRes, nLeaves, nLutLeaf, nLutRoot, pLut0, pLut1, &Func0, &Func1 ) )
1192 Extra_PrintHex( stdout, (
unsigned *)pRes, nLeaves ); printf(
" " );
1194 printf(
"Node %d is not decomposable. Deriving LUT structures has failed.\n", iObj );
1200 if ( !
If_CluCheckExt3( pIfMan, pRes, nLeaves, nLutLeaf, nLutLeaf2, nLutRoot, pLut0, pLut1, pLut2, &Func0, &Func1, &Func2 ) )
1202 Extra_PrintHex( stdout, (
unsigned *)pRes, nLeaves ); printf(
" " );
1204 printf(
"Node %d is not decomposable. Deriving LUT structures has failed.\n", iObj );
1221 for ( i = 0; i < pLut1[0]; i++ )
1225 if ( Length == 3 && pLut2[0] > 0 )
1241 for ( i = 0; i < pLut2[0]; i++ )
1242 if ( pLut2[2+i] == nLeaves )
1277 for ( i = 0; i < pLut0[0]; i++ )
1278 if ( pLut0[2+i] == nLeaves )
1280 else if ( pLut0[2+i] == nLeaves+1 )
1308 int iFunc, iFunc0, iFunc1;
1322 for ( pTemp = pIfObj; pTemp; pTemp = pTemp->
pEquiv )
1358 Abc_Print( -1,
"Gia_ManNodeIfToGia(): Computing local AIG has failed.\n" );
1387 unsigned uSetNew, uSetOld;
1388 int RetValue, RetValue2, k;
1414 int Value = ((uSetOld >> (k << 1)) & 3);
1416 uSetNew |= (1 << (2*iVar));
1417 else if ( Value == 3 )
1418 uSetNew |= (3 << (2*iVar));
1419 else assert( Value == 0 );
1426 int Value = ((uSetNew >> (k << 1)) & 3);
1428 pVarsF[nVarsF++] = k;
1429 else if ( Value == 1 )
1430 pVarsB[nVarsB++] = k;
1431 else if ( Value == 3 )
1432 pVarsS[nVarsS++] = k;
1433 else assert( Value == 0 );
1437 for ( k = 0; k < nVarsS; k++ )
1439 for ( k = 0; k < nVarsB; k++ )
1445 for ( k = 0; k < nVarsS; k++ )
1447 for ( k = 0; k < nVarsF; k++ )
1470 int Gia_ManFromIfLogicFindCell(
If_Man_t * pIfMan,
Gia_Man_t * pNew,
Gia_Man_t * pTemp,
If_Cut_t * pCutBest,
sat_solver * pSat,
Vec_Int_t * vPiVars,
Vec_Int_t * vPoVars,
Ifn_Ntk_t * pNtkCell,
int nLutMax,
Vec_Int_t * vLeaves,
Vec_Int_t * vLits,
Vec_Int_t * vCover,
Vec_Int_t * vMapping,
Vec_Int_t * vMapping2,
Vec_Int_t * vPacking )
1478 int i, Id, iLitTemp;
1489 printf(
"Boolean matching does not exist.\n" );
1540 Vec_Int_t * vMapping, * vMapping2, * vPacking = NULL;
1541 Vec_Int_t * vLeaves, * vLeaves2, * vCover, * vLits;
1542 Vec_Int_t * vPiVars = NULL, * vPoVars = NULL;
1545 int i, k, nLutMax = -1, Entry;
1605 pIfObj->
iCopy =
Gia_ManFromIfLogicFindCell( pIfMan, pNew, pHashed, pCutBest, pSat, vPiVars, vPoVars, pNtkCell, nLutMax, vLeaves, vLits, vCover, vMapping, vMapping2, vPacking );
1611 int pVarsNew[16], nVarsNew, iLitCofs[3];
1612 int nLeaves = pCutBest->
nLeaves;
1616 assert( iVar >= 0 && iVar < nLeaves && pIfMan->pPars->nLutSize <= 13 );
1617 for ( c = 0; c < 2; c++ )
1619 for ( k = 0; k < nLeaves; k++ )
1628 for ( k = 0; k < nVarsNew; k++ )
1630 iLitCofs[c] =
Kit_TruthToGia( pNew, (
unsigned *)pTruthCof, nVarsNew, vCover, vLeaves2, 0 );
1643 if ( iLitCofs[0] > 1 && iLitCofs[1] > 1 )
1645 pTruthCof[0] =
ABC_CONST(0xCACACACACACACACA);
1651 iTopLit = pIfObj->
iCopy;
1655 assert( iLitCofs[0] > 1 || iLitCofs[1] > 1 );
1658 for ( k = 0; k < 3; k++ )
1659 if ( iLitCofs[k] > 1 )
1663 if ( iLitCofs[0] == 0 )
1665 else if ( iLitCofs[0] == 1 )
1667 else if ( iLitCofs[1] == 0 )
1669 else if ( iLitCofs[1] == 1 )
1672 iTopLit = iLitCofs[2];
1690 for ( k = 0; k < (int)pCutBest->
nLeaves; k++ )
1694 pIfObj->
iCopy =
Gia_ManFromIfLogicNode( pIfMan, pNew, i, vLeaves, vLeaves2, pTruth, pIfMan->
pPars->
pLutStruct, vCover, vMapping, vMapping2, vPacking, (pIfMan->
pPars->
fEnableCheck75 || pIfMan->
pPars->
fEnableCheck75u), pIfMan->
pPars->
fEnableCheck07 );
1790 int Id, iFan, k, Result = 1;
1798 Abc_Print( -1,
"Gia_ManMappingVerify: Internal node %d does not have mapping.\n",
Gia_ObjId(p, pObj) );
1820 Abc_Print( -1,
"Gia_ManMappingVerify: CO driver %d does not have mapping.\n",
Gia_ObjId(p, pFanin) );
1833 Abc_Print( -1,
"Gia_ManMappingVerify: CO driver %d does not have mapping.\n",
Gia_ObjId(p, pFanin) );
1882 int i, k, Entry, nEntries, nEntries2;
1892 assert( Entry > 0 && Entry < 4 );
1895 for ( k = 0; k < Entry; k++, i++ )
1907 assert( nEntries == nEntries2 );
1914 if ( pGia->
pManTime == NULL || p == pGia )
1945 if ( pIfMan == NULL )
1963 Abc_Print( 0,
"Switching activity computation for designs with boxes is disabled.\n" );
2106 int LutCount[8] = {0}, LutNDecomp[8] = {0};
2107 int i, k, iFan, nFanins, Status;
2128 LutNDecomp[nFanins]++;
2129 if ( LutNDecomp[nFanins] > 10 )
2135 printf(
"LUT5 = %d ", LutCount[5] );
2136 printf(
"LUT6 = %d NonDec = %d (%.2f %%) ", LutCount[6], LutNDecomp[6], 100.0 * LutNDecomp[6]/
Abc_MaxInt(LutCount[6], 1) );
2137 printf(
"LUT7 = %d NonDec = %d (%.2f %%) ", LutCount[7], LutNDecomp[7], 100.0 * LutNDecomp[7]/
Abc_MaxInt(LutCount[7], 1) );
static ABC_NAMESPACE_IMPL_START int pTruths[13719]
DECLARATIONS ///.
void Gia_ManTransferPacking(Gia_Man_t *p, Gia_Man_t *pGia)
void If_CutRotatePins(If_Man_t *p, If_Cut_t *pCut)
int Tim_ManBoxForCi(Tim_Man_t *p, int iCo)
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
int If_CluCheckExt(void *p, word *pTruth, int nVars, int nLutLeaf, int nLutRoot, char *pLut0, char *pLut1, word *pFunc0, word *pFunc1)
static If_Obj_t * If_NotCond(If_Obj_t *p, int c)
Gia_Man_t * Gia_ManPerformSopBalance(Gia_Man_t *p, int nCutNum, int nRelaxRatio, int fVerbose)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Gia_ObjIsAndNotBuf(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManDupUnnormalize(Gia_Man_t *p)
int If_CluCheckExt3(void *p, word *pTruth, int nVars, int nLutLeaf, int nLutLeaf2, int nLutRoot, char *pLut0, char *pLut1, char *pLut2, word *pFunc0, word *pFunc1, word *pFunc2)
static Gia_Obj_t * Gia_ObjSiblObj(Gia_Man_t *p, int Id)
static If_Obj_t * If_ManObj(If_Man_t *p, int i)
Vec_Str_t * vTtVars[IF_MAX_FUNC_LUTSIZE+1]
static int Abc_TtMinBase(word *pTruth, int *pVars, int nVars, int nVarsAll)
void Gia_ManStop(Gia_Man_t *p)
int If_ManSatFindCofigBits(void *pSat, Vec_Int_t *vPiVars, Vec_Int_t *vPoVars, word *pTruth, int nVars, word Perm, int nInps, Vec_Int_t *vValues)
#define Gia_ManForEachCo(p, pObj, i)
int Gia_ManMappingVerify_rec(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ObjComputeTruthTableStart(Gia_Man_t *p, int nVarsMax)
static int If_ObjId(If_Obj_t *pObj)
static int Gia_ManPoNum(Gia_Man_t *p)
void Gia_ManPrintMappingStats(Gia_Man_t *p, char *pDumpFile)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
static void Gia_ObjSetValue(Gia_Obj_t *pObj, int i)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
int Gia_ManLutLevel(Gia_Man_t *p)
static void Abc_TtCofactor1p(word *pOut, word *pIn, int nWords, int iVar)
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 int Abc_AbsInt(int a)
int Gia_ManRegBoxNum(Gia_Man_t *p)
word * Gia_ObjComputeTruthTableCut(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vLeaves)
static If_Obj_t * If_ManFanin1Copy(If_Man_t *pIfMan, Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_Regular(Gia_Obj_t *p)
static int Gia_ObjIsTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
If_Man_t * If_ManStart(If_Par_t *pPars)
FUNCTION DEFINITIONS ///.
static char * Gia_ManName(Gia_Man_t *p)
unsigned If_DsdManCheckXY(If_DsdMan_t *p, int iDsd, int LutSize, int fDerive, unsigned uMaskNot, int fHighEffort, int fVerbose)
void If_ManSetDefaultPars(If_Par_t *pPars)
FUNCTION DECLARATIONS ///.
int Gia_ManFromIfLogicFindCell(If_Man_t *pIfMan, Gia_Man_t *pNew, Gia_Man_t *pTemp, If_Cut_t *pCutBest, sat_solver *pSat, Vec_Int_t *vPiVars, Vec_Int_t *vPoVars, Ifn_Ntk_t *pNtkCell, int nLutMax, Vec_Int_t *vLeaves, Vec_Int_t *vLits, Vec_Int_t *vCover, Vec_Int_t *vMapping, Vec_Int_t *vMapping2, Vec_Int_t *vPacking)
static int If_ObjIsAnd(If_Obj_t *pObj)
Gia_Man_t * Gia_ManFromIfAig(If_Man_t *pIfMan)
static int Abc_Truth6WordNum(int nVars)
#define If_CutForEachLeaf(p, pCut, pLeaf, i)
static int If_ObjIsCo(If_Obj_t *pObj)
static int If_CutLeaveNum(If_Cut_t *pCut)
static int Gia_ObjLutMuxId(Gia_Man_t *p, int Id)
static int Gia_ManAppendCi(Gia_Man_t *p)
void sat_solver_delete(sat_solver *s)
void Gia_ManCleanMark0(Gia_Man_t *p)
static int If_ObjFaninC0(If_Obj_t *pObj)
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
void Gia_ManPrintPackingStats(Gia_Man_t *p)
void Gia_ObjComputeTruthTableStop(Gia_Man_t *p)
void Gia_ManLutParams(Gia_Man_t *p, int *pnCurLuts, int *pnCurEdges, int *pnCurLevels)
void Gia_ManTransferTiming(Gia_Man_t *p, Gia_Man_t *pGia)
static int Gia_ObjValue(Gia_Obj_t *pObj)
static If_Obj_t * If_ObjFanin0(If_Obj_t *pObj)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
int Ifn_NtkLutSizeMax(Ifn_Ntk_t *p)
static void Vec_IntSetEntry(Vec_Int_t *p, int i, int Entry)
int Gia_ManComputeOverlapOne(Gia_Man_t *p, int iObj)
word If_CutPerformDerive07(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
int Gia_ManComputeOverlap2One(Gia_Man_t *p, int iObj, Vec_Str_t *vLabel, Vec_Int_t *vVisit)
static int If_ObjIsCi(If_Obj_t *pObj)
static int Kit_TruthIsEqual(unsigned *pIn0, unsigned *pIn1, int nVars)
static If_Cut_t * If_ObjCutBest(If_Obj_t *pObj)
int Abc_RecToGia3(Gia_Man_t *pMan, If_Man_t *pIfMan, If_Cut_t *pCut, Vec_Int_t *vLeaves, int fHash)
int(* pFuncCost)(If_Man_t *, If_Cut_t *)
static int Kit_TruthIsConst0(unsigned *pIn, int nVars)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
int Gia_ManFromIfLogicCreateLutSpecial(Gia_Man_t *pNew, word *pRes, Vec_Int_t *vLeaves, Vec_Int_t *vLeavesTemp, Vec_Int_t *vCover, Vec_Int_t *vMapping, Vec_Int_t *vMapping2, Vec_Int_t *vPacking)
int Gia_ManFromIfLogicCreateLut(Gia_Man_t *pNew, word *pRes, Vec_Int_t *vLeaves, Vec_Int_t *vCover, Vec_Int_t *vMapping, Vec_Int_t *vMapping2)
int If_CutPerformCheck07(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static int Abc_LitNotCond(int Lit, int c)
int Gia_ManLutFaninCount(Gia_Man_t *p)
static void If_ObjSetLevel(If_Obj_t *pObj, int Level)
#define Gia_ManForEachLut(p, i)
void If_ManComputeSwitching(If_Man_t *pIfMan)
FUNCTION DEFINITIONS ///.
int Gia_ManComputeOverlapOne_rec(Gia_Man_t *p, int iObj)
If_Obj_t * If_ManCreateCo(If_Man_t *p, If_Obj_t *pDriver)
int Gia_ManFromIfAig_rec(Gia_Man_t *pNew, If_Man_t *pIfMan, If_Obj_t *pIfObj)
static int Gia_ManAppendOr(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ManHasChoices(Gia_Man_t *p)
int Gia_ManComputeOverlap2One_rec(Gia_Man_t *p, int iObj, Vec_Str_t *vLabel, Vec_Int_t *vVisit)
int Gia_ManComputeOverlap2(Gia_Man_t *p)
void If_DsdManAllocIsops(If_DsdMan_t *p, int nLutSize)
#define Gia_ManForEachCi(p, pObj, i)
void Gia_ManChoiceLevel_rec(Gia_Man_t *p, Gia_Obj_t *pObj)
#define If_ManForEachObj(p, pObj, i)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static word * If_CutTruthW(If_Man_t *p, If_Cut_t *pCut)
static int Gia_ManAndNum(Gia_Man_t *p)
static void Vec_StrWriteEntry(Vec_Str_t *p, int i, char Entry)
static int Gia_ObjLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Gia_ObjSibl(Gia_Man_t *p, int Id)
void Gia_ManSetRefsMapped(Gia_Man_t *p)
static Vec_Int_t * Vec_IntStart(int nSize)
static int Kit_TruthIsConst1(unsigned *pIn, int nVars)
static int Abc_LitIsCompl(int Lit)
int If_CluMinimumBase(word *t, int *pSupp, int nVarsAll, int *pnVars)
void * If_ManSatBuildFromCell(char *pStr, Vec_Int_t **pvPiVars, Vec_Int_t **pvPoVars, Ifn_Ntk_t **ppNtk)
static char Vec_StrEntry(Vec_Str_t *p, int i)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
int Gia_ManLutSizeMax(Gia_Man_t *p)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Gia_ObjLutSize(Gia_Man_t *p, int Id)
static void Abc_TtCofactor0p(word *pOut, word *pIn, int nWords, int iVar)
static void If_CutSetDataInt(If_Cut_t *pCut, int Data)
void Gia_ManTransferMapping(Gia_Man_t *p, Gia_Man_t *pGia)
#define Gia_LutForEachFaninObj(p, i, pFanin, k)
static int Gia_ObjFanin1CopyArray(Gia_Man_t *p, Gia_Obj_t *pObj)
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
static void Vec_StrFree(Vec_Str_t *p)
Gia_Man_t * Gia_ManDupNormalize(Gia_Man_t *p)
void Gia_ManPrintGetMuxFanins(Gia_Man_t *p, Gia_Obj_t *pObj, int *pFanins)
static If_Obj_t * If_ManFanin0Copy(If_Man_t *pIfMan, Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
static void Gia_ObjSetTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManFromIfLogic(If_Man_t *pIfMan)
int Gia_ManLutNum(Gia_Man_t *p)
static int Gia_ObjCopyArray(Gia_Man_t *p, int iObj)
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 If_Obj_t * If_ManConst1(If_Man_t *p)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define IF_MAX_FUNC_LUTSIZE
#define Gia_ManForEachAnd(p, pObj, i)
static int If_CutDataInt(If_Cut_t *pCut)
int Ifn_NtkInputNum(Ifn_Ntk_t *p)
static int Gia_ObjLutIsMux(Gia_Man_t *p, int Id)
int If_DsdManVarNum(If_DsdMan_t *p)
static Vec_Str_t * Vec_StrStart(int nSize)
Tim_Man_t * Tim_ManDup(Tim_Man_t *p, int fUnitDelay)
Gia_Man_t * Gia_ManRehash(Gia_Man_t *p, int fAddStrash)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Gia_Man_t * Gia_ManPerformMapping(Gia_Man_t *p, void *pp)
int Gia_ManBoxCiNum(Gia_Man_t *p)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManCleanLevels(Gia_Man_t *p, int Size)
ABC_DLL void * Abc_FrameReadManDsd()
void * If_ManSatBuildXY(int nLutSize)
DECLARATIONS ///.
void Gia_ManFillValue(Gia_Man_t *p)
void Gia_ObjPrint(Gia_Man_t *p, Gia_Obj_t *pObj)
int Tim_ManBoxNum(Tim_Man_t *p)
int If_ManSatDeriveGiaFromBits(void *pNew, Ifn_Ntk_t *p, Vec_Int_t *vLeaves, Vec_Int_t *vValues)
int Gia_ManBoxCoNum(Gia_Man_t *p)
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
static void Vec_IntFreeP(Vec_Int_t **p)
int If_ManSatCheckXY(void *pSat, int nLutSize, word *pTruth, int nVars, unsigned uSet, word *pTBound, word *pTFree, Vec_Int_t *vLits)
static void Abc_Print(int level, const char *format,...)
void Gia_ManIffTest(Gia_Man_t *pGia, If_LibLut_t *pLib, int fVerbose)
If_Man_t * Gia_ManToIf(Gia_Man_t *p, If_Par_t *pPars)
ABC_DLL void Abc_FrameSetManDsd2(void *pMan)
int If_CutSopBalanceEval(If_Man_t *p, If_Cut_t *pCut, Vec_Int_t *vAig)
int Gia_ManComputeOverlap(Gia_Man_t *p)
static int If_ObjIsTerm(If_Obj_t *pObj)
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
int Tim_ManBoxInputNum(Tim_Man_t *p, int iBox)
ABC_NAMESPACE_IMPL_START int Kit_TruthToGia(Gia_Man_t *pMan, unsigned *pTruth, int nVars, Vec_Int_t *vMemory, Vec_Int_t *vLeaves, int fHash)
DECLARATIONS ///.
int If_DsdManSuppSize(If_DsdMan_t *p, int iDsd)
static void Abc_TtFlip(word *pTruth, int nWords, int iVar)
static int Gia_ObjIsTravIdCurrentId(Gia_Man_t *p, int Id)
ABC_DLL void * Abc_FrameReadManDsd2()
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
int Gia_ManNonRegBoxNum(Gia_Man_t *p)
static int If_ManObjNum(If_Man_t *p)
static int If_CutLeafBit(If_Cut_t *pCut, int i)
static int Vec_IntEntryLast(Vec_Int_t *p)
static void If_ObjSetChoice(If_Obj_t *pObj, If_Obj_t *pEqu)
static int Abc_LitNot(int Lit)
static int If_CutDsdLit(If_Man_t *p, If_Cut_t *pCut)
static ABC_NAMESPACE_IMPL_START word Truth[8]
DECLARATIONS ///.
word If_DsdManGetFuncPerm(If_DsdMan_t *p, int iDsd)
static void Gia_ObjSetCopyArray(Gia_Man_t *p, int iObj, int iLit)
static Gia_Obj_t * Gia_ManCo(Gia_Man_t *p, int v)
static int Vec_IntSize(Vec_Int_t *p)
static int Gia_ManHasMapping(Gia_Man_t *p)
static int Kit_TruthIsOpposite(unsigned *pIn0, unsigned *pIn1, int nVars)
static int Abc_TtWordNum(int nVars)
If_DsdMan_t * If_DsdManAlloc(int nVars, int nLutSize)
int Gia_ManBuildFromMini(Gia_Man_t *pNew, If_Man_t *pIfMan, If_Cut_t *pCut, Vec_Int_t *vLeaves, Vec_Int_t *vAig, int fHash, int fUseDsd)
void Gia_ManMappingVerify(Gia_Man_t *p)
int Gia_ManNodeIfToGia(Gia_Man_t *pNew, If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Int_t *vLeaves, int fHash)
static void Vec_IntShrink(Vec_Int_t *p, int nSizeNew)
#define ABC_CONST(number)
PARAMETERS ///.
static int If_ObjIsConst1(If_Obj_t *pObj)
void If_ManCreateChoice(If_Man_t *p, If_Obj_t *pRepr)
int If_ManPerformMapping(If_Man_t *p)
int Gia_ManFromIfLogicFindLut(If_Man_t *pIfMan, Gia_Man_t *pNew, If_Cut_t *pCutBest, sat_solver *pSat, Vec_Int_t *vLeaves, Vec_Int_t *vLits, Vec_Int_t *vCover, Vec_Int_t *vMapping, Vec_Int_t *vMapping2, Vec_Int_t *vPacking)
Gia_Obj_t * Gia_ObjRecognizeMux(Gia_Obj_t *pNode, Gia_Obj_t **ppNodeT, Gia_Obj_t **ppNodeE)
int If_DsdManLutSize(If_DsdMan_t *p)
void If_ManCleanCutData(If_Man_t *p)
int Gia_ManNodeIfToGia_rec(Gia_Man_t *pNew, If_Man_t *pIfMan, If_Obj_t *pIfObj, Vec_Ptr_t *vVisited, int fHash)
int Gia_ManIsNormalized(Gia_Man_t *p)
void Gia_ManCollectAnds(Gia_Man_t *p, int *pNodes, int nNodes, Vec_Int_t *vNodes)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
If_Obj_t * If_ManCreateCi(If_Man_t *p)
void Gia_ManPrintLutStats(Gia_Man_t *p)
static int Abc_Lit2Var(int Lit)
#define ABC_CALLOC(type, num)
static int Gia_ObjFaninId0p(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManTestStruct(Gia_Man_t *p)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
#define Gia_ManForEachBuf(p, pObj, i)
char * If_DsdManGetCellStr(If_DsdMan_t *p)
int Gia_ManLutLevelWithBoxes(Gia_Man_t *p)
void Gia_ManPrintNodeProfile(int *pCounts, int nSizeMax)
If_Obj_t * If_ManCreateAnd(If_Man_t *p, If_Obj_t *pFan0, If_Obj_t *pFan1)
static void Vec_PtrClear(Vec_Ptr_t *p)
void Gia_ManSetIfParsDefault(void *pp)
FUNCTION DEFINITIONS ///.
static int Gia_ObjFanin0CopyArray(Gia_Man_t *p, Gia_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
static void Vec_IntPrint(Vec_Int_t *vVec)
static int Gia_ObjIsLut(Gia_Man_t *p, int Id)
int If_CutDsdBalanceEval(If_Man_t *p, If_Cut_t *pCut, Vec_Int_t *vAig)
void Gia_ManHashAlloc(Gia_Man_t *p)
#define Gia_ManForEachObj1(p, pObj, i)
int Gia_ManCountDupLut(Gia_Man_t *p)
int Gia_ManChoiceLevel(Gia_Man_t *p)
void Gia_ManIncrementTravId(Gia_Man_t *p)
int Gia_ManFromIfLogicNode(void *pIfMan, Gia_Man_t *pNew, int iObj, Vec_Int_t *vLeaves, Vec_Int_t *vLeavesTemp, word *pRes, char *pStr, Vec_Int_t *vCover, Vec_Int_t *vMapping, Vec_Int_t *vMapping2, Vec_Int_t *vPacking, int fCheck75, int fCheck44e)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
int Tim_ManBoxInputFirst(Tim_Man_t *p, int iBox)
static int Gia_ManPiNum(Gia_Man_t *p)
static void Vec_IntClear(Vec_Int_t *p)
void Gia_ManCleanMark01(Gia_Man_t *p)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
static void Gia_ObjSetTravIdCurrentId(Gia_Man_t *p, int Id)
int Gia_ManBuildFromMiniInt(Gia_Man_t *pNew, Vec_Int_t *vLeaves, Vec_Int_t *vAig, int fHash)
static char * If_CutDsdPerm(If_Man_t *p, If_Cut_t *pCut)
Gia_Man_t * Gia_ManPerformMappingInt(Gia_Man_t *p, If_Par_t *pPars)
char * Abc_UtilStrsav(char *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
void If_ManStop(If_Man_t *p)
#define Gia_LutForEachFanin(p, i, iFan, k)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
Gia_Man_t * Gia_ManPerformDsdBalance(Gia_Man_t *p, int nLutSize, int nCutNum, int nRelaxRatio, int fVerbose)
static int Gia_ObjCioId(Gia_Obj_t *pObj)
int Gia_ManClockDomainNum(Gia_Man_t *p)
static int Gia_ManObjNum(Gia_Man_t *p)
void Gia_ManMarkFanoutDrivers(Gia_Man_t *p)
static int Gia_ManCiIdToId(Gia_Man_t *p, int CiId)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
static int Gia_ManCoNum(Gia_Man_t *p)
static void Gia_ObjSetLevel(Gia_Man_t *p, Gia_Obj_t *pObj, int l)
static int Gia_ManRegNum(Gia_Man_t *p)