107 printf(
"Iterations = %d. LitBeg = %d. LitEnd = %d. (%6.2f %%).\n",
108 p->nIters, p->nLitsBeg, p->nLitsEnd, 100.0*p->nLitsEnd/p->nLitsBeg );
109 printf(
"NBeg = %d. NEnd = %d. (Gain = %6.2f %%). RBeg = %d. REnd = %d. (Gain = %6.2f %%).\n",
110 p->nNodesBeg, p->nNodesEnd, 100.0*(p->nNodesBeg-p->nNodesEnd)/p->nNodesBeg,
111 p->nRegsBeg, p->nRegsEnd, 100.0*(p->nRegsBeg-p->nRegsEnd)/p->nRegsBeg );
112 ABC_PRT(
"AIG simulation ", p->timeSim );
113 ABC_PRT(
"AIG partitioning", p->timePart );
114 ABC_PRT(
"AIG rebuiding ", p->timeTrav );
115 ABC_PRT(
"FRAIGing ", p->timeFraig );
116 ABC_PRT(
"AIG updating ", p->timeUpdate );
117 ABC_PRT(
"TOTAL RUNTIME ", p->timeTotal );
211 nPart0 = pLcr->pInToOutPart[(long)pObj0->
pNext];
212 nPart1 = pLcr->pInToOutPart[(
long)pObj1->
pNext];
215 if ( nPart0 != nPart1 )
220 assert( nPart0 == nPart1 );
223 pOut0 =
Aig_ManCo( pFraig, pLcr->pInToOutNum[(
long)pObj0->
pNext] );
224 pOut1 =
Aig_ManCo( pFraig, pLcr->pInToOutNum[(
long)pObj1->
pNext] );
248 nPart = pLcr->pInToOutPart[(long)pObj->
pNext];
299 Aig_Obj_t * pObj, * pObjPo, * pObjNew, ** ppClass, * pMiter;
316 for ( c = 0; ppClass[c]; c++ )
321 pMiter =
Aig_Exor( pNew, pMiter, pObjNew );
351 int Out, Offset, i, k, c;
362 for ( c = 0; ppClass[c]; c++ )
364 pInToOutPart[(long)ppClass[c]->pNext] = i;
365 pInToOutNum[(long)ppClass[c]->pNext] =
Vec_IntSize(vOneNew);
366 Vec_IntPush( vOneNew, Offset+(
long)ppClass[c]->pNext );
372 pInToOutPart[(long)pObjPi->
pNext] = i;
479 for ( c = 0; ppClass[c]; c++ )
481 pObj =
Aig_ManCo( p->pCla->pAig, Offset+(
long)ppClass[c]->
pNext );
512 for ( c = 0; ppClass[c]; c++ )
514 pObj =
Aig_ManCo( p->pCla->pAig, Offset+(
long)ppClass[c]->
pNext );
538 Aig_Man_t * pAigPart, * pAigTemp, * pAigNew = NULL;
542 abctime TimeToStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC +
Abc_Clock() : 0;
545 if ( pnIter ) *pnIter = 0;
555 printf(
"Simulating AIG with %d nodes for %d cycles ... ",
Aig_ManNodeNum(pAig), nFramesP + 32 );
573 p->nFramesP = nFramesP;
574 p->fVerbose = fVerbose;
575 p->timeSim += timeSim;
591 printf(
"Partitioning AIG ... " );
609 for ( nIter = 0; p->fRefining; nIter++ )
618 if ( TimeLimit != 0.0 &&
Abc_Clock() > TimeToStop )
624 printf(
"Fra_FraigLatchCorrespondence(): Runtime limit exceeded.\n" );
650 printf(
"%3d : Const = %6d. Class = %6d. L = %6d. Part = %3d. ",
697 if ( pnIter ) *pnIter = nIter;
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
typedefABC_NAMESPACE_IMPL_START struct Fra_Lcr_t_ Fra_Lcr_t
DECLARATIONS ///.
int Fra_ClassesRefine1(Fra_Cla_t *p, int fRefineNewClass, int *pSkipped)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Aig_Man_t * Fra_LcrCreatePart(Fra_Lcr_t *p, Vec_Int_t *vPart)
static Aig_Type_t Aig_ObjType(Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Vec_Ptr_t * Aig_ManPartitionSmart(Aig_Man_t *p, int nPartSizeLimit, int fVerbose, Vec_Ptr_t **pvPartSupps)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
Fra_Sml_t * Fra_SmlSimulateSeq(Aig_Man_t *pAig, int nPref, int nFrames, int nWords, int fCheckMiter)
int Aig_ManSeqCleanup(Aig_Man_t *p)
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Fra_Cla_t * Fra_ClassesStart(Aig_Man_t *pAig)
FUNCTION DEFINITIONS ///.
Aig_Man_t * Fra_FraigEquivence(Aig_Man_t *pManAig, int nConfMax, int fProve)
int Fra_ClassesCountLits(Fra_Cla_t *p)
Aig_Obj_t * Aig_Exor(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Aig_Man_t * Aig_ManDupOrdered(Aig_Man_t *p)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
void Aig_ManCleanMarkB(Aig_Man_t *p)
static int Aig_IsComplement(Aig_Obj_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
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 ABC_ALLOC(type, num)
void Fra_LcrAigPrepareTwo(Aig_Man_t *pAig, Fra_Man_t *p)
static abctime Abc_Clock()
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
Aig_Obj_t * Aig_Oper(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1, Aig_Type_t Type)
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
static int Aig_ManNodeNum(Aig_Man_t *p)
Aig_Obj_t * Fra_LcrManDup_rec(Aig_Man_t *pNew, Aig_Man_t *p, Aig_Obj_t *pObj)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
void Fra_ClassNodesMark(Fra_Lcr_t *p)
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
void Fra_ClassesPrepare(Fra_Cla_t *p, int fLatchCorr, int nMaxLevs)
static int Aig_ManCoNum(Aig_Man_t *p)
Abc_Cex_t * Fra_SmlGetCounterExample(Fra_Sml_t *p)
static int Aig_ObjIsBuf(Aig_Obj_t *pObj)
void Lcr_ManFree(Fra_Lcr_t *p)
void Aig_ManReprStart(Aig_Man_t *p, int nIdMax)
DECLARATIONS ///.
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
int Fra_LcrNodeIsConst(Aig_Obj_t *pObj)
Fra_Man_t * Fra_LcrAigPrepare(Aig_Man_t *pAig)
static int Aig_ManCiNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
void Fra_ClassesStop(Fra_Cla_t *p)
Aig_Man_t * Aig_ManStartFrom(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)
int Fra_LcrNodesAreEqual(Aig_Obj_t *pObj0, Aig_Obj_t *pObj1)
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)
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
static int Aig_ManRegNum(Aig_Man_t *p)
void Fra_ClassesSelectRepr(Fra_Cla_t *p)
Aig_Man_t * Fra_LcrDeriveAigForPartitioning(Fra_Lcr_t *pLcr)
void Fra_ClassNodesUnmark(Fra_Lcr_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 ///.
int Fra_ClassesRefine(Fra_Cla_t *p)
void Fra_ClassesCopyReprs(Fra_Cla_t *p, Vec_Ptr_t *vFailed)
void Aig_ManCleanMarkA(Aig_Man_t *p)
static void Vec_PtrClear(Vec_Ptr_t *p)
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 ///.
void Lcr_ManPrint(Fra_Lcr_t *p)
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
void Aig_ManCleanData(Aig_Man_t *p)
Fra_Lcr_t * Lcr_ManAlloc(Aig_Man_t *pAig)
FUNCTION DEFINITIONS ///.
Aig_Man_t * Fra_FraigLatchCorrespondence(Aig_Man_t *pAig, int nFramesP, int nConfMax, int fProve, int fVerbose, int *pnIter, float TimeLimit)
Aig_Obj_t * Fra_LcrCreatePart_rec(Fra_Cla_t *pCla, Aig_Man_t *pNew, Aig_Man_t *p, Aig_Obj_t *pObj)
void Fra_SmlStop(Fra_Sml_t *p)
void Fra_LcrRemapPartitions(Vec_Ptr_t *vParts, Fra_Cla_t *pCla, int *pInToOutPart, int *pInToOutNum)
static void Vec_PtrFree(Vec_Ptr_t *p)