64 p->pConst1->fPhase = 1;
68 p->nTableSize = 10007;
69 p->pTable =
ABC_ALLOC(
int, p->nTableSize );
70 memset( p->pTable, 0,
sizeof(
int) * p->nTableSize );
157 printf(
"Ivy_ManMakeSeq(): The check has failed.\n" );
177 int i, f, nPis, nPos, nIdMax;
187 for ( i = 0; i < nLatches; i++ )
191 for ( f = 0; f < nFrames; f++ )
195 for ( i = 0; i < nPis; i++ )
198 for ( i = 0; i < nLatches; i++ )
204 for ( i = 0; i < nPos; i++ )
207 for ( i = 0; i < nLatches; i++ )
215 for ( i = 0; i < nLatches; i++ )
219 *pvMapping = vMapping;
222 printf(
"Ivy_ManFrames(): The check has failed.\n" );
240 if ( p->time1 ) {
ABC_PRT(
"Update lev ", p->time1 ); }
241 if ( p->time2 ) {
ABC_PRT(
"Update levR ", p->time2 ); }
347 p->nObjs[pObj->
Type]--;
379 if ( pLatch == pLatchRoot )
417 int LimitFactor = 100;
420 for ( nSteps = 0;
Vec_PtrSize(p->vBufs) > 0; nSteps++ )
434 if ( nSteps > NodeBeg * LimitFactor )
436 printf(
"Structural hashing is not finished after %d forward latch moves.\n", NodeBeg * LimitFactor );
437 printf(
"This circuit cannot be forward-retimed completely. Quitting.\n" );
494 if ( p->fFanout == 0 )
497 for ( i = 0; i < nLatches; i++ )
519 p->nObjs[
IVY_PI] -= nLatches;
520 p->nObjs[
IVY_PO] -= nLatches;
522 p->nDeleted -= 2 * nLatches;
538 printf(
"The number of remaining buffers is %d.\n",
Ivy_ManBufNum(p) );
543 printf(
"Ivy_ManMakeSeq(): The check has failed.\n" );
Ivy_Obj_t * Ivy_Latch(Ivy_Man_t *p, Ivy_Obj_t *pObj, Ivy_Init_t Init)
static Vec_Ptr_t * Vec_PtrStart(int nSize)
int Ivy_ManLatchIsSelfFeed_rec(Ivy_Obj_t *pLatch, Ivy_Obj_t *pLatchRoot)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static Ivy_Obj_t * Ivy_ManConst1(Ivy_Man_t *p)
static Ivy_Obj_t * Ivy_ManPi(Ivy_Man_t *p, int i)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define Ivy_ManForEachPi(p, pObj, i)
ITERATORS ///.
static int Ivy_ManBufNum(Ivy_Man_t *p)
#define Ivy_ManForEachPo(p, pObj, i)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Ivy_ManLatchNum(Ivy_Man_t *p)
#define ABC_ALLOC(type, num)
#define Ivy_ManForEachNode(p, pObj, i)
static int Ivy_ManPoNum(Ivy_Man_t *p)
static int Ivy_ObjIsMarkA(Ivy_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void * Vec_PtrPop(Vec_Ptr_t *p)
void Ivy_ManCleanupSeq_rec(Ivy_Obj_t *pObj)
static int Ivy_ObjIsLatch(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjFanin1(Ivy_Obj_t *pObj)
static void Vec_PtrRemove(Vec_Ptr_t *p, void *Entry)
static Ivy_Obj_t * Ivy_ObjChild1Equiv(Ivy_Obj_t *pObj)
void Ivy_ManStopMemory(Ivy_Man_t *p)
Vec_Int_t * Ivy_ManDfsSeq(Ivy_Man_t *p, Vec_Int_t **pvLatches)
void Ivy_ManResetLevels(Ivy_Man_t *p)
ABC_NAMESPACE_IMPL_START Ivy_Man_t * Ivy_ManStart()
DECLARATIONS ///.
static Ivy_Obj_t * Ivy_ObjFanin0(Ivy_Obj_t *pObj)
int Ivy_ManLevels(Ivy_Man_t *p)
static int Ivy_ManObjIdMax(Ivy_Man_t *p)
void Ivy_ObjConnect(Ivy_Man_t *p, Ivy_Obj_t *pObj, Ivy_Obj_t *pFan0, Ivy_Obj_t *pFan1)
void Ivy_NodeFixBufferFanins(Ivy_Man_t *p, Ivy_Obj_t *pNode, int fUpdateLevel)
Ivy_Obj_t * Ivy_ObjCreatePo(Ivy_Man_t *p, Ivy_Obj_t *pDriver)
static void * Vec_PtrEntryLast(Vec_Ptr_t *p)
int Ivy_ManCleanupSeq(Ivy_Man_t *p)
static void Ivy_ObjSetMarkA(Ivy_Obj_t *pObj)
static void Ivy_ObjClearMarkA(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjChild0Equiv(Ivy_Obj_t *pObj)
int Ivy_ManLatchIsSelfFeed(Ivy_Obj_t *pLatch)
static int Ivy_ObjRefs(Ivy_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
void Ivy_ManPrintStats(Ivy_Man_t *p)
static int Ivy_ObjIsNode(Ivy_Obj_t *pObj)
static Ivy_Obj_t * Ivy_ObjChild0(Ivy_Obj_t *pObj)
int Ivy_ManPropagateBuffers(Ivy_Man_t *p, int fUpdateLevel)
void Ivy_ManStartFanout(Ivy_Man_t *p)
FUNCTION DEFINITIONS ///.
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
typedefABC_NAMESPACE_HEADER_START struct Ivy_Man_t_ Ivy_Man_t
INCLUDES ///.
static int Ivy_ManPiNum(Ivy_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
Ivy_Man_t * Ivy_ManDup(Ivy_Man_t *p)
void Ivy_ObjDelete_rec(Ivy_Man_t *p, Ivy_Obj_t *pObj, int fFreeTop)
void Ivy_ManMakeSeq(Ivy_Man_t *p, int nLatches, int *pInits)
void Ivy_ObjDisconnect(Ivy_Man_t *p, Ivy_Obj_t *pObj)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Ivy_ManStop(Ivy_Man_t *p)
static void Ivy_ManRecycleMemory(Ivy_Man_t *p, Ivy_Obj_t *pEntry)
static Ivy_Obj_t * Ivy_Not(Ivy_Obj_t *p)
#define Ivy_ManForEachNodeVec(p, vIds, pObj, i)
static int Ivy_ObjIsBuf(Ivy_Obj_t *pObj)
Ivy_Man_t * Ivy_ManFrames(Ivy_Man_t *pMan, int nLatches, int nFrames, int fInit, Vec_Ptr_t **pvMapping)
int Ivy_ManCleanup(Ivy_Man_t *p)
static int Ivy_ManAndNum(Ivy_Man_t *p)
Ivy_Obj_t * Ivy_ObjCreatePi(Ivy_Man_t *p)
DECLARATIONS ///.
static int Ivy_ManNodeNum(Ivy_Man_t *p)
static Ivy_Obj_t * Ivy_ManPo(Ivy_Man_t *p, int i)
#define Ivy_ManForEachObj(p, pObj, i)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static void Vec_PtrShrink(Vec_Ptr_t *p, int nSizeNew)
static Ivy_Obj_t * Ivy_ManFetchMemory(Ivy_Man_t *p)
void Ivy_ManStartMemory(Ivy_Man_t *p)
FUNCTION DEFINITIONS ///.
Ivy_Man_t * Ivy_ManStartFrom(Ivy_Man_t *p)
static int Ivy_ObjFaninC0(Ivy_Obj_t *pObj)
Ivy_Obj_t * Ivy_And(Ivy_Man_t *p, Ivy_Obj_t *p0, Ivy_Obj_t *p1)
int Ivy_ManCheck(Ivy_Man_t *p)
DECLARATIONS ///.
Ivy_Obj_t * Ivy_ObjReadFirstFanout(Ivy_Man_t *p, Ivy_Obj_t *pObj)
static void Vec_PtrFree(Vec_Ptr_t *p)