55 pNew->nAsserts = p->nAsserts;
56 pNew->nConstrs = p->nConstrs;
57 pNew->nBarBufs = p->nBarBufs;
62 pNew->vFlopReprs =
Vec_IntDup( p->vFlopReprs );
79 if ( pNew->vFlopReprs && i >= nTruePis && pObj != pObjMapped )
111 printf(
"Aig_ManRemap(): The check has failed.\n" );
162 int i, nTruePis, nTruePos;
178 pObjLo->
pNext = pObjLi;
185 pObjLo->
pNext = NULL;
277 pObjLo->
pNext = pObjLi;
284 pObjLo->
pNext = NULL;
313 int i,
Counter = 0, Const0 = 0, Const1 = 0;
330 printf(
"Regs = %d. Fanins = %d. Const0 = %d. Const1 = %d.\n",
397 Aig_Obj_t * pObj, * pObjLi, * pObjLo, * pFanin;
417 pMapping[2*pFanin->
Id + 1] = i;
430 pMapping[2*pFanin->
Id] = i;
461 printf(
"Performing combinational register sweep:\n" );
491 Vec_Ptr_t * vSupports, * vMatrix, * vMatrix2;
494 int i, k, m, iOut, iIn, nComps;
497 printf(
"The network is combinational.\n" );
543 for ( nComps = 0; ; nComps++ )
548 if ( pVarsTot[iOut] == 0 )
575 printf(
"There is only one SCC of registers in this network.\n" );
578 printf(
"SCC #%d contains %5d registers.\n", nComps+1,
Vec_IntSize(vComp) );
602 int i, nCountPis, nCountRegs;
607 if ( pAig->vClockDoms )
623 pNew =
Aig_ManScl( pTemp, fLatchConst, fLatchEqual, 0, -1, -1, fVerbose, 0 );
626 printf(
"%3d : Reg = %4d. PI = %4d. (True = %4d. Regs = %4d.) And = %5d. It = %3d. Cl = %5d\n",
650 Aig_Man_t *
Aig_ManScl(
Aig_Man_t * pAig,
int fLatchConst,
int fLatchEqual,
int fUseMvSweep,
int nFramesSymb,
int nFramesSatur,
int fVerbose,
int fVeryVerbose )
657 int i, Entry1, Entry2, nTruePis;
659 if ( pAig->vClockDoms &&
Vec_VecSize(pAig->vClockDoms) > 0 )
663 assert( pAig->vFlopNums == NULL );
670 if ( fLatchConst && pAig->nRegs )
671 pAig =
Aig_ManConstReduce( pAig, fUseMvSweep, nFramesSymb, nFramesSatur, fVerbose, fVeryVerbose );
672 if ( fLatchEqual && pAig->nRegs )
680 pFlop1 =
Aig_ManCi( pAigInit, nTruePis + Entry1 );
682 assert( pFlop1 != pFlop2 );
683 if ( pFlop1->
Id > pFlop2->
Id )
684 pAigInit->pReprs[pFlop1->
Id] = pFlop2;
686 pAigInit->pReprs[pFlop2->
Id] = pFlop1;
void Aig_ManSeqCleanup_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Ptr_t *vNodes)
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
static Vec_Ptr_t * Vec_PtrStart(int nSize)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Aig_Man_t * Aig_ManRegCreatePart(Aig_Man_t *pAig, Vec_Int_t *vPart, int *pnCountPis, int *pnCountRegs, int **ppMapBack)
ABC_DLL int Aig_ManCheck(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
static Vec_Int_t * Vec_IntDup(Vec_Int_t *pVec)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int Aig_ManSeqCleanupBasic(Aig_Man_t *p)
void Aig_ManStop(Aig_Man_t *p)
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
int Aig_ManReduceLachesCount(Aig_Man_t *p)
void Aig_ManComputeSccs(Aig_Man_t *p)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
void Saig_ManReportUselessRegisters(Aig_Man_t *pAig)
DECLARATIONS ///.
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
static int Aig_IsComplement(Aig_Obj_t *p)
Vec_Ptr_t * Aig_ManSupports(Aig_Man_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
int Aig_ManCountMergeRegs(Aig_Man_t *p)
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static Aig_Obj_t * Aig_ManConst0(Aig_Man_t *p)
#define Aig_ManForEachCo(p, pObj, i)
#define ABC_ALLOC(type, num)
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static Vec_Int_t * Vec_IntStartNatural(int nSize)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
static int Aig_ManNodeNum(Aig_Man_t *p)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Vec_Ptr_t * Aig_ManReduceLachesOnce(Aig_Man_t *p)
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Aig_ManCoNum(Aig_Man_t *p)
static int Aig_ObjIsBuf(Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_ManLo(Aig_Man_t *p, int i)
void Aig_ManReprStart(Aig_Man_t *p, int nIdMax)
DECLARATIONS ///.
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
void Aig_ObjPatchFanin0(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pFaninNew)
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
void Aig_ManReportImprovement(Aig_Man_t *p, Aig_Man_t *pNew)
static Aig_Obj_t * Aig_ManCi(Aig_Man_t *p, int i)
#define Aig_ManForEachLiLoSeq(p, pObjLi, pObjLo, k)
int Aig_TransferMappedClasses(Aig_Man_t *pAig, Aig_Man_t *pPart, int *pMapBack)
static int Vec_IntEntry(Vec_Int_t *p, int i)
Aig_Man_t * Aig_ManConstReduce(Aig_Man_t *p, int fUseMvSweep, int nFramesSymb, int nFramesSatur, int fVerbose, int fVeryVerbose)
static int Aig_ManCiNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
int Saig_ManReportComplements(Aig_Man_t *p)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
void Aig_ManSetCioIds(Aig_Man_t *p)
Aig_Man_t * Aig_ManDupRepr(Aig_Man_t *p, int fOrdered)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
static int Aig_ManObjNumMax(Aig_Man_t *p)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Aig_Man_t * Aig_ManSclPart(Aig_Man_t *pAig, int fLatchConst, int fLatchEqual, int fVerbose)
static int Aig_ManRegNum(Aig_Man_t *p)
static int Vec_IntSize(Vec_Int_t *p)
#define Aig_ManForEachObj(p, pObj, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Vec_IntShrink(Vec_Int_t *p, int nSizeNew)
int Aig_ManSeqCleanup(Aig_Man_t *p)
ABC_NAMESPACE_IMPL_START Aig_Man_t * Aig_ManRemap(Aig_Man_t *p, Vec_Ptr_t *vMap)
DECLARATIONS ///.
#define Aig_ManForEachLoSeq(p, pObj, i)
static int Vec_VecSize(Vec_Vec_t *p)
#define Aig_ManForEachLiSeq(p, pObj, i)
void Aig_ObjDisconnect(Aig_Man_t *p, Aig_Obj_t *pObj)
Aig_Man_t * Aig_ManReduceLaches(Aig_Man_t *p, int fVerbose)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Aig_ManForEachPoSeq(p, pObj, i)
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
static void Vec_IntClear(Vec_Int_t *p)
char * Abc_UtilStrsav(char *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
void Aig_ManCleanData(Aig_Man_t *p)
int Aig_ManCleanup(Aig_Man_t *p)
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Aig_Man_t * Aig_ManDupSimple(Aig_Man_t *p)
DECLARATIONS ///.
Vec_Ptr_t * Aig_ManRegPartitionSimple(Aig_Man_t *pAig, int nPartSize, int nOverSize)
#define Aig_ManForEachPiSeq(p, pObj, i)
SEQUENTIAL ITERATORS ///.
static int Aig_ObjCioId(Aig_Obj_t *pObj)
#define ABC_FALLOC(type, num)
static void Vec_PtrFree(Vec_Ptr_t *p)
Aig_Man_t * Aig_ManScl(Aig_Man_t *pAig, int fLatchConst, int fLatchEqual, int fUseMvSweep, int nFramesSymb, int nFramesSatur, int fVerbose, int fVeryVerbose)