51 pObjNew->
pData = pFunc;
75 int i, k, nAreaCrits = 0, nAreaExpanse = 0;
103 int fVeryVerbose = 0;
105 int RetValue, RetValue2 = -1, iVar, i;
115 RetValue =
sat_solver_solve( p->
pSat, pCands, pCands + nCands, (ABC_INT64_T)p->
pPars->nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
118 if ( RetValue !=
l_Undef && RetValue2 != -1 )
167 int fVeryVerbose = 0;
170 int RetValue, iVar, i, nCands,
nWords, w;
180 if ( p->
pPars->fVeryVerbose )
183 printf(
"%5d : Lev =%3d. Leaf =%3d. Node =%3d. Divs =%3d. Fanin = %4d (%d/%d), MFFC = %d\n",
201 if ( RetValue == -1 )
205 if ( p->
pPars->fVeryVerbose )
206 printf(
"Node %d: Fanin %d can be removed.\n", pNode->
Id, iFanin );
223 if ( fOnlyRemove || p->
pPars->fRrOnly )
229 for ( i = 0; i < 9; i++ )
232 printf(
"%d", i % 10 );
237 printf(
"%c",
'a' + i );
245 printf(
"%3d: %3d ", p->
nCexes, iVar );
256 assert( nWords <= p->nDivWords );
259 if ( p->
pPars->fPower )
267 for ( w = 0; w <
nWords; w++ )
268 if ( pData[w] != ~0 )
278 if ( RetValue == -1 )
282 if ( p->
pPars->fVeryVerbose )
283 printf(
"Node %d: Fanin %d can be replaced by divisor %d.\n", pNode->
Id, iFanin, iVar );
303 if ( p->
pPars->fVeryVerbose )
304 printf(
"Node %d: Cannot find replacement for fanin %d.\n", pNode->
Id, iFanin );
322 unsigned * pData, * pData2;
324 int RetValue, iVar, iVar2, i, w, nCands,
nWords, fBreak;
329 assert( iFanin2 >= 0 || iFanin2 == -1 );
337 printf(
"Node %5d : Level = %2d. Divs = %3d. Fanins = %d/%d (out of %d). MFFC = %d\n",
348 if ( i == iFanin || i == iFanin2 )
355 if ( RetValue == -1 )
360 printf(
"Node %d: Fanins %d/%d can be removed.\n", pNode->
Id, iFanin, iFanin2 );
376 for ( i = 0; i < 11; i++ )
379 printf(
"%d", i % 10 );
381 if ( i == iFanin || i == iFanin2 )
384 printf(
"%c",
'a' + i );
394 printf(
"%3d: %2d %2d ", p->
nCexes, iVar, iVar2 );
405 assert( nWords <= p->nDivWords );
411 if ( p->
pPars->fPower )
419 for ( iVar2 = 0; iVar2 < iVar; iVar2++ )
423 if ( p->
pPars->fPower )
431 for ( w = 0; w <
nWords; w++ )
432 if ( (pData[w] | pData2[w]) != ~0 )
449 if ( RetValue == -1 )
454 printf(
"Node %d: Fanins %d/%d can be replaced by divisors %d/%d.\n", pNode->
Id, iFanin, iFanin2, iVar, iVar2 );
551 if ( !p->
pPars->fArea )
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
static int Abc_InfoHasBit(unsigned *p, int i)
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 void Abc_InfoXorBit(unsigned *p, int i)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
ABC_DLL int Abc_NtkGetFaninMax(Abc_Ntk_t *pNtk)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static void Vec_PtrFillSimInfo(Vec_Ptr_t *vInfo, int iWord, int nWords)
static abctime Abc_Clock()
static int Vec_PtrSize(Vec_Ptr_t *p)
static int sat_solver_var_value(sat_solver *s, int v)
static float Abc_MfsObjProb(Mfs_Man_t *p, Abc_Obj_t *pObj)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
int Abc_NtkMfsResubNode2(Mfs_Man_t *p, Abc_Obj_t *pNode)
int Abc_NtkMfsEdgeSwapEval(Mfs_Man_t *p, Abc_Obj_t *pNode)
int Abc_NtkMfsEdgePower(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)
int Abc_NtkMfsResubNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
#define ABC_NAMESPACE_IMPL_END
Hop_Obj_t * Abc_NtkMfsInterplate(Mfs_Man_t *p, int *pCands, int nCands)
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)
int Abc_NtkMfsSolveSatResub(Mfs_Man_t *p, Abc_Obj_t *pNode, int iFanin, int fOnlyRemove, int fSkipUpdate)
DECLARATIONS ///.
#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)
int Abc_NtkMfsSolveSatResub2(Mfs_Man_t *p, Abc_Obj_t *pNode, int iFanin, int iFanin2)
static int Abc_BitWordNum(int nBits)
static void Vec_PtrClear(Vec_Ptr_t *p)
int Abc_NtkMfsTryResubOnce(Mfs_Man_t *p, int *pCands, int nCands)
static int Abc_ObjFaninId(Abc_Obj_t *pObj, int i)
static Abc_Obj_t * Abc_ObjFanin(Abc_Obj_t *pObj, int i)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
void Abc_NtkMfsPrintResubStats(Mfs_Man_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
ABC_NAMESPACE_IMPL_START void Abc_NtkMfsUpdateNetwork(Mfs_Man_t *p, Abc_Obj_t *pObj, Vec_Ptr_t *vMfsFanins, Hop_Obj_t *pFunc)
DECLARATIONS ///.
#define MFS_FANIN_MAX
INCLUDES ///.