93 fprintf( stdout,
"Abc_NtkRetimeForward(): Network check has failed.\n" );
112 Abc_Obj_t * pLatch, * pLatchIn, * pLatchOut, * pFanin;
119 st__insert( tLatches, (
char *)(ABC_PTRUINT_T)pLatch, (
char *)(ABC_PTRUINT_T)(i-nOffSet) );
148 Vec_Ptr_t * vCisOld, * vCosOld, * vBoxesOld, * vCisNew, * vCosNew, * vBoxesNew;
149 Abc_Obj_t * pObj, * pLatch, * pLatchIn, * pLatchOut;
167 if (
Abc_ObjId(pLatch) >= (
unsigned)nIdMaxStart )
179 if ( !
st__lookup( tLatches, (
char *)pLatch, (
char **)&Index ) )
181 printf(
"Abc_NtkRetimeFinalizeLatches(): Internal error.\n" );
230 int i, fChanges, nTotalMoves = 0, nTotalMovesLimit = 10000;
252 if ( nTotalMoves >= nTotalMovesLimit )
254 printf(
"Stopped after %d latch moves.\n", nTotalMoves );
259 }
while ( fChanges && nTotalMoves < nTotalMovesLimit );
399 int i, nLatches = 0, Init = -1;
406 Init = (int)(ABC_PTRUINT_T)pObj->
pData;
409 else if ( Init == (
int)(ABC_PTRUINT_T)pObj->
pData )
429 Abc_Obj_t * pFanin, * pLatchTop, * pLatchCur;
449 if ( pLatchCur == pLatchTop )
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
void st__free_table(st__table *table)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int st__insert(st__table *table, const char *key, char *value)
int Abc_NtkRetimeCheckCompatibleLatchFanouts(Abc_Obj_t *pObj)
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
static int Abc_NtkBoxNum(Abc_Ntk_t *pNtk)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
int st__ptrcmp(const char *, const char *)
int Abc_NtkRetimeMinDelay(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkCopy, int nDelayLim, int nIterLimit, int fForward, int fVerbose)
FUNCTION DEFINITIONS ///.
ABC_DLL Abc_Obj_t * Abc_NtkDupObj(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int fCopyName)
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
static int Abc_ObjIsPi(Abc_Obj_t *pObj)
ABC_DLL Abc_Ntk_t * Abc_NtkDup(Abc_Ntk_t *pNtk)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
ABC_DLL char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
static int Vec_PtrSize(Vec_Ptr_t *p)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
st__table * Abc_NtkRetimePrepareLatches(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
void Abc_NtkRetimeShareLatches(Abc_Ntk_t *pNtk, int fInitial)
st__table * st__init_table(st__compare_func_type compare, st__hash_func_type hash)
static Abc_Obj_t * Abc_NtkCreateBo(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_ObjPatchFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFaninOld, Abc_Obj_t *pFaninNew)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
Abc_Ntk_t * Abc_NtkRetimeBackwardInitialStart(Abc_Ntk_t *pNtk)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkDeleteObj(Abc_Obj_t *pObj)
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)
int Abc_ObjSopSimulate(Abc_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeBuf(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
static Abc_Obj_t * Abc_NtkCreateLatch(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachLatch(pNtk, pObj, i)
static ABC_NAMESPACE_IMPL_START int Abc_NtkRetimeOneWay(Abc_Ntk_t *pNtk, int fForward, int fVerbose)
DECLARATIONS ///.
int Abc_NtkRetimeNodeIsEnabled(Abc_Obj_t *pObj, int fForward)
ABC_DLL void Abc_ObjTransferFanout(Abc_Obj_t *pObjOld, Abc_Obj_t *pObjNew)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
int st__lookup(st__table *table, const char *key, char **value)
#define Vec_PtrForEachEntryStop(Type, vVec, pEntry, i, Stop)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
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)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
int Abc_NtkRetimeIncremental(Abc_Ntk_t *pNtk, int nDelayLim, int fForward, int fMinDelay, int fOneStep, int fVerbose)
FUNCTION DEFINITIONS ///.
ABC_DLL void Abc_NodeCollectFanins(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
static int Abc_ObjIsPo(Abc_Obj_t *pObj)
ABC_DLL void Abc_ObjDeleteFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
void Abc_NtkRetimeTranferFromCopy(Abc_Ntk_t *pNtk)
int Abc_NtkRetimeFinalizeLatches(Abc_Ntk_t *pNtk, st__table *tLatches, int nIdMaxStart)
static Abc_Obj_t * Abc_NtkCreateBi(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NodeCollectFanouts(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
ABC_DLL int Abc_NtkLevel(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkOrderCisCos(Abc_Ntk_t *pNtk)
int st__ptrhash(const char *, int)
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
static void Vec_PtrFree(Vec_Ptr_t *p)