74 p->timeOther = p->timeTotal - p->timeWin - p->timeDiv - p->timeCnf - p->timeSat;
75 printf(
"Nodes = %d. Try = %d. Resub = %d. Div = %d. SAT calls = %d. Timeouts = %d. MaxDivs = %d.\n",
76 Sfm_NtkNodeNum(p), p->nNodesTried, p->nRemoves + p->nResubs, p->nTotalDivs, p->nSatCalls, p->nTimeOuts, p->nMaxDivs );
78 printf(
"Attempts : " );
79 printf(
"Remove %6d out of %6d (%6.2f %%) ", p->nRemoves, p->nTryRemoves, 100.0*p->nRemoves/
Abc_MaxInt(1, p->nTryRemoves) );
80 printf(
"Resub %6d out of %6d (%6.2f %%) ", p->nResubs, p->nTryResubs, 100.0*p->nResubs /
Abc_MaxInt(1, p->nTryResubs) );
83 printf(
"Reduction: " );
84 printf(
"Nodes %6d out of %6d (%6.2f %%) ", p->nTotalNodesBeg-p->nTotalNodesEnd, p->nTotalNodesBeg, 100.0*(p->nTotalNodesBeg-p->nTotalNodesEnd)/
Abc_MaxInt(1, p->nTotalNodesBeg) );
85 printf(
"Edges %6d out of %6d (%6.2f %%) ", p->nTotalEdgesBeg-p->nTotalEdgesEnd, p->nTotalEdgesBeg, 100.0*(p->nTotalEdgesBeg-p->nTotalEdgesEnd)/
Abc_MaxInt(1, p->nTotalEdgesBeg) );
88 ABC_PRTP(
"Win", p->timeWin , p->timeTotal );
89 ABC_PRTP(
"Div", p->timeDiv , p->timeTotal );
90 ABC_PRTP(
"Cnf", p->timeCnf , p->timeTotal );
91 ABC_PRTP(
"Sat", p->timeSat , p->timeTotal );
92 ABC_PRTP(
"Oth", p->timeOther, p->timeTotal );
93 ABC_PRTP(
"ALL", p->timeTotal, p->timeTotal );
111 int fVeryVerbose = 0;
112 int i, iFanin, iVar = -1;
113 word uTruth, uSign, uMask;
119 if ( p->pPars->fVeryVerbose )
120 printf(
"%5d : Lev =%3d. Leaf =%3d. Node =%3d. Div=%3d. Fanin =%4d (%d/%d). MFFC = %d\n",
142 if ( fRemoveOnly || p->pPars->fRrOnly ||
Vec_IntSize(p->vDivs) == 0 )
148 for ( i = 0; i < 9; i++ )
151 printf(
"%d", i % 10 );
158 printf(
"%3d: %3d ", p->nCexes, iVar );
164 uMask = (~(
word)0) >> (64 - p->nCexes);
166 if ( uSign == uMask )
183 if ( p->nCexes == 64 )
189 if ( p->pPars->fVeryVerbose )
192 printf(
"Node %d: Fanin %d (%d) can be removed. ", iNode, f,
Sfm_ObjFanin(p, iNode, f) );
194 printf(
"Node %d: Fanin %d (%d) can be replaced by divisor %d (%d). ",
224 if ( p->pPars->fArea )
263 int nFixed = p->vFixed ?
Vec_StrSum(p->vFixed) : 0;
264 int nEmpty = p->vEmpty ?
Vec_StrSum(p->vEmpty) : 0;
265 printf(
"Performing MFS with %d PIs, %d POs, %d nodes (%d flexible, %d fixed, %d empty).\n",
266 p->nPis, p->nPos, p->nNodes, p->nNodes-nFixed, nFixed, nEmpty );
278 if ( p->pPars->nDepthMax &&
Sfm_ObjLevel(p, i) > p->pPars->nDepthMax )
293 p->timeTotal =
Abc_Clock() - p->timeTotal;
int Sfm_NtkWindowToSolver(Sfm_Ntk_t *p)
FUNCTION DEFINITIONS ///.
void Sfm_NtkUpdate(Sfm_Ntk_t *p, int iNode, int f, int iFaninNew, word uTruth)
#define Sfm_ObjForEachFanin(p, Node, Fan, i)
static int Abc_InfoHasBit(unsigned *p, int i)
ABC_NAMESPACE_IMPL_START void Sfm_ParSetDefault(Sfm_Par_t *pPars)
DECLARATIONS ///.
static int Vec_StrSum(Vec_Str_t *p)
static int Sfm_ObjFaninNum(Sfm_Ntk_t *p, int i)
typedefABC_NAMESPACE_HEADER_START struct Sfm_Ntk_t_ Sfm_Ntk_t
INCLUDES ///.
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
#define Vec_WrdForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Vec_WecSize(Vec_Wec_t *p)
static int Sfm_ObjIsNode(Sfm_Ntk_t *p, int i)
word Sfm_ComputeInterpolant(Sfm_Ntk_t *p)
static int Sfm_ObjLevel(Sfm_Ntk_t *p, int iObj)
#define ABC_PRTP(a, t, T)
int Sfm_NtkCreateWindow(Sfm_Ntk_t *p, int iNode, int fVerbose)
static int Sfm_ObjFanin(Sfm_Ntk_t *p, int i, int k)
static int Sfm_ObjSatVar(Sfm_Ntk_t *p, int iObj)
static void Vec_WrdFill(Vec_Wrd_t *p, int nSize, word Fill)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
int Sfm_NtkPerform(Sfm_Ntk_t *p, Sfm_Par_t *pPars)
#define ABC_NAMESPACE_IMPL_END
void Sfm_NtkPrintStats(Sfm_Ntk_t *p)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define ABC_NAMESPACE_IMPL_START
int Sfm_NodeResub(Sfm_Ntk_t *p, int iNode)
int Sfm_NodeResubSolve(Sfm_Ntk_t *p, int iNode, int f, int fRemoveOnly)
static int Vec_IntSize(Vec_Int_t *p)
static int Sfm_NtkPoNum(Sfm_Ntk_t *p)
static int Sfm_ObjFanoutNum(Sfm_Ntk_t *p, int i)
void Sfm_NtkPrepare(Sfm_Ntk_t *p)
static int Sfm_ObjIsFixed(Sfm_Ntk_t *p, int i)
#define Sfm_NtkForEachNode(p, i)
static void Vec_IntClear(Vec_Int_t *p)
static int Vec_WecSizeUsedLimits(Vec_Wec_t *p, int iStart, int iStop)
static int Sfm_NtkNodeNum(Sfm_Ntk_t *p)
static int Vec_WecSizeSize(Vec_Wec_t *p)
static int Sfm_NtkPiNum(Sfm_Ntk_t *p)
int Sfm_ObjMffcSize(Sfm_Ntk_t *p, int iObj)