109 for ( i = 0; i < pCut->
nFanins; i++ )
110 printf(
" %d", pCut->
pFanins[i] );
129 printf(
"Cuts for node %d:\n", pObj->
Id );
151 int i, k, nCuts = 0, nCutsK = 0;
183 Cost += pLeaf->
nRefs;
184 return Cost * 1000 / pCut->
nFanins;
205 Cost += (float)1.0/pLeaf->
nRefs;
229 if ( pCutMax == NULL || pCutMax->
Cost < pCut->
Cost )
232 assert( pCutMax != NULL );
252 for ( i = k = 0; i < pCut->
nFanins; i++ )
310 int uSupp, nFansNew, i, k;
318 if ( nFansNew == pCut->
nFanins )
320 assert( nFansNew < pCut->nFanins );
323 for ( i = k = 0; i < pCut->
nFanins; i++ )
324 if ( uSupp & (1 << i) )
347 for ( i = 0; i < (int)pDom->
nFanins; i++ )
349 for ( k = 0; k < (int)pCut->
nFanins; k++ )
428 for ( i = 0; i < pC0->
nFanins; i++ )
431 for ( i = 0; i < pC0->
nFanins; i++ )
439 for ( i = 0; i < pC1->
nFanins; i++ )
441 for ( k = pC0->
nFanins - 1; k >= 0; k-- )
447 for ( i = 0; i < pC0->
nFanins; i++ )
490 if ( i < pC0->nFanins || k < pC1->nFanins )
578 Aig_Cut_t * pCut0, * pCut1, * pCut, * pCutSet;
637 assert( pAig->pManCuts == NULL );
651 printf(
"Nodes = %6d. Total cuts = %6d. %d-input cuts = %6d.\n",
653 printf(
"Cut size = %2d. Truth size = %2d. Total mem = %5.2f MB ",
void Aig_ObjComputeCuts(Aig_ManCut_t *p, Aig_Obj_t *pObj, int fTriv)
int Aig_CutSupportMinimize(Aig_ManCut_t *p, Aig_Cut_t *pCut)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
static int Aig_ManObjNum(Aig_Man_t *p)
void Aig_MmFixedStop(Aig_MmFixed_t *p, int fVerbose)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static unsigned * Aig_CutTruth(Aig_Cut_t *pCut)
#define ABC_ALLOC(type, num)
unsigned * Aig_CutComputeTruth(Aig_ManCut_t *p, Aig_Cut_t *pCut, Aig_Cut_t *pCut0, Aig_Cut_t *pCut1, int fCompl0, int fCompl1)
static float Aig_CutFindCost2(Aig_ManCut_t *p, Aig_Cut_t *pCut)
static int Abc_TruthWordNum(int nVars)
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)
Aig_MmFixed_t * Aig_MmFixedStart(int nEntrySize, int nEntriesMax)
FUNCTION DEFINITIONS ///.
void Aig_CutPrint(Aig_Cut_t *pCut)
static int Aig_CutCheckDominance(Aig_Cut_t *pDom, Aig_Cut_t *pCut)
static unsigned Aig_ObjCutSign(unsigned ObjId)
MACRO DEFINITIONS ///.
void Aig_ManCutStop(Aig_ManCut_t *p)
static Aig_Cut_t * Aig_CutFindFree(Aig_ManCut_t *p, Aig_Obj_t *pObj)
static int Aig_CutFindCost(Aig_ManCut_t *p, Aig_Cut_t *pCut)
static void Aig_ObjSetCuts(Aig_ManCut_t *p, Aig_Obj_t *pObj, Aig_Cut_t *pCuts)
static void Kit_TruthAnd(unsigned *pOut, unsigned *pIn0, unsigned *pIn1, int nVars)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
#define Aig_ManForEachNode(p, pObj, i)
Aig_Cut_t * Aig_ObjPrepareCuts(Aig_ManCut_t *p, Aig_Obj_t *pObj, int fTriv)
#define ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START Aig_ManCut_t * Aig_ManCutStart(Aig_Man_t *pMan, int nCutsMax, int nLeafMax, int fTruth, int fVerbose)
DECLARATIONS ///.
char * Aig_MmFixedEntryFetch(Aig_MmFixed_t *p)
static void Kit_TruthNot(unsigned *pOut, unsigned *pIn, int nVars)
int Aig_ManCutCount(Aig_ManCut_t *p, int *pnCutsK)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static int Aig_ManObjNumMax(Aig_Man_t *p)
#define Aig_CutForEachLeaf(p, pCut, pLeaf, i)
#define ABC_NAMESPACE_IMPL_START
void Kit_TruthShrink(unsigned *pOut, unsigned *pIn, int nVars, int nVarsAll, unsigned Phase, int fReturnIn)
static unsigned Aig_CutTruthPhase(Aig_Cut_t *pCut, Aig_Cut_t *pCut1)
struct Aig_Cut_t_ Aig_Cut_t
int Aig_CutMerge(Aig_ManCut_t *p, Aig_Cut_t *pCut0, Aig_Cut_t *pCut1, Aig_Cut_t *pCut)
int Aig_MmFixedReadMemUsage(Aig_MmFixed_t *p)
unsigned Kit_TruthSupport(unsigned *pTruth, int nVars)
static int Aig_CutMergeOrdered(Aig_ManCut_t *p, Aig_Cut_t *pC0, Aig_Cut_t *pC1, Aig_Cut_t *pC)
static void Kit_TruthCopy(unsigned *pOut, unsigned *pIn, int nVars)
#define ABC_CALLOC(type, num)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
void Aig_ObjCutPrint(Aig_ManCut_t *p, Aig_Obj_t *pObj)
static int Kit_WordCountOnes(unsigned uWord)
int Aig_CutFilter(Aig_ManCut_t *p, Aig_Obj_t *pObj, Aig_Cut_t *pCut)
static Aig_Cut_t * Aig_ObjCuts(Aig_ManCut_t *p, Aig_Obj_t *pObj)
Aig_ManCut_t * Aig_ComputeCuts(Aig_Man_t *pAig, int nCutsMax, int nLeafMax, int fTruth, int fVerbose)
#define Aig_ObjForEachCut(p, pObj, pCut, i)