52 int IterBest, DelayBest;
53 int IterBest2, DelayBest2;
60 assert( DelayBest == DelayBest2 );
61 assert( IterBest == IterBest2 );
82 int i, k, IterBest, DelayCur, DelayBest;
99 if ( fVerbose && !fInitial )
100 printf(
"Performing analysis:\n" );
109 DelayStart = DelayCur;
111 if ( DelayBest > DelayCur )
113 if ( fVerbose && !fInitial )
114 printf(
"%s Iter = %3d. Delay = %3d. Latches = %5d. Delta = %6.2f. Ratio = %4.2f %%\n",
119 DelayBest = DelayCur;
124 if ( i == nIterLimit )
127 if ( i - IterBest > 20 )
130 if ( nDelayLim > 0 && DelayCur <= nDelayLim )
153 if ( fVerbose && !fInitial )
154 printf(
"%s : Starting delay = %3d. Final delay = %3d. IterBest = %2d (out of %2d).\n",
155 fForward?
"Forward " :
"Backward", DelayStart, DelayBest, IterBest, nIterLimit );
156 *pIterBest = (nIterLimit == 1) ? 1 : IterBest;
176 int i, k, LevelCur, LevelMax = 0;
197 if ( LevelMax < LevelCur )
206 if ( LevelMax < LevelCur )
216 if ( LevelMax < LevelCur )
222 if ( LevelMax < LevelCur )
237 if ( LevelMax != (
int)pNext->
Level )
253 if ( LevelMax != (
int)pNext->
Level )
280 int i, LevelCur, LevelMax = 0;
291 if ( LevelMax < LevelCur )
300 if ( LevelMax < LevelCur )
305 pObj->
Level = LevelMax + 1;
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
int Abc_NtkRetimeMinDelay(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkCopy, int nDelayLim, int nIterLimit, int fForward, int fVerbose)
FUNCTION DEFINITIONS ///.
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
void Abc_NtkRetimeShareLatches(Abc_Ntk_t *pNtk, int fInitial)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
Abc_Ntk_t * Abc_NtkRetimeBackwardInitialStart(Abc_Ntk_t *pNtk)
static ABC_NAMESPACE_IMPL_START int Abc_NtkRetimeMinDelayTry(Abc_Ntk_t *pNtk, int nDelayLim, int fForward, int fInitial, int nIterLimit, int *pIterBest, int fVerbose)
DECLARATIONS ///.
void Abc_NtkRetimeTranferToCopy(Abc_Ntk_t *pNtk)
Vec_Int_t * Abc_NtkRetimeCollectLatchValues(Abc_Ntk_t *pNtk)
void Abc_NtkRetimeNode(Abc_Obj_t *pObj, int fForward, int fInitial)
#define ABC_NAMESPACE_IMPL_END
int Abc_NtkRetimeNodeIsEnabled(Abc_Obj_t *pObj, int fForward)
#define ABC_NAMESPACE_IMPL_START
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
static int Abc_NtkRetimeTiming_rec(Abc_Obj_t *pObj, int fForward)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
void Abc_NtkRetimeBackwardInitialFinish(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkNew, Vec_Int_t *vValuesOld, int fVerbose)
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
static int Abc_NtkRetimeTiming(Abc_Ntk_t *pNtk, int fForward, Vec_Ptr_t *vCritical)
static void Vec_PtrClear(Vec_Ptr_t *p)
void Abc_NtkRetimeTranferFromCopy(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachPo(pNtk, pPo, i)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
#define Abc_NtkForEachPi(pNtk, pPi, i)
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)