107 printf(
"%s (total = %d driven = %d)\n", pStr, Counter,
nTotal );
112 printf(
"%3d : Obj = %6d Refs = %6d Freq = %6d\n",
133 Gia_Obj_t * pFlop, * pObjC, * pObj0, * pObj1, * pNode, * pTemp;
134 int i, k, Ent, * pSets, * pResets, * pEnables;
135 int nHaveSetReset = 0, nHaveEnable = 0;
188 if ( pSets[Ent] > 1 || pResets[Ent] > 1 )
199 printf(
"Flops with set/reset = %6d. Flops with enable = %6d.\n", nHaveSetReset, nHaveEnable );
228 Gia_Obj_t * pFlop, * pObjC, * pObj0, * pObj1, * pNode, * pTemp;
229 int i, k, Ent, * pSets, * pResets, * pEnables;
230 int nHaveSetReset = 0, nHaveEnable = 0;
283 if ( pSets[Ent] > 1 || pResets[Ent] > 1 )
292 if ( pSets[i] > nFanMax )
295 printf(
"Adding set signal %d related to %d flops.\n", i, pSets[i] );
299 if ( pResets[i] > nFanMax )
302 printf(
"Adding reset signal %d related to %d flops.\n", i, pResets[i] );
306 if ( pEnables[i] > nFanMax )
309 printf(
"Adding enable signal %d related to %d flops.\n", i, pEnables[i] );
339 for ( f = 0; f < nFrames; f++ )
372 for ( f = 0; f < nFrames; f++ )
383 if ( f == nFrames - 1 )
439 Gia_Obj_t * pTemp, * pObjC, * pObj0, * pObj1, * pFlopIn, * pFlopOut;
459 printf(
"Cannot recognize enable of flop %d.\n", i );
466 printf(
"Cannot recognize self-loop of enable flop %d.\n", i );
519 Gia_Obj_t * pFlopIn, * pFlopOut, * pDriver, * pFan0, * pFan1, * pCtrl, * pData, * pObj;
520 int i, iClass, fCompl,
Counter = 0;
531 printf(
"The flop driver %d is not a node.\n", i );
539 printf(
"The flop driver %d is not an OR gate.\n", i );
549 printf(
"The flop driver fanin %d is not a node.\n", i );
560 printf(
"The flop %d does not have a self-loop.\n", i );
609 printf(
"Detected %d classes.\n",
Vec_PtrSize(vCtrls) - (Counter == 0) );
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
static void Gia_ObjSetCopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj, int iLit)
void Gia_ManCreateRefs(Gia_Man_t *p)
static Gia_Obj_t * Gia_ObjChild0(Gia_Obj_t *pObj)
void Gia_CollectSuper(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vSuper)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Vec_Int_t * Gia_ManDetectSeqSignalsWithFanout(Gia_Man_t *p, int nFanMax, int fVerbose)
void Gia_ManStop(Gia_Man_t *p)
#define Gia_ManForEachCo(p, pObj, i)
Gia_Man_t * Gia_ManUnrollAndCofactor(Gia_Man_t *p, int nFrames, int nFanMax, int fVerbose)
Gia_Man_t * Gia_ManDupCofAllInt(Gia_Man_t *p, Vec_Int_t *vSigs, int fVerbose)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
static Gia_Obj_t * Gia_NotCond(Gia_Obj_t *p, int c)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static Gia_Obj_t * Gia_Regular(Gia_Obj_t *p)
ABC_NAMESPACE_IMPL_START void Gia_CollectSuper_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vSuper)
DECLARATIONS ///.
static int Gia_ObjFanin1CopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj)
static int Gia_ObjIsCand(Gia_Obj_t *pObj)
static int Gia_ManAppendCi(Gia_Man_t *p)
static int Gia_ObjRefNum(Gia_Man_t *p, Gia_Obj_t *pObj)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static void Vec_IntErase(Vec_Int_t *p)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
static int Vec_PtrSize(Vec_Ptr_t *p)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static int Abc_LitNotCond(int Lit, int c)
static int Vec_PtrFind(Vec_Ptr_t *p, void *Entry)
void Gia_ManPrintSignals(Gia_Man_t *p, int *pFreq, char *pStr)
static Gia_Obj_t * Gia_ObjChild1(Gia_Obj_t *pObj)
#define Gia_ManForEachCi(p, pObj, i)
#define Gia_ManForEachRiRo(p, pObjRi, pObjRo, i)
static Gia_Obj_t * Gia_Not(Gia_Obj_t *p)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define Gia_ManForEachAnd(p, pObj, i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManFillValue(Gia_Man_t *p)
#define Gia_ManForEachPi(p, pObj, i)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Gia_Man_t * Gia_ManRemoveEnables2(Gia_Man_t *p)
int Gia_ObjIsMuxType(Gia_Obj_t *pNode)
static int Vec_IntSize(Vec_Int_t *p)
static int Gia_IsComplement(Gia_Obj_t *p)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Vec_Int_t * Gia_ManTransferFrames(Gia_Man_t *pAig, Gia_Man_t *pFrames, int nFrames, Gia_Man_t *pNew, Vec_Int_t *vSigs)
static Gia_Obj_t * Gia_ObjRiToRo(Gia_Man_t *p, Gia_Obj_t *pObj)
Gia_Obj_t * Gia_ObjRecognizeMux(Gia_Obj_t *pNode, Gia_Obj_t **ppNodeT, Gia_Obj_t **ppNodeE)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
static int Abc_Lit2Var(int Lit)
#define ABC_CALLOC(type, num)
static int Gia_ObjIsPo(Gia_Man_t *p, Gia_Obj_t *pObj)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManRemoveEnables(Gia_Man_t *p)
#define Gia_ManForEachRo(p, pObj, i)
#define Gia_ManForEachRi(p, pObj, i)
void Gia_ManHashAlloc(Gia_Man_t *p)
void Gia_ManDetectSeqSignals(Gia_Man_t *p, int fSetReset, int fVerbose)
#define Gia_ManForEachObj1(p, pObj, i)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Vec_IntFree(Vec_Int_t *p)
static int Vec_IntPushUnique(Vec_Int_t *p, int Entry)
static void Vec_IntClear(Vec_Int_t *p)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
char * Abc_UtilStrsav(char *s)
#define Gia_ManForEachPo(p, pObj, i)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFanin0CopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
static int Gia_ManObjNum(Gia_Man_t *p)
int nTotal
DECLARATIONS ///.
static void Vec_PtrFree(Vec_Ptr_t *p)
void Gia_ManHashStop(Gia_Man_t *p)
Gia_Man_t * Gia_ManUnrollInit(Gia_Man_t *p, int nFrames)
static int Gia_ObjCopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj)
static int Gia_ManRegNum(Gia_Man_t *p)