57 return Cost * 100 / pCut->
nFanins;
78 Cost += (float)1.0/pLeaf->
nRefs;
102 if ( pCutMax == NULL || pCutMax->
Cost < pCut->
Cost )
105 assert( pCutMax != NULL );
125 for ( i = k = 0; i < pCut->
nFanins; i++ )
183 int uSupp, nFansNew, i, k;
191 if ( nFansNew == pCut->
nFanins )
193 assert( nFansNew < pCut->nFanins );
195 Kit_TruthShrink( p->puTemp[0], pTruth, nFansNew, p->nLeafMax, uSupp, 1 );
196 for ( i = k = 0; i < pCut->
nFanins; i++ )
197 if ( uSupp & (1 << i) )
220 for ( i = 0; i < (int)pDom->
nFanins; i++ )
222 for ( k = 0; k < (int)pCut->
nFanins; k++ )
301 for ( i = 0; i < pC0->
nFanins; i++ )
304 for ( i = 0; i < pC0->
nFanins; i++ )
310 if ( pC0->
nFanins == p->nLeafMax )
312 for ( i = 0; i < pC1->
nFanins; i++ )
314 for ( k = pC0->
nFanins - 1; k >= 0; k-- )
320 for ( i = 0; i < pC0->
nFanins; i++ )
328 for ( c = 0; c < p->nLeafMax; c++ )
363 if ( i < pC0->nFanins || k < pC1->nFanins )
382 assert( p->nLeafMax > 0 );
412 int nVars, uTruth, fCompl = 0;
422 if ( uTruth == 14 || uTruth == 13 || uTruth == 11 || uTruth == 7 )
424 uTruth = 0xF & ~uTruth;
436 pRes =
Aig_And( p->pManRes, pIn0 , pIn1 );
495 Csw_Cut_t * pCut0, * pCut1, * pCut, * pCutSet;
500 int i, k, nVars, nFanins, iVar;
557 assert( iVar < pCut->nFanins );
560 if ( nVars == 2 && nFanins > 2 && fUseResub )
static int Csw_ObjRefs(Csw_Man_t *p, Aig_Obj_t *pObj)
static unsigned Cut_TruthPhase(Csw_Cut_t *pCut, Csw_Cut_t *pCut1)
typedefABC_NAMESPACE_HEADER_START struct Csw_Man_t_ Csw_Man_t
INCLUDES ///.
static int Csw_CutMergeOrdered(Csw_Man_t *p, Csw_Cut_t *pC0, Csw_Cut_t *pC1, Csw_Cut_t *pC)
int Csw_CutSupportMinimize(Csw_Man_t *p, Csw_Cut_t *pCut)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
static int Aig_IsComplement(Aig_Obj_t *p)
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
int Csw_CutMerge(Csw_Man_t *p, Csw_Cut_t *pCut0, Csw_Cut_t *pCut1, Csw_Cut_t *pCut)
static abctime Abc_Clock()
void Kit_TruthStretch(unsigned *pOut, unsigned *pIn, int nVars, int nVarsAll, unsigned Phase, int fReturnIn)
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static unsigned Aig_ObjCutSign(unsigned ObjId)
MACRO DEFINITIONS ///.
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
static unsigned * Csw_CutTruth(Csw_Cut_t *pCut)
static void Kit_TruthAnd(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars)
Csw_Cut_t * Csw_ObjPrepareCuts(Csw_Man_t *p, Aig_Obj_t *pObj, int fTriv)
FUNCTION DECLARATIONS ///.
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static void Csw_ObjSetCuts(Csw_Man_t *p, Aig_Obj_t *pObj, Csw_Cut_t *pCuts)
#define ABC_NAMESPACE_IMPL_END
#define Csw_ObjForEachCut(p, pObj, pCut, i)
MACRO DEFINITIONS ///.
char * Aig_MmFixedEntryFetch(Aig_MmFixed_t *p)
static Csw_Cut_t * Csw_ObjCuts(Csw_Man_t *p, Aig_Obj_t *pObj)
static void Kit_TruthNot(unsigned *pOut, unsigned *pIn, int nVars)
Aig_Obj_t * Csw_TableCutLookup(Csw_Man_t *p, Csw_Cut_t *pCut)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Aig_Obj_t * Csw_ObjSweep(Csw_Man_t *p, Aig_Obj_t *pObj, int fTriv)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
void Kit_TruthShrink(unsigned *pOut, unsigned *pIn, int nVars, int nVarsAll, unsigned Phase, int fReturnIn)
static ABC_NAMESPACE_IMPL_START int Csw_CutFindCost(Csw_Man_t *p, Csw_Cut_t *pCut)
DECLARATIONS ///.
static int Kit_WordFindFirstBit(unsigned uWord)
int Csw_CutFilter(Csw_Man_t *p, Aig_Obj_t *pObj, Csw_Cut_t *pCut)
void Csw_TableCutInsert(Csw_Man_t *p, Csw_Cut_t *pCut)
unsigned Kit_TruthSupport(unsigned *pTruth, int nVars)
static void Kit_TruthCopy(unsigned *pOut, unsigned *pIn, int nVars)
static Csw_Cut_t * Csw_CutFindFree(Csw_Man_t *p, Aig_Obj_t *pObj)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Aig_Obj_t * Csw_ObjTwoVarCut(Csw_Man_t *p, Csw_Cut_t *pCut)
static int Csw_CutCheckDominance(Csw_Cut_t *pDom, Csw_Cut_t *pCut)
static int Kit_WordCountOnes(unsigned uWord)
static float Csw_CutFindCost2(Csw_Man_t *p, Csw_Cut_t *pCut)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
unsigned * Csw_CutComputeTruth(Csw_Man_t *p, Csw_Cut_t *pCut, Csw_Cut_t *pCut0, Csw_Cut_t *pCut1, int fCompl0, int fCompl1)
#define Csw_CutForEachLeaf(p, pCut, pLeaf, i)
int Kit_TruthSupportSize(unsigned *pTruth, int nVars)