94 assert( pCutBest != NULL );
119 for ( i = 0; i < pCut->
nFanins; i++ )
120 printf(
"%d ", pCut->
pFanins[i] );
198 int i, k, nFanins = 0;
202 pFanins[nFanins++] = pCut->
pFanins[i], i++, k++;
204 pFanins[nFanins++] = pCut->
pFanins[i], i++;
206 pFanins[nFanins++] = pCutFan->
pFanins[k], k++;
208 for ( ; i < pCut->
nFanins; i++ )
209 pFanins[nFanins++] = pCut->
pFanins[i];
211 pFanins[nFanins++] = pCutFan->
pFanins[k];
230 for ( i = k = 0; i < pCut->
nFanins; i++ )
259 for ( i = iVar; i < pCut->
nFanins; i++ )
277 for ( i = pCut->
nFanins; i > iVar; i-- )
297 static int pFanins[32];
298 unsigned * pTruth, * pTruthFan, * pTruthRes;
299 unsigned * pTop = p->pTruths[0], * pFan = p->pTruths[2], * pTemp = p->pTruths[3];
300 unsigned uPhase, uPhaseFan;
301 int i, iVar, nFanins, RetValue;
304 for ( iVar = 0; iVar < pCut->
nFanins; iVar++ )
305 if ( pCut->
pFanins[iVar] == iFan )
307 assert( iVar < pCut->nFanins );
312 if ( nFanins+1 > p->nMergeLimit )
327 for ( i = 0; i < 2*pCutRes->
nWords; i++ )
328 pTop[i] = pTruth[i % pCut->
nWords];
330 pFan[i] = pTruthFan[i % pCutFan->
nWords];
347 pCutRes->
Cost = p->pSopSizes[0xFFFF & *pTruthRes] + p->pSopSizes[0xFFFF & ~*pTruthRes];
361 if ( pCutRes->
vIsop[0] == NULL || pCutRes->
vIsop[1] == NULL )
void Cnf_CutInsertIthVar(Cnf_Cut_t *pCut, int iVar, int iFan)
Cnf_Cut_t * Cnf_CutCompose(Cnf_Man_t *p, Cnf_Cut_t *pCut, Cnf_Cut_t *pCutFan, int iFan)
void Cnf_CutUpdateRefs(Cnf_Man_t *p, Cnf_Cut_t *pCut, Cnf_Cut_t *pCutFan, Cnf_Cut_t *pCutRes)
static Vec_Int_t * Vec_IntDup(Vec_Int_t *pVec)
void Cnf_CutFree(Cnf_Cut_t *pCut)
static int Cnf_CutSopCost(Cnf_Man_t *p, Dar_Cut_t *pCut)
char * Aig_MmFlexEntryFetch(Aig_MmFlex_t *p, int nBytes)
static int Abc_TruthWordNum(int nVars)
void Cnf_CutDeref(Cnf_Man_t *p, Cnf_Cut_t *pCut)
void Kit_TruthStretch(unsigned *pOut, unsigned *pIn, int nVars, int nVarsAll, unsigned Phase, int fReturnIn)
for(p=first;p->value< newval;p=p->next)
static void Kit_TruthMux(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, unsigned *pCtrl, int nVars)
static unsigned * Cnf_CutTruth(Cnf_Cut_t *pCut)
void Cnf_CutRef(Cnf_Man_t *p, Cnf_Cut_t *pCut)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
void Cnf_CutPrint(Cnf_Cut_t *pCut)
int Kit_TruthIsop(unsigned *puTruth, int nVars, Vec_Int_t *vMemory, int fTryBoth)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_END
#define Cnf_CutForEachLeaf(p, pCut, pLeaf, i)
static void Kit_TruthNot(unsigned *pOut, unsigned *pIn, int nVars)
static Dar_Cut_t * Dar_ObjBestCut(Aig_Obj_t *pObj)
ABC_NAMESPACE_IMPL_START Cnf_Cut_t * Cnf_CutAlloc(Cnf_Man_t *p, int nLeaves)
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_START
void Kit_TruthShrink(unsigned *pOut, unsigned *pIn, int nVars, int nVarsAll, unsigned Phase, int fReturnIn)
static int Cnf_CutMergeLeaves(Cnf_Cut_t *pCut, Cnf_Cut_t *pCutFan, int *pFanins)
static int Vec_IntSize(Vec_Int_t *p)
struct Cnf_Cut_t_ Cnf_Cut_t
void Cnf_CutRemoveIthVar(Cnf_Cut_t *pCut, int iVar, int iFan)
static void Vec_IntFree(Vec_Int_t *p)
typedefABC_NAMESPACE_HEADER_START struct Cnf_Man_t_ Cnf_Man_t
INCLUDES ///.
Cnf_Cut_t * Cnf_CutCreate(Cnf_Man_t *p, Aig_Obj_t *pObj)
static unsigned Cnf_TruthPhase(Cnf_Cut_t *pCut, Cnf_Cut_t *pCut1)
static unsigned Kit_BitMask(int nBits)