127 #define Dss_VecForEachObj( vVec, pObj, i ) \
128 Vec_PtrForEachEntry( Dss_Obj_t *, vVec, pObj, i )
129 #define Dss_VecForEachObjVec( vLits, vVec, pObj, i ) \
130 for ( i = 0; (i < Vec_IntSize(vLits)) && ((pObj) = Dss_Lit2Obj(vVec, Vec_IntEntry(vLits,i))); i++ )
131 #define Dss_VecForEachNode( vVec, pObj, i ) \
132 Vec_PtrForEachEntry( Dss_Obj_t *, vVec, pObj, i ) \
133 if ( pObj->Type == DAU_DSD_CONST0 || pObj->Type == DAU_DSD_VAR ) {} else
134 #define Dss_ObjForEachFanin( vVec, pObj, pFanin, i ) \
135 for ( i = 0; (i < Dss_ObjFaninNum(pObj)) && ((pFanin) = Dss_ObjFanin(vVec, pObj, i)); i++ )
136 #define Dss_ObjForEachChild( vVec, pObj, pFanin, i ) \
137 for ( i = 0; (i < Dss_ObjFaninNum(pObj)) && ((pFanin) = Dss_ObjChild(vVec, pObj, i)); i++ )
141 uWord = (uWord & 0x55555555) + ((uWord>>1) & 0x55555555);
142 uWord = (uWord & 0x33333333) + ((uWord>>2) & 0x33333333);
143 uWord = (uWord & 0x0F0F0F0F) + ((uWord>>4) & 0x0F0F0F0F);
144 uWord = (uWord & 0x00FF00FF) + ((uWord>>8) & 0x00FF00FF);
145 return (uWord & 0x0000FFFF) + (uWord>>16);
176 return (1 << pObj->
iVar);
180 int c0, c1, c2, uSuppTemp;
184 int uSupps[16], nSuppSizes[16];
187 uSupps[i] = Dss_ObjCheck666_rec( p, pFanin, vSupps );
190 if ( nSuppSizes[i] == 1 )
191 uSuppVars[nSuppVars++] = uSupps[i];
194 for ( c0 = 0; c0 < nFanins; c0++ )
195 if ( nSuppSizes[c0] > 1 && nSuppSizes[c0] < 6 )
197 uSuppTemp = uSupps[c0];
198 for ( i = 0; i < nSuppVars; i++ )
199 if ( nSuppSizes[c0] + i < 6 )
200 uSuppTemp |= uSuppVars[i];
206 for ( c1 = c0 + 1; c1 < nFanins; c1++ )
207 if ( nSuppSizes[c1] > 1 && nSuppSizes[c1] < 6 )
209 if ( nSuppSizes[c0] + nSuppSizes[c1] <= 6 )
212 uSuppTemp = uSupps[c0] | uSupps[c1];
213 for ( i = 0; i < nSuppVars; i++ )
214 if ( nSuppSizes[c0] + nSuppSizes[c1] + i < 6 )
215 uSuppTemp |= uSuppVars[i];
221 for ( c2 = c1 + 1; c2 < nFanins; c2++ )
222 if ( nSuppSizes[c2] > 1 && nSuppSizes[c2] < 6 )
224 if ( nSuppSizes[c0] + nSuppSizes[c1] + nSuppSizes[c2] <= 6 )
225 Vec_IntPush( vSupps, uSupps[c0] | uSupps[c1] | uSupps[c2] );
226 assert( nSuppSizes[c0] + nSuppSizes[c1] + nSuppSizes[c2] >= 6 );
230 if ( nSuppVars > 1 && nSuppVars <= 6 )
233 for ( i = 0; i < nSuppVars; i++ )
234 uSuppTemp |= uSuppVars[i];
237 else if ( nSuppVars > 6 && nSuppVars <= 12 )
240 for ( i = 0; i < 6; i++ )
241 uSuppTemp |= uSuppVars[i];
245 for ( i = 6; i < nSuppVars; i++ )
246 uSuppTemp |= uSuppVars[i];
253 uSupp |= Dss_ObjCheck666_rec( p, pFanin, vSupps );
262 int i, k, SuppI, SuppK;
268 Dss_ObjCheck666_rec( p,
Dss_Regular(p->pRoot), vSupps );
273 assert( k > 0 && k <= 6 );
314 void Dau_DsdCheckStructOne(
word * pTruth,
int nVars,
int nLeaves )
328 if ( pTruth == NULL )
349 Status = Dss_ObjCheck666( pNtk );
357 #define CLU_VAR_MAX 16
375 word Func0, Func1, Func2;
380 G =
If_CluCheck3( NULL, pTruth, nLeaves, nLutLeaf, nLutLeaf2, nLutRoot, &R, &G2, &Func0, &Func1, &Func2 );
404 if ( pTtElems[0] == NULL )
408 pTtElems[v] = TtElems[v];
447 pObj->
pFans[i] = Entry;
464 for ( i = 0; i < nVars; i++ )
480 char OpenType[7] = {0, 0, 0,
'(',
'[',
'<',
'{'};
481 char CloseType[7] = {0, 0, 0,
')',
']',
'>',
'}'};
486 { printf(
"%c",
'a' + pObj->
iVar );
return; }
489 printf(
"%c", OpenType[pObj->
Type] );
495 printf(
"%c", CloseType[pObj->
Type] );
527 for ( i = 0; pDsd[i]; i++ )
530 if ( pDsd[i] ==
'(' || pDsd[i] ==
'[' || pDsd[i] ==
'<' || pDsd[i] ==
'{' )
531 pNested[nNested++] = i;
532 else if ( pDsd[i] ==
')' || pDsd[i] ==
']' || pDsd[i] ==
'>' || pDsd[i] ==
'}' )
533 pMatches[pNested[--nNested]] = i;
546 while ( (**p >=
'A' && **p <=
'F') || (**p >=
'0' && **p <=
'9') )
556 if ( **p >=
'a' && **p <=
'z' )
558 if ( **p ==
'(' || **p ==
'[' || **p ==
'<' || **p ==
'{' )
562 char * q = pStr + pMatches[ *p - pStr ];
566 else if ( **p ==
'[' )
568 else if ( **p ==
'<' )
570 else if ( **p ==
'{' )
573 assert( *q == **p + 1 + (**p !=
'(') );
574 for ( (*p)++; *p < q; (*p)++ )
582 int i, uCanonPhase, nFanins =
Vec_IntSize(vFaninLits);
585 fCompl = (uCanonPhase >> nFanins) & 1;
587 for ( i = 0; i < nFanins; i++ )
667 for ( i = 0; i < nNodes-1; i++ )
670 for ( j = i+1; j < nNodes; j++ )
677 ABC_SWAP(
int, pPerm[i], pPerm[best_i] );
717 pObj->
iVar = (*pnPerms)++;
737 pChildren[k] = pChild;
776 Dss_Obj_t * pObj, * pFanin, * pPrev = NULL;
798 pObj->
pFans[i] = Entry;
826 for ( i = 0; i < p->
nBins; i++ )
832 printf(
"%d ", Counter );
838 static int s_Primes[8] = { 1699, 4177, 5147, 5647, 6343, 7103, 7873, 8147 };
840 unsigned uHash = Type * 7873 +
Vec_IntSize(vFaninLits) * 8147;
842 uHash += Entry * s_Primes[i & 0x7];
846 unsigned char * pTruthC = (
unsigned char *)pTruth;
848 for ( i = 0; i < nBytes; i++ )
849 uHash += pTruthC[i] * s_Primes[i & 0x7];
851 return uHash % p->
nBins;
860 if ( (
int)pObj->
Type == Type &&
906 static int s_Primes[8] = { 1699, 4177, 5147, 5647, 6343, 7103, 7873, 8147 };
909 for ( i = 0; i < 2*(int)pEnt->
nShared; i++ )
910 uHash += pEnt->
pShared[i] * s_Primes[i & 0x7];
917 for ( i = 0; i < p->
nCache; i++ )
920 for ( pSpot = p->
pCache + i; *pSpot; pSpot = &(*pSpot)->
pNext, Counter++ )
923 printf(
"%d ", Counter );
930 for ( ; *pSpot; pSpot = &(*pSpot)->
pNext )
932 if ( (*pSpot)->iDsd0 == pEnt->
iDsd0 &&
933 (*pSpot)->iDsd1 == pEnt->
iDsd1 &&
934 (*pSpot)->nShared == pEnt->
nShared &&
1007 char OpenType[7] = {0, 0, 0,
'(',
'[',
'<',
'{'};
1008 char CloseType[7] = {0, 0, 0,
')',
']',
'>',
'}'};
1013 { fprintf( pFile,
"0" );
return; }
1016 int iPermLit = pPermLits ? pPermLits[(*pnSupp)++] :
Abc_Var2Lit((*pnSupp)++, 0);
1022 fprintf( pFile,
"%c", OpenType[pObj->
Type] );
1028 fprintf( pFile,
"%c", CloseType[pObj->
Type] );
1037 fprintf( pFile,
"\n" );
1058 char * pFileName =
"dss_tts.txt";
1063 pFile = fopen( pFileName,
"wb" );
1064 if ( pFile == NULL )
1066 printf(
"Cannot open file \"%s\".\n", pFileName );
1075 fprintf( pFile,
"0x" );
1077 fprintf( pFile,
"\n" );
1089 int CountNonDsd = 0, CountNonDsdStr = 0;
1092 pFile = pFileName ? fopen( pFileName,
"wb" ) : stdout;
1093 if ( pFileName && pFile == NULL )
1095 printf(
"cannot open output file\n" );
1103 fprintf( pFile,
"Total number of objects = %8d\n",
Vec_PtrSize(p->
vObjs) );
1104 fprintf( pFile,
"Non-DSD objects (max =%2d) = %8d\n", p->
nNonDecLimit, CountNonDsd );
1105 fprintf( pFile,
"Non-DSD structures = %8d\n", CountNonDsdStr );
1107 fprintf( pFile,
"Memory used for array = %6.2f MB.\n", 1.0*
sizeof(
void *)*
Vec_PtrCap(p->
vObjs)/(1<<20) );
1108 fprintf( pFile,
"Memory used for hash table = %6.2f MB.\n", 1.0*
sizeof(
int)*p->
nBins/(1<<20) );
1123 fprintf( pFile,
"\n" );
1147 int iPermLit = pPermLits[(*pnSupp)++];
1148 assert( (*pnSupp) <= nVars );
1163 Abc_TtAnd( pRes, pRes, pTtTemp, nWords, 0 );
1165 Abc_TtXor( pRes, pRes, pTtTemp, nWords, 0 );
1167 if ( fCompl )
Abc_TtNot( pRes, nWords );
1176 Abc_TtMux( pRes, pTtTemp[0], pTtTemp[1], pTtTemp[2], nWords );
1177 if ( fCompl )
Abc_TtNot( pRes, nWords );
1186 if ( fCompl )
Abc_TtNot( pRes, nWords );
1201 else if ( iDsd == 1 )
1205 int iPermLit = pPermLits[nSupp++];
1239 pChildren[k] =
Dss_Not(pChildren[k]), fCompl ^= 1;
1246 pChildren[0] =
Dss_Not(pChildren[0]);
1251 pChildren[1] =
Dss_Not(pChildren[1]);
1252 pChildren[2] =
Dss_Not(pChildren[2]);
1258 for ( i = 0; i < k; i++ )
1291 int i, k, nChildren = 0, fCompl = 0, fComplFan;
1298 for ( k = 0; k < nLits; k++ )
1306 pBegEnd[nChildren] = (nSSize << 16) | (fComplFan << 8) | (nSSize +
Dss_Regular(pObj)->
nSupp);
1308 pChildren[nChildren++] = pObj;
1316 pBegEnd[nChildren] = (nSSize << 16) | (fComplFan << 8) | (nSSize +
Dss_Regular(pChild)->
nSupp);
1318 pChildren[nChildren++] = pChild;
1323 for ( j = i = 0; i < nChildren; i++ )
1324 for ( k = (pBegEnd[i] >> 16); k < (pBegEnd[i] & 0xFF); k++ )
1325 pPerm[j++] = (
unsigned char)
Abc_Var2Lit( k, (pBegEnd[i] >> 8) & 1 );
1330 for ( k = 0; k < nLits; k++ )
1334 pChildren[nChildren++] = pObj;
1337 pChildren[nChildren++] = pChild;
1343 for ( k = 0; k < nLits; k++ )
1348 pChildren[nChildren++] = pObj;
1353 pChildren[nChildren++] = pChild;
1363 ABC_SWAP(
int, pLits[1], pLits[2] );
1371 for ( k = 0; k < nLits; k++ )
1376 for ( k = 0; k < nLits; k++ )
1383 for ( i = 0; i < nChildren; i++ )
1391 static char Buffer[100];
1395 pFun->nFans = nFansTot;
1415 for ( i = 0; i < (int)p->
nShared; i++ )
1417 printf(
"-> %d ", pFun->iDsd );
1435 static char Buffer[100];
1443 int i, nNonDec, nSuppSize = 0;
1448 for ( i = 0; i < nFans[0]; i++ )
1450 pMapDsd2Truth[nSuppSize] = i;
1460 for ( i = 0; i < nFans[1]; i++ )
1462 for ( i = 0; i < (int)pEnt->
nShared; i++ )
1464 for ( i = 0; i < nFans[1]; i++ )
1465 if ( pPermLits[i] == -1 )
1467 pMapDsd2Truth[nSuppSize] = nFans[0] + i;
1491 for ( i = 0; i < (int)pFun->nFans; i++ )
1492 pFun->pFans[i] = (
unsigned char)
Abc_Lit2LitV( pMapDsd2Truth, pPermDsd[i] );
1512 static char Buffer[100];
1514 pEnt->
iDsd0 = iDsd[0];
1515 pEnt->
iDsd1 = iDsd[1];
1520 for ( i = 0; i < nFans[0]; i++ )
1522 for ( i = 0; i < nFans[1]; i++ )
1525 if ( (uSharedMask >> g) & 1 )
1527 assert( pMapGtoL[g] >= 0 );
1539 int Dss_ManMerge(
Dss_Man_t * p,
int * iDsd,
int * nFans,
int ** pFans,
unsigned uSharedMask,
int nKLutSize,
unsigned char * pPermRes,
word * pTruth )
1554 printf(
"Paramater DAU_MAX_VAR (%d) smaller than LUT size (%d).\n",
DAU_MAX_VAR, nKLutSize );
1557 assert( iDsd[0] <= iDsd[1] );
1566 if ( iDsd[0] == 0 )
return 0;
1567 if ( iDsd[0] == 1 )
return iDsd[1];
1568 if ( iDsd[1] == 0 )
return 0;
1569 if ( iDsd[1] == 1 )
return iDsd[0];
1583 if ( uSharedMask == 0 )
1590 assert( (
int)pFun->nFans <= nKLutSize );
1599 if ( *ppSpot == NULL )
1601 if ( uSharedMask == 0 )
1608 assert( (
int)pFun->nFans <= nKLutSize );
1612 pFun = (*ppSpot)->pFunc;
1617 for ( i = 0; i < (int)pFun->nFans; i++ )
1618 if ( pFun->pFans[i] < 2 * nFans[0] )
1619 pPermRes[i] = (
unsigned char)
Dss_Lit2Lit( pFans[0], pFun->pFans[i] );
1621 pPermRes[i] = (
unsigned char)
Dss_Lit2Lit( pFans[1], pFun->pFans[i] - 2 * nFans[0] );
1623 if ( uSharedMask && pFun->nFans > 1 )
1627 for ( i = 0; i < p->
nVars; i++ )
1629 for ( i = 0; i < (int)pFun->nFans; i++ )
1631 for ( i = 0; i < p->
nVars; i++ )
1632 if ( pVarPres[i] >= 0 )
1634 assert( nSupp == (
int)pFun->nFans );
1637 for ( i = 0; i < (int)pFun->nFans; i++ )
1638 pPermResInt[i] = pPermRes[i];
1647 if ( Counter == 43418 )
1662 printf(
"Verification failed.\n" );
1683 static char Buffer[100];
1685 pEnt->
iDsd0 = iDsd0;
1686 pEnt->
iDsd1 = iDsd1;
1699 int iDsd[2] = { iDsd0, iDsd1 };
1703 assert( iDsd0 <= iDsd1 );
1706 printf(
"Paramater DAU_MAX_VAR (%d) smaller than LUT size (%d).\n",
DAU_MAX_VAR, *pnLeaves );
1721 if ( *ppSpot == NULL )
1730 assert( (
int)pFun->nFans <= *pnLeaves );
1734 pFun = (*ppSpot)->pFunc;
1737 *pnLeaves = (int)pFun->nFans;
1738 for ( i = 0; i < (int)pFun->nFans; i++ )
1739 pPerm[i] = (int)pFun->pFans[i];
1820 char * pDsd =
"(!(a!(bh))[cde]!(fg))";
1861 for ( s = 2; s <= nVars; s++ )
1864 for ( i = 1; i < s; i++ )
1865 for ( k = i; k < s; k++ )
1898 if ( fAddInv0 && fAddInv1 )
1981 int iLit1[3] = { 2, 4 };
1982 int iLit2[3] = { 2, 4, 6 };
1984 int nFans[2] = { 4, 3 };
1985 int pPermLits1[4] = { 0, 2, 5, 6 };
1986 int pPermLits2[5] = { 2, 9, 10 };
1987 int * pPermLits[2] = { pPermLits1, pPermLits2 };
1988 unsigned char pPermRes[6];
1990 unsigned uMaskShared = 2;
2005 iRes[4] =
Dss_ManMerge( p, iRes+2, nFans, pPermLits, uMaskShared, 6, pPermRes, NULL );
2007 for ( i = 0; i < 6; i++ )
2008 pPermResInt[i] = pPermRes[i];
#define Dss_VecForEachNode(vVec, pObj, i)
void Dss_NtkPrint_rec(Dss_Ntk_t *p, Dss_Obj_t *pObj)
void Dss_ManFree(Dss_Man_t *p)
void Dss_ManPrint(char *pFileName, Dss_Man_t *p)
static int * Vec_IntArray(Vec_Int_t *p)
static int Dss_EntWordNum(Dss_Ent_t *p)
void Dss_NtkTransform(Dss_Ntk_t *p, int *pPermDsd)
static Dss_Obj_t * Dss_Lit2Obj(Vec_Ptr_t *p, int iLit)
Dss_Fun_t * Dss_ManBooleanAnd(Dss_Man_t *p, Dss_Ent_t *pEnt, int Counter)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Abc_PrimeCudd(unsigned int p)
static int Dss_FunWordNum(Dss_Fun_t *p)
static Dss_Obj_t * Dss_VecVar(Vec_Ptr_t *p, int v)
static int Abc_Lit2LitV(int *pMap, int Lit)
word * Dss_ManComputeTruth(Dss_Man_t *p, int iDsd, int nVars, int *pPermLits)
struct Dss_Ent_t_ Dss_Ent_t
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
void Dss_ManCacheProfile(Dss_Man_t *p)
static int Dss_IsComplement(Dss_Obj_t *p)
int Dss_ManCheckNonDec_rec(Dss_Man_t *p, Dss_Obj_t *pObj)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static char * Vec_StrArray(Vec_Str_t *p)
Dss_Obj_t * Dss_ObjAlloc(Dss_Man_t *p, int Type, int nFans, int nTruthVars)
static int Dau_DsdReadVar(char *p)
static Dss_Obj_t * Dss_ObjFanin(Vec_Ptr_t *p, Dss_Obj_t *pObj, int i)
static void Abc_TtPrintHexRev(FILE *pFile, word *pTruth, int nVars)
static int Abc_Var2Lit(int Var, int fCompl)
Dss_Ent_t * Dss_ManSharedMapDerive(Dss_Man_t *p, int iDsd0, int iDsd1, Vec_Str_t *vShared)
int Dau_DsdDecompose(word *pTruth, int nVarsInit, int fSplitPrime, int fWriteTruth, char *pRes)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Dss_Obj_t * Dss_ObjFindOrAdd(Dss_Man_t *p, int Type, Vec_Int_t *vFaninLits, word *pTruth)
#define ABC_ALLOC(type, num)
int Dss_ObjCheckTransparent(Dss_Man_t *p, Dss_Obj_t *pObj)
If_Grp_t If_CluCheck3(If_Man_t *p, word *pTruth0, int nVars, int nLutLeaf, int nLutLeaf2, int nLutRoot, If_Grp_t *pR, If_Grp_t *pG2, word *pFunc0, word *pFunc1, word *pFunc2)
void Dss_ManCacheAlloc(Dss_Man_t *p)
static int Dss_ObjId(Dss_Obj_t *pObj)
static int Dau_DsdIsConst(char *p)
MACRO DEFINITIONS ///.
static int Dss_ObjWordNum(int nFans)
static abctime Abc_Clock()
void Dss_ManComputeTruth_rec(Dss_Man_t *p, Dss_Obj_t *pObj, int nVars, word *pRes, int *pPermLits, int *pnSupp)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
void Dss_ManPrintOne(FILE *pFile, Dss_Man_t *p, int iDsdLit, int *pPermLits)
static void Abc_TtConst1(word *pIn1, int nWords)
static int Abc_LitNotCond(int Lit, int c)
unsigned * Dss_ObjHashLookup(Dss_Man_t *p, int Type, Vec_Int_t *vFaninLits, word *pTruth)
for(p=first;p->value< newval;p=p->next)
static int Abc_TtByteNum(int nVars)
#define ABC_SWAP(Type, a, b)
char * Mem_FlexEntryFetch(Mem_Flex_t *p, int nBytes)
struct Dss_Obj_t_ Dss_Obj_t
static Dss_Obj_t * Dss_VecConst0(Vec_Ptr_t *p)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static int Dss_Lit2Lit(int *pMapLit, int Lit)
Mem_Flex_t * Mem_FlexStart()
Dss_Ent_t * Dss_ManSharedMap(Dss_Man_t *p, int *iDsd, int *nFans, int **pFans, unsigned uSharedMask)
static int s_Primes[MAX_PRIMES]
static int Abc_LitIsCompl(int Lit)
static void Dss_ObjClean(Dss_Obj_t *pObj)
Dss_Obj_t * Dss_ObjCreateNtk(Dss_Ntk_t *p, int Type, Vec_Int_t *vFaninLits)
static void Abc_TtCopy(word *pOut, word *pIn, int nWords, int fCompl)
static void Vec_VecPushInt(Vec_Vec_t *p, int Level, int Entry)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static Dss_Obj_t * Dss_Regular(Dss_Obj_t *p)
#define DAU_MAX_VAR
INCLUDES ///.
void Dss_ManHashProfile(Dss_Man_t *p)
static int Dss_ObjFaninC(Dss_Obj_t *pObj, int i)
int Dss_NtkRebuild_rec(Dss_Man_t *p, Dss_Ntk_t *pNtk, Dss_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
Dss_Obj_t * Dss_ObjAllocNtk(Dss_Ntk_t *p, int Type, int nFans, int nTruthVars)
unsigned __int64 word
DECLARATIONS ///.
static word * Dss_ObjTruth(Dss_Obj_t *pObj)
Dss_Ent_t ** Dss_ManCacheLookup(Dss_Man_t *p, Dss_Ent_t *pEnt)
#define ABC_NAMESPACE_IMPL_END
#define CLU_VAR_MAX
DECLARATIONS ///.
static void Abc_TtStretch6(word *pInOut, int nVarS, int nVarB)
static int Vec_IntUniqify(Vec_Int_t *p)
void Dau_DsdTruthCompose_rec(word *pFunc, word pFanins[DAU_MAX_VAR][DAU_MAX_WORD], word *pRes, int nVars, int nWordsR)
void Dss_ManPrint_rec(FILE *pFile, Dss_Man_t *p, Dss_Obj_t *pObj, int *pPermLits, int *pnSupp)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static void Dau_DsdMergeMatches(char *pDsd, int *pMatches)
Dss_Obj_t * Dss_ObjCreate(Dss_Man_t *p, int Type, Vec_Int_t *vFaninLits, word *pTruth)
static Vec_Vec_t * Vec_VecStart(int nSize)
Dss_Ent_t * Dss_ManCacheCreate(Dss_Man_t *p, Dss_Ent_t *pEnt0, Dss_Fun_t *pFun0)
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
static void Vec_IntFreeP(Vec_Int_t **p)
int Mpm_FuncCompute(Dss_Man_t *p, int iDsd0, int iDsd1, Vec_Str_t *vShared, int *pPerm, int *pnLeaves)
typedefABC_NAMESPACE_IMPL_START struct Dss_Fun_t_ Dss_Fun_t
DECLARATIONS ///.
void Dss_ObjSort(Vec_Ptr_t *p, Dss_Obj_t **pNodes, int nNodes, int *pPerm)
static Dss_Obj_t * Dss_Not(Dss_Obj_t *p)
#define Dss_ObjForEachFanin(vVec, pObj, pFanin, i)
static int Vec_PtrCap(Vec_Ptr_t *p)
void Dss_NtkCheck(Dss_Ntk_t *p)
static word ** Dss_ManTtElems()
FUNCTION DEFINITIONS ///.
static Dss_Obj_t * Dss_ObjChild(Vec_Ptr_t *p, Dss_Obj_t *pObj, int i)
void Mem_FlexStop(Mem_Flex_t *p, int fVerbose)
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
static int Dss_VecLitSuppSize(Vec_Ptr_t *p, int iLit)
#define ABC_NAMESPACE_IMPL_START
static unsigned Dss_ManCacheHashKey(Dss_Man_t *p, Dss_Ent_t *pEnt)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static int Vec_StrSize(Vec_Str_t *p)
static int Abc_LitNot(int Lit)
static ABC_NAMESPACE_IMPL_START word Truth[8]
DECLARATIONS ///.
static int Vec_IntSize(Vec_Int_t *p)
int Dss_ObjCompare(Vec_Ptr_t *p, Dss_Obj_t *p0i, Dss_Obj_t *p1i)
static int Dss_WordCountOnes(unsigned uWord)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Abc_TtWordNum(int nVars)
static Dss_Obj_t * Dss_NotCond(Dss_Obj_t *p, int c)
Dss_Ntk_t * Dss_NtkCreate(char *pDsd, int nVars, word *pTruth)
static int Dss_ObjSuppSize(Dss_Obj_t *pObj)
static void Abc_TtMux(word *pOut, word *pCtrl, word *pIn1, word *pIn0, int nWords)
static int Abc_TtEqual(word *pIn1, word *pIn2, int nWords)
static void Abc_TtConst0(word *pIn1, int nWords)
int Mem_FlexReadMemUsage(Mem_Flex_t *p)
Dss_Fun_t * Dss_ManOperationFun(Dss_Man_t *p, int *iDsd, int nFansTot)
static int Dss_ObjFaninNum(Dss_Obj_t *pObj)
static unsigned Dss_ObjHashKey(Dss_Man_t *p, int Type, Vec_Int_t *vFaninLits, word *pTruth)
Dss_Man_t * Dss_ManAlloc(int nVars, int nNonDecLimit)
#define ABC_CALLOC(type, num)
static int Abc_Lit2Var(int Lit)
#define Dss_ObjForEachChild(vVec, pObj, pFanin, i)
unsigned Abc_TtCanonicize(word *pTruth, int nVars, char *pCanonPerm)
FUNCTION DECLARATIONS ///.
void Dss_ManCacheFree(Dss_Man_t *p)
static void Vec_PtrFreeP(Vec_Ptr_t **p)
int Dss_NtkCreate_rec(char *pStr, char **p, int *pMatches, Dss_Ntk_t *pNtk, word *pTruth)
static int Abc_LitRegular(int Lit)
static int * Vec_IntEntryP(Vec_Int_t *p, int i)
static int Dau_DsdIsVar(char *p)
static int Dss_Obj2Lit(Dss_Obj_t *pObj)
void Dss_EntPrint(Dss_Ent_t *p, Dss_Fun_t *pFun)
static void Abc_TtAnd(word *pOut, word *pIn1, word *pIn2, int nWords, int fCompl)
static void Vec_IntFree(Vec_Int_t *p)
void Dss_NtkFree(Dss_Ntk_t *p)
static void Vec_IntClear(Vec_Int_t *p)
int Dss_NtkRebuild(Dss_Man_t *p, Dss_Ntk_t *pNtk)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
#define Dss_VecForEachObj(vVec, pObj, i)
Dss_Ntk_t * Dss_NtkAlloc(int nVars)
int Dss_ManOperation(Dss_Man_t *p, int Type, int *pLits, int nLits, unsigned char *pPerm, word *pTruth)
int Dss_ManMerge(Dss_Man_t *p, int *iDsd, int *nFans, int **pFans, unsigned uSharedMask, int nKLutSize, unsigned char *pPermRes, word *pTruth)
static void Abc_TtXor(word *pOut, word *pIn1, word *pIn2, int nWords, int fCompl)
void Dss_NtkPrint(Dss_Ntk_t *p)
static void Abc_TtElemInit(word **pTtElems, int nVars)
static int Dss_ObjType(Dss_Obj_t *pObj)
static void Abc_TtNot(word *pOut, int nWords)
#define Dss_VecForEachObjVec(vLits, vVec, pObj, i)
static Dss_Obj_t * Dss_VecObj(Vec_Ptr_t *p, int Id)
static void Vec_PtrFree(Vec_Ptr_t *p)
void Dss_ManDump(Dss_Man_t *p)
int Dss_NtkCollectPerm_rec(Dss_Ntk_t *p, Dss_Obj_t *pObj, int *pPermDsd, int *pnPerms)