31 #define Aig_ManForEachNodeInOrder( p, pObj ) \
32 for ( assert(p->pOrderData), p->iPrev = 0, p->iNext = p->pOrderData[1]; \
33 p->iNext && (((pObj) = Aig_ManObj(p, p->iNext)), 1); \
34 p->iNext = p->pOrderData[2*p->iPrev+1] )
57 pPars->fUpdateLevel = 0;
62 pPars->fVeryVerbose = 0;
85 int i, k, nNodesOld, nNodeBefore, nNodeAfter, Required;
98 if ( p->pPars->fFanout )
100 if ( p->pPars->fUpdateLevel )
115 if ( pAig->Time2Quit && !(i & 256) &&
Abc_Clock() > pAig->Time2Quit )
147 if ( k < (
int)pObj->
nCuts )
173 int nLeavesOld = pCut->
nLeaves;
176 Dar_LibEval( p, pObj, pCut, Required, &nMffcSize );
180 if ( !(p->GainBest > 0 || (p->GainBest == 0 && p->pPars->fUseZeros)) )
197 assert( p->GainBest <= nNodeBefore - nNodeAfter );
199 p->ClassGains[p->ClassBest] += nNodeBefore - nNodeAfter;
216 p->timeOther = p->timeTotal - p->timeCuts - p->timeEval;
224 if ( p->pPars->fFanout )
226 if ( p->pPars->fUpdateLevel )
242 printf(
"Aig_ManRewrite: The network check has failed.\n" );
263 int i, k, nCuts = 0, nCutsK = 0;
302 pPars->nCutsMax = nCutsMax;
320 printf(
"Nodes = %6d. Total cuts = %6d. 4-input cuts = %6d.\n",
322 printf(
"Cut size = %2d. Truth size = %2d. Total mem = %5.2f MB ",
332 pMemCuts = p->pMemCuts;
ABC_DLL int Aig_ManCheck(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
void Dar_ManStop(Dar_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
void Aig_ManCheckPhase(Aig_Man_t *p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Aig_ManObjNum(Aig_Man_t *p)
Dar_Cut_t * Dar_ObjComputeCuts(Dar_Man_t *p, Aig_Obj_t *pObj, int fSkipTtMin)
static void Dar_ObjSetCuts(Aig_Obj_t *pObj, Dar_Cut_t *pCuts)
int Dar_ManRewrite(Aig_Man_t *pAig, Dar_RwrPar_t *pPars)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
int Aig_ObjRequiredLevel(Aig_Man_t *p, Aig_Obj_t *pObj)
int Dar_ManCutCount(Aig_Man_t *pAig, int *pnCutsK)
static abctime Abc_Clock()
void Dar_ManCutsRestart(Dar_Man_t *p, Aig_Obj_t *pRoot)
FUNCTION DECLARATIONS ///.
static int Vec_PtrSize(Vec_Ptr_t *p)
static int Aig_ManNodeNum(Aig_Man_t *p)
Aig_MmFixed_t * Dar_ManComputeCuts(Aig_Man_t *pAig, int nCutsMax, int fSkipTtMin, int fVerbose)
void Aig_ManFanoutStart(Aig_Man_t *p)
FUNCTION DEFINITIONS ///.
void Aig_ManStartReverseLevels(Aig_Man_t *p, int nMaxLevelIncrease)
void Aig_ManFanoutStop(Aig_Man_t *p)
Dar_Cut_t * Dar_ObjComputeCuts_rec(Dar_Man_t *p, Aig_Obj_t *pObj)
#define Dar_ObjForEachCut(pObj, pCut, i)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
void Aig_ManStopReverseLevels(Aig_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Dar_Man_t_ Dar_Man_t
INCLUDES ///.
#define Aig_ManForEachNode(p, pObj, i)
Vec_Int_t * Saig_ManComputeSwitchProbs(Aig_Man_t *pAig, int nFrames, int nPref, int fProbOne)
void Aig_ObjReplace(Aig_Man_t *p, Aig_Obj_t *pObjOld, Aig_Obj_t *pObjNew, int fUpdateLevel)
#define ABC_NAMESPACE_IMPL_END
void Dar_LibEval(Dar_Man_t *p, Aig_Obj_t *pRoot, Dar_Cut_t *pCut, int Required, int *pnMffcSize)
static int Aig_ObjPhaseReal(Aig_Obj_t *pObj)
void Dar_ManCutsFree(Dar_Man_t *p)
void Dar_LibPrepare(int nSubgraphs)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
int Aig_DagSize(Aig_Obj_t *pObj)
#define Aig_ManForEachObj(p, pObj, i)
Dar_Man_t * Dar_ManStart(Aig_Man_t *pAig, Dar_RwrPar_t *pPars)
DECLARATIONS ///.
int Aig_MmFixedReadMemUsage(Aig_MmFixed_t *p)
typedefABC_NAMESPACE_HEADER_START struct Dar_RwrPar_t_ Dar_RwrPar_t
INCLUDES ///.
void Aig_MmFixedRestart(Aig_MmFixed_t *p)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
void Dar_ManDefaultRwrParams(Dar_RwrPar_t *pPars)
FUNCTION DEFINITIONS ///.
Dar_Cut_t * Dar_ObjPrepareCuts(Dar_Man_t *p, Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
static void Vec_IntFree(Vec_Int_t *p)
int Aig_ManCleanup(Aig_Man_t *p)
Aig_Obj_t * Dar_LibBuildBest(Dar_Man_t *p)