50 pPars->nWinTfoLevs = 2;
51 pPars->nFanoutsMax = 30;
52 pPars->nDepthMax = 20;
54 pPars->nGrowthLevel = 0;
55 pPars->nBTLimit = 5000;
59 pPars->fMoreEffort = 0;
61 pPars->fOneHotness = 0;
63 pPars->fVeryVerbose = 0;
111 if ( p->
pSat == NULL )
269 if ( p->
pSat == NULL )
279 if ( p->
pPars->fPower )
281 else if ( p->
pPars->fSwapEdge )
286 if ( p->
pPars->fMoreEffort )
337 if ( p->pSat && p->
pPars->fOneHotness )
339 if ( p->pSat == NULL )
343 p->nTotConfLevel += p->pSat->stats.conflicts;
353 dProb = p->
pPars->fPower? ((
float *)p->vProbs->pArray)[pNode->
Id] : -1.0;
359 p->nNodesGained += nGain;
360 p->nNodesGainedLevel += nGain;
381 Bdc_Par_t Pars = {0}, * pDecPars = &Pars;
387 int i, k, nNodes, nFaninMax;
398 printf(
"Nodes with more than %d fanins will not be processed.\n", 8 );
406 printf(
"Nodes with more than %d fanins will not be processed.\n",
MFS_FANIN_MAX );
415 fprintf( stdout,
"Converting to AIGs has failed.\n" );
444 printf(
"The PI count of careset (%d) and logic network (%d) differ. Careset is not used.\n",
454 if ( p->
pCare != NULL )
455 printf(
"Performing optimization with %d external care clauses.\n",
Aig_ManCoNum(p->
pCare) );
457 if ( !pPars->fResub )
459 pDecPars->nVarsMax = (nFaninMax < 3) ? 3 : nFaninMax;
460 pDecPars->fVerbose = pPars->fVerbose;
469 pObj->
pData = (
void *)(ABC_PTRUINT_T)i;
497 if ( !p->
pPars->fVeryVerbose )
518 if ( !p->
pPars->fVeryVerbose )
536 if ( pPars->fVerbose )
557 if ( !pPars->fResub )
ABC_DLL Vec_Vec_t * Abc_NtkLevelize(Abc_Ntk_t *pNtk)
static int Abc_NtkIsLogic(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Vec_Ptr_t * Abc_MfsComputeDivisors(Mfs_Man_t *p, Abc_Obj_t *pNode, int nLevDivMax)
BASIC TYPES ///.
void Abc_NtkMfsPowerResub(Mfs_Man_t *p, Mfs_Par_t *pPars)
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
int Hop_DagSize(Hop_Obj_t *pObj)
ABC_NAMESPACE_IMPL_START int Abc_NtkMfsSolveSatResub(Mfs_Man_t *p, Abc_Obj_t *pNode, int iFanin, int fOnlyRemove, int fSkipUpdate)
DECLARATIONS ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int Abc_WinNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
#define Vec_VecForEachLevelStart(vGlob, vVec, i, LevelStart)
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
int Abc_NtkMfsResubNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
Bdc_Man_t * Bdc_ManAlloc(Bdc_Par_t *pPars)
MACRO DEFINITIONS ///.
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
ABC_DLL int Abc_NtkGetFaninMax(Abc_Ntk_t *pNtk)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
static abctime Abc_Clock()
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
ABC_DLL int Abc_NtkGetTotalFanins(Abc_Ntk_t *pNtk)
ABC_DLL float Abc_NtkMfsTotalSwitching(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkStopReverseLevels(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
static float Abc_MfsObjProb(Mfs_Man_t *p, Abc_Obj_t *pObj)
int Abc_NtkMfsEdgeSwapEval(Mfs_Man_t *p, Abc_Obj_t *pNode)
void Mfs_ManStop(Mfs_Man_t *p)
int Abc_NtkMfsSolveSat(Mfs_Man_t *p, Abc_Obj_t *pNode)
int Abc_NtkAddOneHotness(Mfs_Man_t *p)
Aig_Man_t * Abc_NtkConstructAig(Mfs_Man_t *p, Abc_Obj_t *pNode)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
static int Aig_ManCoNum(Aig_Man_t *p)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
ABC_DLL int Abc_ObjRequiredLevel(Abc_Obj_t *pObj)
Vec_Int_t * Abc_NtkPowerEstimate(Abc_Ntk_t *pNtk, int fProbOne)
Aig_Man_t * Abc_NtkToDar(Abc_Ntk_t *pNtk, int fExors, int fRegisters)
typedefABC_NAMESPACE_HEADER_START struct Mfs_Par_t_ Mfs_Par_t
INCLUDES ///.
#define ABC_NAMESPACE_IMPL_END
int Abc_NtkMfsNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
ABC_DLL Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
Vec_Ptr_t * Abc_MfsComputeRoots(Abc_Obj_t *pNode, int nWinTfoMax, int nFanoutLimit)
ABC_DLL void Abc_NtkStartReverseLevels(Abc_Ntk_t *pNtk, int nMaxLevelIncrease)
#define Abc_NtkForEachNode(pNtk, pNode, i)
Vec_Ptr_t * Aig_ManSupportsInverse(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
int Abc_NtkMfs(Abc_Ntk_t *pNtk, Mfs_Par_t *pPars)
Mfs_Man_t * Mfs_ManAlloc(Mfs_Par_t *pPars)
DECLARATIONS ///.
int Abc_NtkMfsResubNode2(Mfs_Man_t *p, Abc_Obj_t *pNode)
void * Cnf_DataWriteIntoSolver(Cnf_Dat_t *p, int nFrames, int fInit)
#define Abc_NtkForEachCi(pNtk, pCi, i)
Cnf_Dat_t * Cnf_DeriveSimple(Aig_Man_t *p, int nOutputs)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
void Abc_NtkBidecResyn(Abc_Ntk_t *pNtk, int fVerbose)
sat_solver * Abc_MfsCreateSolverResub(Mfs_Man_t *p, int *pCands, int nCands, int fInvert)
int Abc_NtkMfsEdgePower(Mfs_Man_t *p, Abc_Obj_t *pNode)
void Abc_NtkMfsParsDefault(Mfs_Par_t *pPars)
FUNCTION DEFINITIONS ///.
Hop_Obj_t * Abc_NodeIfNodeResyn(Bdc_Man_t *p, Hop_Man_t *pHop, Hop_Obj_t *pRoot, int nVars, Vec_Int_t *vTruth, unsigned *puCare, float dProb)
FUNCTION DEFINITIONS ///.
ABC_DLL int Abc_NtkToAig(Abc_Ntk_t *pNtk)
static int Abc_NtkHasAig(Abc_Ntk_t *pNtk)
void Mfs_ManClean(Mfs_Man_t *p)
ABC_DLL Vec_Ptr_t * Abc_NtkDfsNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
int Abc_NtkMfsResub(Mfs_Man_t *p, Abc_Obj_t *pNode)
ABC_DLL int Abc_NtkLevel(Abc_Ntk_t *pNtk)
static void ** Vec_PtrArray(Vec_Ptr_t *p)
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
#define MFS_FANIN_MAX
INCLUDES ///.