58 return pObj->TravId == pObj->pMan->nTravIds - 2;
62 return pObj->TravId == pObj->pMan->nTravIds - 2 || pObj->TravId == pObj->pMan->nTravIds;
66 return pObj->TravId == pObj->pMan->nTravIds - 1 || pObj->TravId == pObj->pMan->nTravIds;
70 if ( pObj->TravId < pObj->pMan->nTravIds - 2 )
71 pObj->TravId = pObj->pMan->nTravIds - 2;
72 else if ( pObj->TravId == pObj->pMan->nTravIds - 1 )
73 pObj->TravId = pObj->pMan->nTravIds;
79 if ( pObj->TravId < pObj->pMan->nTravIds - 2 )
80 pObj->TravId = pObj->pMan->nTravIds - 1;
81 else if ( pObj->TravId == pObj->pMan->nTravIds - 2 )
82 pObj->TravId = pObj->pMan->nTravIds;
422 assert( pObj->MarkA == 0 );
429 printf(
"Nwk_ManRetimeVerifyCutForward(): Internal cut verification failed.\n" );
467 int i, RetValue,
Counter = 0, Counter2 = 0;
468 clock_t clk = clock();
488 printf(
"Forward: Max-flow = %4d -> ", Counter );
503 printf(
"%4d. ", Counter+Counter2 );
531 printf(
"Min-cut = %4d. Unmoved = %4d. ",
Vec_PtrSize(vNodes), Counter );
532 PRT(
"Time", clock() - clk );
552 int i, RetValue,
Counter = 0, Counter2 = 0;
553 clock_t clk = clock();
576 printf(
"Backward: Max-flow = %4d -> ", Counter );
587 printf(
"%4d. ", Counter+Counter2 );
618 printf(
"Min-cut = %4d. Unmoved = %4d. ",
Vec_PtrSize(vNodes), Counter );
619 PRT(
"Time", clock() - clk );
ABC_NAMESPACE_IMPL_START int DepthBwdMax
void Nwk_ManMarkTfiCone_rec(Nwk_Obj_t *pObj)
FUNCTION DEFINITIONS ///.
static int Nwk_ObjIsCi(Nwk_Obj_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static Nwk_Obj_t * Nwk_ObjPred(Nwk_Obj_t *pObj)
DECLARATIONS ///.
ABC_DLL void Nwk_ManCleanMarks(Nwk_Man_t *pNtk)
#define Nwk_ManForEachCo(p, pObj, i)
int Nwk_ManRetimeVerifyCutBackward(Nwk_Man_t *pMan, Vec_Ptr_t *vNodes)
typedefABC_NAMESPACE_HEADER_START struct Nwk_Obj_t_ Nwk_Obj_t
INCLUDES ///.
static void Nwk_ObjSetFlow(Nwk_Obj_t *pObj)
static int Nwk_ObjSetPred(Nwk_Obj_t *pObj, Nwk_Obj_t *p)
int Nwk_ManRetimeVerifyCutForward(Nwk_Man_t *pMan, Vec_Ptr_t *vNodes)
static int Nwk_ObjVisitedBot(Nwk_Obj_t *pObj)
static void Nwk_ObjSetVisitedTop(Nwk_Obj_t *pObj)
#define Nwk_ManForEachCi(p, pObj, i)
ITERATORS ///.
int Nwk_ManPushBackwardFast_rec(Nwk_Obj_t *pObj, Nwk_Obj_t *pPred)
#define Nwk_ObjForEachFanout(pObj, pFanout, i)
#define Nwk_ManForEachLoSeq(p, pObj, i)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Vec_PtrSize(Vec_Ptr_t *p)
ABC_NAMESPACE_IMPL_START int DepthBwd
static int Nwk_ObjFaninNum(Nwk_Obj_t *p)
#define Nwk_ManForEachPiSeq(p, pObj, i)
static void Nwk_ObjSetTravIdCurrent(Nwk_Obj_t *pObj)
Vec_Ptr_t * Nwk_ManRetimeCutForward(Nwk_Man_t *pMan, int nLatches, int fVerbose)
static Nwk_ManIncrementTravIdFlow(Nwk_Man_t *pMan)
static int Nwk_ObjIsLo(Nwk_Obj_t *p)
int Nwk_ManPushForwardFast_rec(Nwk_Obj_t *pObj, Nwk_Obj_t *pPred)
static int Nwk_ObjIsCo(Nwk_Obj_t *p)
static int Nwk_ManPushForwardBot_rec(Nwk_Obj_t *pObj, Nwk_Obj_t *pPred)
#define Nwk_ManForEachPoSeq(p, pObj, i)
static int Nwk_ObjIsTravIdCurrent(Nwk_Obj_t *pObj)
static int Nwk_ManPushForwardTop_rec(Nwk_Obj_t *pObj, Nwk_Obj_t *pPred)
#define ABC_NAMESPACE_IMPL_END
static int Nwk_ManPushBackwardBot_rec(Nwk_Obj_t *pObj, Nwk_Obj_t *pPred)
static int Nwk_ObjVisitedBotOnly(Nwk_Obj_t *pObj)
static void Nwk_ObjClearFlow(Nwk_Obj_t *pObj)
int Nwk_ManVerifyCut_rec(Nwk_Obj_t *pObj)
ABC_DLL void Nwk_ManIncrementTravId(Nwk_Man_t *pNtk)
DECLARATIONS ///.
ABC_NAMESPACE_IMPL_START int DepthFwd
ABC_NAMESPACE_IMPL_START int DepthFwdMax
Vec_Ptr_t * Nwk_ManRetimeCutBackward(Nwk_Man_t *pMan, int nLatches, int fVerbose)
static void Nwk_ObjSetVisitedBot(Nwk_Obj_t *pObj)
static int Nwk_ManCiNum(Nwk_Man_t *p)
MACRO DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
static int Nwk_ObjHasFlow(Nwk_Obj_t *pObj)
#define Nwk_ManForEachLiSeq(p, pObj, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Nwk_ObjForEachFanin(pObj, pFanin, i)
void Nwk_ManMarkTfoCone_rec(Nwk_Obj_t *pObj)
#define Nwk_ManForEachObj(p, pObj, i)
static Nwk_Obj_t * Nwk_ObjFanin0(Nwk_Obj_t *p)
static int Nwk_ObjIsSink(Nwk_Obj_t *pObj)
static int Nwk_ManPushBackwardTop_rec(Nwk_Obj_t *pObj, Nwk_Obj_t *pPred)
static int Nwk_ObjVisitedTop(Nwk_Obj_t *pObj)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Nwk_ManCoNum(Nwk_Man_t *p)
static void Nwk_ObjSetSink(Nwk_Obj_t *pObj)
#define Nwk_ManForEachNode(p, pObj, i)