51 pObjNew->
pData = pFunc;
75 int i, k, nAreaCrits = 0, nAreaExpanse = 0;
86 printf(
"Total area-critical fanins = %d. Belonging to expandable nodes = %d.\n",
87 nAreaCrits, nAreaExpanse );
104 int RetValue, iVar, i;
106 RetValue =
sat_solver_solve( p->
pSat, pCands, pCands + nCands, (sint64)p->
pPars->nBTLimit, (sint64)0, (sint64)0, (sint64)0 );
123 Aig_InfoXorBit( pData, p->
nCexes );
146 int RetValue, iVar, i, nCands,
nWords, w;
158 printf(
"Node %5d : Level = %2d. Divs = %3d. Fanin = %d (out of %d). MFFC = %d\n",
176 if ( RetValue == -1 )
181 printf(
"Node %d: Fanin %d can be removed.\n", pNode->
Id, iFanin );
202 for ( i = 0; i < 8; i++ )
205 printf(
"%d", i % 10 );
210 printf(
"%c",
'a' + i );
216 float * pProbab = (
float *)(p->
vProbs? p->
vProbs->pArray : NULL);
220 printf(
"%3d: %2d ", p->
nCexes, iVar );
224 printf(
"%d", Aig_InfoHasBit(pData, p->
nCexes-1) );
230 nWords = Aig_BitWordNum(p->
nCexes);
231 assert( nWords <= p->nDivWords );
234 if ( p->
pPars->fPower )
242 for ( w = 0; w <
nWords; w++ )
243 if ( pData[w] != ~0 )
253 if ( RetValue == -1 )
258 printf(
"Node %d: Fanin %d can be replaced by divisor %d.\n", pNode->
Id, iFanin, iVar );
294 unsigned * pData, * pData2;
296 int RetValue, iVar, iVar2, i, w, nCands,
nWords, fBreak;
301 assert( iFanin2 >= 0 || iFanin2 == -1 );
309 printf(
"Node %5d : Level = %2d. Divs = %3d. Fanins = %d/%d (out of %d). MFFC = %d\n",
320 if ( i == iFanin || i == iFanin2 )
327 if ( RetValue == -1 )
332 printf(
"Node %d: Fanins %d/%d can be removed.\n", pNode->
Id, iFanin, iFanin2 );
348 for ( i = 0; i < 11; i++ )
351 printf(
"%d", i % 10 );
353 if ( i == iFanin || i == iFanin2 )
356 printf(
"%c",
'a' + i );
364 printf(
"%3d: %2d %2d ", p->
nCexes, iVar, iVar2 );
368 printf(
"%d", Aig_InfoHasBit(pData, p->
nCexes-1) );
374 nWords = Aig_BitWordNum(p->
nCexes);
375 assert( nWords <= p->nDivWords );
380 for ( iVar2 = 0; iVar2 < iVar; iVar2++ )
383 for ( w = 0; w <
nWords; w++ )
384 if ( (pData[w] | pData2[w]) != ~0 )
401 if ( RetValue == -1 )
406 printf(
"Node %d: Fanins %d/%d can be replaced by divisors %d/%d.\n", pNode->
Id, iFanin, iFanin2, iVar, iVar2 );
463 float * pProbab = (
float *)p->
vProbs->pArray;
467 if ( pProbab[pFanin->
Id] >= 0.4 )
498 if ( !p->
pPars->fArea )
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
int Abc_NtkMfsTryResubOnce(Mfs_Man_t *p, int *pCands, int nCands)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
int Abc_NtkMfsEdgePower(Mfs_Man_t *p, Abc_Obj_t *pNode)
int sat_solver_solve(sat_solver *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
ABC_DLL int Abc_NtkGetFaninMax(Abc_Ntk_t *pNtk)
void Abc_NtkMfsPrintResubStats(Mfs_Man_t *p)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static void Vec_PtrFillSimInfo(Vec_Ptr_t *vInfo, int iWord, int nWords)
int Abc_NtkMfsResubNode2(Mfs_Man_t *p, Abc_Obj_t *pNode)
static int Vec_PtrSize(Vec_Ptr_t *p)
static int sat_solver_var_value(sat_solver *s, int v)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
ABC_NAMESPACE_IMPL_START void Abc_NtkMfsUpdateNetwork(Mfs_Man_t *p, Abc_Obj_t *pObj, Vec_Ptr_t *vFanins, Hop_Obj_t *pFunc)
DECLARATIONS ///.
int Abc_NtkMfsResubNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
static lit toLitCond(int v, int c)
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define ABC_NAMESPACE_IMPL_END
Hop_Obj_t * Abc_NtkMfsInterplate(Mfs_Man_t *p, int *pCands, int nCands)
int Abc_NtkMfsEdgeSwapEval(Mfs_Man_t *p, Abc_Obj_t *pNode)
ABC_DLL int Abc_NodeMffcLabel(Abc_Obj_t *pNode)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
ABC_DLL void Abc_NtkUpdate(Abc_Obj_t *pObj, Abc_Obj_t *pObjNew, Vec_Vec_t *vLevels)
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
static void Vec_PtrClear(Vec_Ptr_t *p)
static Abc_Obj_t * Abc_ObjFanin(Abc_Obj_t *pObj, int i)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int Abc_NtkMfsSolveSatResub(Mfs_Man_t *p, Abc_Obj_t *pNode, int iFanin, int fOnlyRemove, int fSkipUpdate)
DECLARATIONS ///.
int Abc_NtkMfsSolveSatResub2(Mfs_Man_t *p, Abc_Obj_t *pNode, int iFanin, int iFanin2)
#define MFS_FANIN_MAX
INCLUDES ///.