48 pPars->nWinTfoLevs = 2;
49 pPars->nFanoutsMax = 10;
50 pPars->nDepthMax = 20;
51 pPars->nWinSizeMax = 300;
52 pPars->nGrowthLevel = 0;
53 pPars->nBTLimit = 5000;
56 pPars->fMoreEffort = 0;
58 pPars->fOneHotness = 0;
60 pPars->fVeryVerbose = 0;
104 if ( p->
pSat == NULL )
110 if ( p->
pPars->fPower )
112 else if ( p->
pPars->fSwapEdge )
117 if ( p->
pPars->fMoreEffort )
152 p->timeWin += clock() - clk;
158 p->timeAig += clock() - clk;
162 p->timeCnf += clock() - clk;
166 if ( p->pSat && p->
pPars->fOneHotness )
168 if ( p->pSat == NULL )
172 p->nTotConfLevel += p->pSat->stats.conflicts;
173 p->timeSat += clock() - clk;
182 dProb = p->
pPars->fPower? ((
float *)p->vProbs->pArray)[pNode->
Id] : -1.0;
188 p->nNodesGained += nGain;
189 p->nNodesGainedLevel += nGain;
210 Bdc_Par_t Pars = {0}, * pDecPars = &Pars;
216 int i, k, nNodes, nFaninMax;
217 clock_t clk = clock(), clk2;
227 printf(
"Nodes with more than %d fanins will not be processed.\n", 8 );
235 printf(
"Nodes with more than %d fanins will not be processed.\n",
MFS_FANIN_MAX );
244 fprintf( stdout,
"Converting to AIGs has failed.\n" );
269 printf(
"The PI count of careset (%d) and logic network (%d) differ. Careset is not used.\n",
279 if ( p->
pCare != NULL )
280 printf(
"Performing optimization with %d external care clauses.\n", Aig_ManPoNum(p->
pCare) );
282 if ( !pPars->fResub )
284 pDecPars->nVarsMax = (nFaninMax < 3) ? 3 : nFaninMax;
285 pDecPars->fVerbose = pPars->fVerbose;
294 pObj->
pData = (
void *)(PORT_PTRUINT_T)i;
314 if ( !p->
pPars->fVeryVerbose )
329 if ( !p->
pPars->fVeryVerbose )
347 if ( pPars->fVerbose )
349 printf(
"Lev = %2d. Node = %5d. Ave gain = %5.2f. Ave conf = %5.2f. T/o = %6.2f %% ",
354 PRT(
"Time", clock() - clk2 );
363 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 ///.
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)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int Abc_NtkMfsResub(Mfs_Man_t *p, Abc_Obj_t *pNode)
ABC_NAMESPACE_IMPL_START void Abc_NtkMfsParsDefault(Mfs_Par_t *pPars)
DECLARATIONS ///.
#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 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)
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 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 ///.
int Abc_NtkMfsNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
#define ABC_NAMESPACE_IMPL_END
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)
int Abc_NtkMfs(Abc_Ntk_t *pNtk, Mfs_Par_t *pPars)
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
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)
ABC_DLL int Abc_NtkSweep(Abc_Ntk_t *pNtk, int fVerbose)
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)
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 ///.
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 ///.