21 #ifndef ABC__aig__kit__kit_h
22 #define ABC__aig__kit__kit_h
147 static inline unsigned Kit_DsdObjOffset(
int nFans ) {
return (nFans >> 1) + ((nFans & 1) > 0); }
155 #define Kit_DsdNtkForEachObj( pNtk, pObj, i ) \
156 for ( i = 0; (i < (pNtk)->nNodes) && ((pObj) = (pNtk)->pNodes[i]); i++ )
157 #define Kit_DsdObjForEachFanin( pNtk, pObj, iLit, i ) \
158 for ( i = 0; (i < (int)(pObj)->nFans) && ((iLit) = (pObj)->pFans[i], 1); i++ )
159 #define Kit_DsdObjForEachFaninReverse( pNtk, pObj, iLit, i ) \
160 for ( i = (int)(pObj)->nFans - 1; (i >= 0) && ((iLit) = (pObj)->pFans[i], 1); i-- )
162 #define Kit_PlaForEachCube( pSop, nFanins, pCube ) \
163 for ( pCube = (pSop); *pCube; pCube += (nFanins) + 3 )
164 #define Kit_PlaCubeForEachVar( pCube, Value, i ) \
165 for ( i = 0; (pCube[i] != ' ') && (Value = pCube[i]); i++ )
171 #define KIT_MIN(a,b) (((a) < (b))? (a) : (b))
172 #define KIT_MAX(a,b) (((a) > (b))? (a) : (b))
173 #define KIT_INFINITY (100000000)
175 static inline int Kit_CubeHasLit(
unsigned uCube,
int i ) {
return(uCube & (
unsigned)(1<<i)) > 0; }
176 static inline unsigned Kit_CubeSetLit(
unsigned uCube,
int i ) {
return uCube | (unsigned)(1<<i); }
177 static inline unsigned Kit_CubeXorLit(
unsigned uCube,
int i ) {
return uCube ^ (unsigned)(1<<i); }
178 static inline unsigned Kit_CubeRemLit(
unsigned uCube,
int i ) {
return uCube & ~(unsigned)(1<<i); }
180 static inline int Kit_CubeContains(
unsigned uLarge,
unsigned uSmall ) {
return (uLarge & uSmall) == uSmall; }
181 static inline unsigned Kit_CubeSharp(
unsigned uCube,
unsigned uMask ) {
return uCube & ~uMask; }
182 static inline unsigned Kit_CubeMask(
int nVar ) {
return (~(
unsigned)0) >> (32-nVar); }
223 static inline int Kit_BitWordNum(
int nBits ) {
return nBits/(8*
sizeof(unsigned)) + ((nBits%(8*
sizeof(unsigned))) > 0); }
224 static inline int Kit_TruthWordNum(
int nVars ) {
return nVars <= 5 ? 1 : (1 << (nVars - 5)); }
225 static inline unsigned Kit_BitMask(
int nBits ) {
assert( nBits <= 32 );
return ~((~(unsigned)0) << nBits); }
227 static inline void Kit_TruthSetBit(
unsigned *
p,
int Bit ) { p[Bit>>5] |= (1<<(Bit & 31)); }
228 static inline void Kit_TruthXorBit(
unsigned *
p,
int Bit ) { p[Bit>>5] ^= (1<<(Bit & 31)); }
229 static inline int Kit_TruthHasBit(
unsigned *
p,
int Bit ) {
return (p[Bit>>5] & (1<<(Bit & 31))) > 0; }
234 for ( i = 0; i < 32; i++ )
235 if ( uWord & (1 << i) )
241 return (uWord & (uWord - 1)) == 0;
245 uWord = (uWord & 0x55555555) + ((uWord>>1) & 0x55555555);
246 uWord = (uWord & 0x33333333) + ((uWord>>2) & 0x33333333);
247 uWord = (uWord & 0x0F0F0F0F) + ((uWord>>4) & 0x0F0F0F0F);
248 uWord = (uWord & 0x00FF00FF) + ((uWord>>8) & 0x00FF00FF);
249 return (uWord & 0x0000FFFF) + (uWord>>16);
278 if ( pIn0[w] != pIn1[w] )
286 if ( (pIn0[w] & pCare[w]) != (pIn1[w] & pCare[w]) )
294 if ( pIn0[w] != ~pIn1[w] )
301 if ( (pIn0[0] & 1) == (pIn1[0] & 1) )
304 if ( pIn0[w] != pIn1[w] )
310 if ( pIn0[w] != ~pIn1[w] )
327 if ( pIn[w] != ~(
unsigned)0 )
335 if ( pIn1[w] & ~pIn2[w] )
343 if ( pIn1[w] & pIn2[w] )
351 if ( pIn1[w] & pIn2[w] & pIn3[w] )
355 static inline void Kit_TruthCopy(
unsigned * pOut,
unsigned * pIn,
int nVars )
371 pOut[w] = ~(
unsigned)0;
373 static inline void Kit_TruthNot(
unsigned * pOut,
unsigned * pIn,
int nVars )
379 static inline void Kit_TruthAnd(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
int nVars )
383 pOut[w] = pIn0[w] & pIn1[w];
385 static inline void Kit_TruthOr(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
int nVars )
389 pOut[w] = pIn0[w] | pIn1[w];
391 static inline void Kit_TruthXor(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
int nVars )
395 pOut[w] = pIn0[w] ^ pIn1[w];
397 static inline void Kit_TruthSharp(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
int nVars )
401 pOut[w] = pIn0[w] & ~pIn1[w];
403 static inline void Kit_TruthNand(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
int nVars )
407 pOut[w] = ~(pIn0[w] & pIn1[w]);
409 static inline void Kit_TruthAndPhase(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
int nVars,
int fCompl0,
int fCompl1 )
412 if ( fCompl0 && fCompl1 )
415 pOut[w] = ~(pIn0[w] | pIn1[w]);
417 else if ( fCompl0 && !fCompl1 )
420 pOut[w] = ~pIn0[w] & pIn1[w];
422 else if ( !fCompl0 && fCompl1 )
425 pOut[w] = pIn0[w] & ~pIn1[w];
430 pOut[w] = pIn0[w] & pIn1[w];
433 static inline void Kit_TruthOrPhase(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
int nVars,
int fCompl0,
int fCompl1 )
436 if ( fCompl0 && fCompl1 )
439 pOut[w] = ~(pIn0[w] & pIn1[w]);
441 else if ( fCompl0 && !fCompl1 )
444 pOut[w] = ~pIn0[w] | pIn1[w];
446 else if ( !fCompl0 && fCompl1 )
449 pOut[w] = pIn0[w] | ~pIn1[w];
454 pOut[w] = pIn0[w] | pIn1[w];
457 static inline void Kit_TruthMux(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
unsigned * pCtrl,
int nVars )
461 pOut[w] = (pIn0[w] & ~pCtrl[w]) | (pIn1[w] & pCtrl[w]);
463 static inline void Kit_TruthMuxPhase(
unsigned * pOut,
unsigned * pIn0,
unsigned * pIn1,
unsigned * pCtrl,
int nVars,
int fComp0 )
468 pOut[w] = (~pIn0[w] & ~pCtrl[w]) | (pIn1[w] & pCtrl[w]);
471 pOut[w] = (pIn0[w] & ~pCtrl[w]) | (pIn1[w] & pCtrl[w]);
475 unsigned Masks[5] = { 0xAAAAAAAA, 0xCCCCCCCC, 0xF0F0F0F0, 0xFF00FF00, 0xFFFF0000 };
476 int k,
nWords = (nVars <= 5 ? 1 : (1 << (nVars - 5)));
479 for ( k = 0; k <
nWords; k++ )
480 pTruth[k] = Masks[iVar];
484 for ( k = 0; k <
nWords; k++ )
485 if ( k & (1 << (iVar-5)) )
486 pTruth[k] = ~(unsigned)0;
497 #define Kit_SopForEachCube( cSop, uCube, i ) \
498 for ( i = 0; (i < Kit_SopCubeNum(cSop)) && ((uCube) = Kit_SopCube(cSop, i)); i++ )
499 #define Kit_CubeForEachLiteral( uCube, Lit, nLits, i ) \
500 for ( i = 0; (i < (nLits)) && ((Lit) = Kit_CubeHasLit(uCube, i)); i++ )
502 #define Kit_GraphForEachLeaf( pGraph, pLeaf, i ) \
503 for ( i = 0; (i < (pGraph)->nLeaves) && (((pLeaf) = Kit_GraphNode(pGraph, i)), 1); i++ )
504 #define Kit_GraphForEachNode( pGraph, pAnd, i ) \
505 for ( i = (pGraph)->nLeaves; (i < (pGraph)->nSize) && (((pAnd) = Kit_GraphNode(pGraph, i)), 1); i++ )
548 extern int Kit_DsdCofactoring(
unsigned * pTruth,
int nVars,
int * pCofVars,
int nLimit,
int fVerbose );
583 extern char *
Kit_PlaStart(
void *
p,
int nCubes,
int nVars );
606 extern void Kit_TruthStretch(
unsigned * pOut,
unsigned * pIn,
int nVars,
int nVarsAll,
unsigned Phase,
int fReturnIn );
607 extern void Kit_TruthPermute(
unsigned * pOut,
unsigned * pIn,
int nVars,
char *
pPerm,
int fReturnIn );
608 extern void Kit_TruthShrink(
unsigned * pOut,
unsigned * pIn,
int nVars,
int nVarsAll,
unsigned Phase,
int fReturnIn );
617 extern void Kit_TruthExist(
unsigned * pTruth,
int nVars,
int iVar );
618 extern void Kit_TruthExistNew(
unsigned * pRes,
unsigned * pTruth,
int nVars,
int iVar );
619 extern void Kit_TruthExistSet(
unsigned * pRes,
unsigned * pTruth,
int nVars,
unsigned uMask );
621 extern void Kit_TruthForallNew(
unsigned * pRes,
unsigned * pTruth,
int nVars,
int iVar );
622 extern void Kit_TruthForallSet(
unsigned * pRes,
unsigned * pTruth,
int nVars,
unsigned uMask );
623 extern void Kit_TruthUniqueNew(
unsigned * pRes,
unsigned * pTruth,
int nVars,
int iVar );
624 extern void Kit_TruthMuxVar(
unsigned * pOut,
unsigned * pCof0,
unsigned * pCof1,
int nVars,
int iVar );
625 extern void Kit_TruthMuxVarPhase(
unsigned * pOut,
unsigned * pCof0,
unsigned * pCof1,
int nVars,
int iVar,
int fCompl0 );
627 extern int Kit_TruthVarsSymm(
unsigned * pTruth,
int nVars,
int iVar0,
int iVar1,
unsigned * pCof0,
unsigned * pCof1 );
628 extern int Kit_TruthVarsAntiSymm(
unsigned * pTruth,
int nVars,
int iVar0,
int iVar1,
unsigned * pCof0,
unsigned * pCof1 );
630 extern int Kit_TruthBestCofVar(
unsigned * pTruth,
int nVars,
unsigned * pCof0,
unsigned * pCof1 );
static int Kit_TruthFindFirstZero(unsigned *pIn, int nVars)
static Kit_Node_t * Kit_GraphNodeLast(Kit_Graph_t *pGraph)
void Kit_SopBestLiteralCover(Kit_Sop_t *cResult, Kit_Sop_t *cSop, unsigned uCube, int nLits, Vec_Int_t *vMemory)
static void Kit_TruthAndPhase(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars, int fCompl0, int fCompl1)
int Kit_PlaIsBuf(char *pSop)
int Kit_TruthBestCofVar(unsigned *pTruth, int nVars, unsigned *pCof0, unsigned *pCof1)
static unsigned Kit_SopCube(Kit_Sop_t *cSop, int i)
Kit_Node_t * Kit_GraphAppendNode(Kit_Graph_t *pGraph)
static int Kit_BitWordNum(int nBits)
static int Kit_SuppIsMinBase(int Supp)
static Kit_DsdObj_t * Kit_DsdNtkRoot(Kit_DsdNtk_t *pNtk)
static int Kit_CubeContains(unsigned uLarge, unsigned uSmall)
int Kit_CreateCloud(CloudManager *dd, CloudNode *pFunc, Vec_Int_t *vNodes)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static unsigned Kit_DsdObjOffset(int nFans)
static void Kit_TruthSetBit(unsigned *p, int Bit)
DdNode * Kit_SopToBdd(DdManager *dd, Kit_Sop_t *cSop, int nVars)
FUNCTION DECLARATIONS ///.
int Kit_DsdNonDsdSizeMax(Kit_DsdNtk_t *pNtk)
void Kit_SopDivideByCube(Kit_Sop_t *cSop, Kit_Sop_t *cDiv, Kit_Sop_t *vQuo, Kit_Sop_t *vRem, Vec_Int_t *vMemory)
void Kit_TruthPrintProfile(unsigned *pTruth, int nVars)
static int Kit_TruthWordNum(int nVars)
typedefABC_NAMESPACE_HEADER_START struct cloudManager CloudManager
void Kit_PlaComplement(char *pSop)
void Kit_TruthCofactor0(unsigned *pTruth, int nVars, int iVar)
static unsigned Kit_CubeSharp(unsigned uCube, unsigned uMask)
void Kit_TruthForall(unsigned *pTruth, int nVars, int iVar)
int Kit_SopDivisor(Kit_Sop_t *cResult, Kit_Sop_t *cSop, int nLits, Vec_Int_t *vMemory)
void Kit_TruthSwapAdjacentVars(unsigned *pOut, unsigned *pIn, int nVars, int Start)
DECLARATIONS ///.
static void Kit_TruthFill(unsigned *pOut, int nVars)
unsigned Kit_DsdGetSupports(Kit_DsdNtk_t *p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Kit_TruthIsEqualWithPhase(unsigned *pIn0, unsigned *pIn1, int nVars)
void Kit_TruthExistSet(unsigned *pRes, unsigned *pTruth, int nVars, unsigned uMask)
static int Kit_WordHasOneBit(unsigned uWord)
int Kit_PlaIsConst0(char *pSop)
DECLARATIONS ///.
static Kit_Node_t * Kit_GraphNode(Kit_Graph_t *pGraph, int i)
void Kit_TruthMuxVarPhase(unsigned *pOut, unsigned *pCof0, unsigned *pCof1, int nVars, int iVar, int fCompl0)
static int Kit_TruthIsDisjoint3(unsigned *pIn1, unsigned *pIn2, unsigned *pIn3, int nVars)
void Kit_TruthPermute(unsigned *pOut, unsigned *pIn, int nVars, char *pPerm, int fReturnIn)
char * Kit_PlaFromTruthNew(unsigned *pTruth, int nVars, Vec_Int_t *vCover, Vec_Str_t *vStr)
void Kit_TruthCountOnesInCofs(unsigned *pTruth, int nVars, int *pStore)
static int Kit_TruthIsImply(unsigned *pIn1, unsigned *pIn2, int nVars)
char * Kit_PlaFromTruth(void *p, unsigned *pTruth, int nVars, Vec_Int_t *vCover)
int Kit_CreateCloudFromTruth(CloudManager *dd, unsigned *pTruth, int nVars, Vec_Int_t *vNodes)
static int Kit_GraphIsComplement(Kit_Graph_t *pGraph)
static Kit_Edge_t Kit_IntToEdge(unsigned Edge)
Kit_DsdNtk_t * Kit_DsdDecomposeExpand(unsigned *pTruth, int nVars)
static int Kit_GraphLeaveNum(Kit_Graph_t *pGraph)
static Kit_DsdObj_t * Kit_DsdNtkObj(Kit_DsdNtk_t *pNtk, int Id)
Kit_DsdNtk_t * Kit_DsdDecomposeMux(unsigned *pTruth, int nVars, int nDecMux)
unsigned Kit_DsdNonDsdSupports(Kit_DsdNtk_t *pNtk)
unsigned * Kit_TruthCompose(CloudManager *dd, unsigned *pTruth, int nVars, unsigned **pInputs, int nVarsAll, Vec_Ptr_t *vStore, Vec_Int_t *vNodes)
static Kit_Edge_t Kit_IntToEdge_(unsigned m)
void Kit_DsdTruth(Kit_DsdNtk_t *pNtk, unsigned *pTruthRes)
void Kit_TruthChangePhase(unsigned *pTruth, int nVars, int iVar)
DdNode * Kit_TruthToBdd(DdManager *dd, unsigned *pTruth, int nVars, int fMSBonTop)
int Kit_TruthVarIsVacuous(unsigned *pOnset, unsigned *pOffset, int nVars, int iVar)
void Kit_DsdPrintFromTruth2(FILE *pFile, unsigned *pTruth, int nVars)
int Kit_PlaIsInv(char *pSop)
static Kit_Edge_t Kit_EdgeCreate(int Node, int fCompl)
static unsigned Kit_CubeMask(int nVar)
static int Kit_GraphIsConst0(Kit_Graph_t *pGraph)
int Kit_SopIsCubeFree(Kit_Sop_t *cSop)
void Kit_SopDup(Kit_Sop_t *cResult, Kit_Sop_t *cSop, Vec_Int_t *vMemory)
void Kit_TruthCountOnesInCofsSlow(unsigned *pTruth, int nVars, int *pStore, unsigned *pAux)
void Kit_TruthMuxVar(unsigned *pOut, unsigned *pCof0, unsigned *pCof1, int nVars, int iVar)
Kit_DsdMan_t * Kit_DsdManAlloc(int nVars, int nNodes)
DECLARATIONS ///.
static int Kit_TruthIsEqual(unsigned *pIn0, unsigned *pIn1, int nVars)
static int Kit_TruthIsConst0(unsigned *pIn, int nVars)
void Kit_SopDivideInternal(Kit_Sop_t *cSop, Kit_Sop_t *cDiv, Kit_Sop_t *vQuo, Kit_Sop_t *vRem, Vec_Int_t *vMemory)
void Kit_DsdTruthPartial(Kit_DsdMan_t *p, Kit_DsdNtk_t *pNtk, unsigned *pTruthRes, unsigned uSupp)
int Kit_PlaGetCubeNum(char *pSop)
static int Kit_GraphIsVar(Kit_Graph_t *pGraph)
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
void Kit_DsdTruthPartialTwo(Kit_DsdMan_t *p, Kit_DsdNtk_t *pNtk, unsigned uSupp, int iVar, unsigned *pTruthCo, unsigned *pTruthDec)
static int Kit_CubeIsMarked(unsigned uCube)
void Kit_TruthStretch(unsigned *pOut, unsigned *pIn, int nVars, int nVarsAll, unsigned Phase, int fReturnIn)
char * Kit_PlaStoreSop(void *p, char *pSop)
void Kit_TruthCofSupports(Vec_Int_t *vBddDir, Vec_Int_t *vBddInv, int nVars, Vec_Int_t *vMemory, unsigned *puSupps)
int Kit_DsdCountAigNodes(Kit_DsdNtk_t *pNtk)
void Kit_SopCommonCubeCover(Kit_Sop_t *cResult, Kit_Sop_t *cSop, Vec_Int_t *vMemory)
void Kit_PlaToIsop(char *pSop, Vec_Int_t *vCover)
Kit_DsdObj_t * Kit_DsdNonDsdPrimeMax(Kit_DsdNtk_t *pNtk)
void Kit_TruthExist(unsigned *pTruth, int nVars, int iVar)
void Kit_SopDivideByLiteralQuo(Kit_Sop_t *cSop, int iLit)
static int Kit_TruthHasBit(unsigned *p, int Bit)
void Kit_TruthCountOnesInCofs0(unsigned *pTruth, int nVars, int *pStore)
Kit_DsdNtk_t * Kit_DsdDecompose(unsigned *pTruth, int nVars)
static unsigned Kit_EdgeToInt(Kit_Edge_t eEdge)
int Kit_GraphLeafDepth_rec(Kit_Graph_t *pGraph, Kit_Node_t *pNode, Kit_Node_t *pLeaf)
static int Kit_CubeHasLit(unsigned uCube, int i)
static int Kit_GraphIsConst(Kit_Graph_t *pGraph)
static void Kit_TruthMux(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, unsigned *pCtrl, int nVars)
static void Kit_TruthAnd(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars)
void Kit_TruthCofactor0New(unsigned *pOut, unsigned *pIn, int nVars, int iVar)
void Kit_SopMakeCubeFree(Kit_Sop_t *cSop)
int Kit_PlaIsComplement(char *pSop)
static int Kit_TruthIsConst1(unsigned *pIn, int nVars)
void Kit_DsdPrint(FILE *pFile, Kit_DsdNtk_t *pNtk)
static void Kit_TruthXor(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars)
Kit_Edge_t Kit_GraphAddNodeAnd(Kit_Graph_t *pGraph, Kit_Edge_t eEdge0, Kit_Edge_t eEdge1)
int Kit_TruthMinCofSuppOverlap(unsigned *pTruth, int nVars, int *pVarMin)
static Kit_Node_t * Kit_GraphNodeFanin0(Kit_Graph_t *pGraph, Kit_Node_t *pNode)
void Kit_GraphFree(Kit_Graph_t *pGraph)
int Kit_TruthIsop(unsigned *puTruth, int nVars, Vec_Int_t *vMemory, int fTryBoth)
FUNCTION DEFINITIONS ///.
void Kit_TruthCofactor1(unsigned *pTruth, int nVars, int iVar)
void Kit_TruthIsopPrint(unsigned *puTruth, int nVars, Vec_Int_t *vMemory, int fTryBoth)
void Kit_TruthIsopPrintCover(Vec_Int_t *vCover, int nVars, int fCompl)
static unsigned * Kit_DsdObjTruth(Kit_DsdObj_t *pObj)
Kit_Graph_t * Kit_GraphCreateLeaf(int iLeaf, int nLeaves, int fCompl)
int Kit_SopAnyLiteral(Kit_Sop_t *cSop, int nLits)
static int Kit_TruthCountOnes(unsigned *pIn, int nVars)
void Kit_TruthCofactor1New(unsigned *pOut, unsigned *pIn, int nVars, int iVar)
char * Kit_PlaCreateFromIsop(void *p, int nVars, Vec_Int_t *vCover)
unsigned short nNodesAlloc
static int Kit_GraphNodeIsVar(Kit_Graph_t *pGraph, Kit_Node_t *pNode)
Kit_Graph_t * Kit_GraphCreate(int nLeaves)
DECLARATIONS ///.
void Kit_DsdWriteFromTruth(char *pBuffer, unsigned *pTruth, int nVars)
Kit_Graph_t * Kit_GraphCreateConst1()
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
void Kit_DsdRotate(Kit_DsdNtk_t *p, int pFreqs[])
static void Kit_TruthOrPhase(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars, int fCompl0, int fCompl1)
static unsigned Kit_CubeRemLit(unsigned uCube, int i)
ABC_UINT64_T Kit_PlaToTruth6(char *pSop, int nVars)
static int Kit_GraphNodeInt(Kit_Graph_t *pGraph, Kit_Node_t *pNode)
static void Kit_TruthNot(unsigned *pOut, unsigned *pIn, int nVars)
unsigned Kit_TruthHash(unsigned *pIn, int nWords)
unsigned Kit_TruthSemiCanonicize(unsigned *pInOut, unsigned *pAux, int nVars, char *pCanonPerm)
static unsigned Kit_CubeMark(unsigned uCube)
#define ABC_NAMESPACE_HEADER_END
static void Kit_TruthXorBit(unsigned *p, int Bit)
static void Kit_TruthIthVar(unsigned *pTruth, int nVars, int iVar)
Kit_Graph_t * Kit_GraphCreateConst0()
static void Kit_SopWriteCube(Kit_Sop_t *cSop, unsigned uCube, int i)
static void Kit_TruthNand(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars)
static void Kit_TruthMuxPhase(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, unsigned *pCtrl, int nVars, int fComp0)
static int Kit_TruthIsEqualWithCare(unsigned *pIn0, unsigned *pIn1, unsigned *pCare, int nVars)
static int Kit_TruthIsDisjoint(unsigned *pIn1, unsigned *pIn2, int nVars)
static void Kit_TruthSharp(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars)
Kit_Edge_t Kit_GraphAddNodeXor(Kit_Graph_t *pGraph, Kit_Edge_t eEdge0, Kit_Edge_t eEdge1, int Type)
Kit_DsdNtk_t * Kit_DsdShrink(Kit_DsdNtk_t *p, int pPrios[])
void Kit_TruthForallSet(unsigned *pRes, unsigned *pTruth, int nVars, unsigned uMask)
void Kit_TruthShrink(unsigned *pOut, unsigned *pIn, int nVars, int nVarsAll, unsigned Phase, int fReturnIn)
typedefABC_NAMESPACE_HEADER_START struct Kit_Sop_t_ Kit_Sop_t
INCLUDES ///.
static void Kit_GraphSetRoot(Kit_Graph_t *pGraph, Kit_Edge_t eRoot)
static int Kit_WordFindFirstBit(unsigned uWord)
static int Kit_TruthIsOpposite(unsigned *pIn0, unsigned *pIn1, int nVars)
void Kit_TruthUniqueNew(unsigned *pRes, unsigned *pTruth, int nVars, int iVar)
char * Kit_TruthDumpToFile(unsigned *pTruth, int nVars, int nFile)
Kit_Edge_t Kit_GraphAddNodeOr(Kit_Graph_t *pGraph, Kit_Edge_t eEdge0, Kit_Edge_t eEdge1)
void Kit_SopCreateInverse(Kit_Sop_t *cResult, Vec_Int_t *vInput, int nVars, Vec_Int_t *vMemory)
static int Kit_TruthFindFirstBit(unsigned *pIn, int nVars)
void Kit_TruthExistNew(unsigned *pRes, unsigned *pTruth, int nVars, int iVar)
unsigned Kit_TruthSupport(unsigned *pTruth, int nVars)
int Kit_DsdCofactoring(unsigned *pTruth, int nVars, int *pCofVars, int nLimit, int fVerbose)
Kit_DsdNtk_t * Kit_DsdDeriveNtk(unsigned *pTruth, int nVars, int nLutSize)
static void Kit_TruthCopy(unsigned *pOut, unsigned *pIn, int nVars)
static int Kit_DsdLitIsLeaf(Kit_DsdNtk_t *pNtk, int Lit)
static unsigned Kit_CubeXorLit(unsigned uCube, int i)
static unsigned Kit_CubeUnmark(unsigned uCube)
static int Abc_Lit2Var(int Lit)
int Kit_PlaIsConst1(char *pSop)
int Kit_TruthVarInSupport(unsigned *pTruth, int nVars, int iVar)
void Kit_TruthForallNew(unsigned *pRes, unsigned *pTruth, int nVars, int iVar)
void Kit_DsdManFree(Kit_DsdMan_t *p)
static int Kit_DsdNtkObjNum(Kit_DsdNtk_t *pNtk)
static Kit_Node_t * Kit_GraphVar(Kit_Graph_t *pGraph)
static int Kit_GraphNodeNum(Kit_Graph_t *pGraph)
void Kit_DsdNtkFree(Kit_DsdNtk_t *pNtk)
static int Kit_GraphIsConst1(Kit_Graph_t *pGraph)
static int Kit_WordCountOnes(unsigned uWord)
unsigned Kit_GraphToTruth(Kit_Graph_t *pGraph)
static unsigned Kit_DsdLitSupport(Kit_DsdNtk_t *pNtk, int Lit)
static void Kit_SopShrink(Kit_Sop_t *cSop, int nCubesNew)
static int Kit_GraphVarInt(Kit_Graph_t *pGraph)
static Kit_Node_t * Kit_GraphNodeFanin1(Kit_Graph_t *pGraph, Kit_Node_t *pNode)
static void Kit_GraphComplement(Kit_Graph_t *pGraph)
int Kit_TruthVarsAntiSymm(unsigned *pTruth, int nVars, int iVar0, int iVar1, unsigned *pCof0, unsigned *pCof1)
int Kit_TruthVarsSymm(unsigned *pTruth, int nVars, int iVar0, int iVar1, unsigned *pCof0, unsigned *pCof1)
Kit_Edge_t Kit_GraphAddNodeMux(Kit_Graph_t *pGraph, Kit_Edge_t eEdgeC, Kit_Edge_t eEdgeT, Kit_Edge_t eEdgeE, int Type)
static unsigned Kit_EdgeToInt_(Kit_Edge_t m)
CloudNode * Kit_TruthToCloud(CloudManager *dd, unsigned *pTruth, int nVars)
static int Kit_SopCubeNum(Kit_Sop_t *cSop)
Kit_Graph_t * Kit_TruthToGraph(unsigned *pTruth, int nVars, Vec_Int_t *vMemory)
Kit_DsdNtk_t * Kit_DsdExpand(Kit_DsdNtk_t *p)
DdNode * Kit_GraphToBdd(DdManager *dd, Kit_Graph_t *pGraph)
char * Kit_PlaStart(void *p, int nCubes, int nVars)
static void Kit_TruthClear(unsigned *pOut, int nVars)
int Kit_PlaGetVarNum(char *pSop)
static unsigned Kit_CubeSetLit(unsigned uCube, int i)
void Kit_DsdPrintExpanded(Kit_DsdNtk_t *pNtk)
void Kit_DsdVerify(Kit_DsdNtk_t *pNtk, unsigned *pTruth, int nVars)
int Kit_TruthSupportSize(unsigned *pTruth, int nVars)
unsigned * Kit_DsdTruthCompute(Kit_DsdMan_t *p, Kit_DsdNtk_t *pNtk)
void Kit_SopCreate(Kit_Sop_t *cResult, Vec_Int_t *vInput, int nVars, Vec_Int_t *vMemory)
DECLARATIONS ///.
static void Kit_TruthOr(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars)
static unsigned Kit_BitMask(int nBits)
unsigned * Kit_CloudToTruth(Vec_Int_t *vNodes, int nVars, Vec_Ptr_t *vStore, int fInv)
static void Kit_SopPushCube(Kit_Sop_t *cSop, unsigned uCube)
Kit_Graph_t * Kit_SopFactor(Vec_Int_t *vCover, int fCompl, int nVars, Vec_Int_t *vMemory)
FUNCTION DEFINITIONS ///.
void Kit_PlaToTruth(char *pSop, int nVars, Vec_Ptr_t *vVars, unsigned *pTemp, unsigned *pTruth)
static int Kit_GraphRootLevel(Kit_Graph_t *pGraph)