69 Vec_Int_t * vMapEntries, * vFlopCosts, * vFlopAddCosts, * vFfsToAddBest;
70 int i, k, f, Entry, iBit, *
pPerm;
86 for ( f = 0; f < pAbsCex->iFrame; f++ )
89 iBit = pAbsCex->nRegs + f * pAbsCex->nPis +
Saig_ManPiNum(pAig);
102 iBit = pAbsCex->nRegs + (f + 1) * pAbsCex->nPis +
Saig_ManPiNum(pAig);
118 for ( i = 0; i < nFfsToSelect; i++ )
131 return vFfsToAddBest;
152 assert( pAig->nConstrs == 0 );
227 int i, Entry, iInput, iFrame;
228 pCare =
Abc_CexDup( p->pCex, p->pCex->nRegs );
235 Abc_InfoSetBit( pCare->pData, pCare->nRegs + pCare->nPis * iFrame + iInput );
283 assert( !fPhase0 || !fPhase1 );
284 if ( !fPhase0 && fPhase1 )
286 else if ( fPhase0 && !fPhase1 )
292 if ( iPrio0 <= iPrio1 )
324 pObj->
fPhase =
Abc_InfoHasBit( p->pCex->pData, p->pCex->nRegs + p->pCex->nPis * iFrame + iInput );
335 pObj->
fPhase = fPhase0 && fPhase1;
336 if ( fPhase0 && fPhase1 )
338 else if ( !fPhase0 && fPhase1 )
340 else if ( fPhase0 && !fPhase1 )
421 for ( f = pCex->iFrame; f >= 0; f-- )
448 for ( f = 0; f <= pCex->iFrame; f++ )
464 int iBit = pCex->nRegs + f * pCex->nPis +
Aig_ObjCioId(pObj);
475 if ( f == pCex->iFrame )
519 p->nInputs = nInputs;
520 p->fVerbose = fVerbose;
560 int f, k, ObjId, Lit;
578 printf(
"Level = %4d StateBits = %4d (%6.2f %%) CareBits = %4d (%6.2f %%)\n", k,
651 assert( pCex->iFrame == pCare->iFrame );
652 assert( pCex->nBits == pCare->nBits );
666 for ( f = 0; f <= pCex->iFrame; f++ )
701 assert( iBit == pCex->nBits );
742 printf(
"Frame PIs = %4d (essential = %4d) AIG PIs = %4d (essential = %4d) ",
792 printf(
"Saig_ManCbaFilterInputs(): The PI count of AIG (%d) does not match that of cex (%d).\n",
804 printf(
"Frame PIs = %4d (essential = %4d) AIG PIs = %4d (essential = %4d) ",
838 if ( RetValue == -1 )
840 printf(
"Resource limit is reached during BMC.\n" );
841 assert( pAbs->pSeqModel == NULL );
844 if ( pAbs->pSeqModel == NULL )
846 printf(
"BMC did not detect a CEX with the given depth.\n" );
860 printf(
"Adding %d registers to the abstraction (total = %d). ",
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
static int * Vec_IntArray(Vec_Int_t *p)
static int Saig_ObjCexMinGetX(Aig_Obj_t *pObj)
int Saig_ManBmcScalable(Aig_Man_t *pAig, Saig_ParBmc_t *pPars)
static int Aig_ObjFaninId0(Aig_Obj_t *pObj)
static int Saig_ObjCexMinGet0Fanin0(Aig_Obj_t *pObj)
Saig_ManCba_t * Saig_ManCbaStart(Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, int fVerbose)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
static int Saig_ManPoNum(Aig_Man_t *p)
static int Saig_ObjIsLo(Aig_Man_t *p, Aig_Obj_t *pObj)
Aig_Man_t * Saig_ManCbaUnrollWithCex(Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, Vec_Int_t **pvMapPiF2A, Vec_Vec_t **pvReg2Frame)
static int Saig_ObjCexMinGet0Fanin1(Aig_Obj_t *pObj)
#define Aig_ManForEachObjVec(vIds, p, pObj, i)
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)
static int Abc_InfoHasBit(unsigned *p, int i)
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
#define Saig_ManForEachLiLo(p, pObjLi, pObjLo, i)
static Aig_Obj_t * Saig_ObjLoToLi(Aig_Man_t *p, Aig_Obj_t *pObj)
static Aig_Obj_t * Saig_ManLo(Aig_Man_t *p, int i)
#define Vec_VecForEachLevelInt(vGlob, vVec, i)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
static int Abc_Var2Lit(int Var, int fCompl)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
void Aig_ManCleanMarkB(Aig_Man_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
void Saig_ManCbaStop(Saig_ManCba_t *p)
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Abc_Cex_t * Saig_ManCbaFindCexCareBits(Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, int fVerbose)
#define Aig_ManForEachCo(p, pObj, i)
static int Saig_ObjCexMinGet1Fanin1(Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
void Aig_ManStopP(Aig_Man_t **p)
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
static abctime Abc_Clock()
static int Aig_ObjFaninId1(Aig_Obj_t *pObj)
static int Abc_MaxInt(int a, int b)
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static void Vec_VecFree(Vec_Vec_t *p)
static Vec_Int_t * Vec_IntStartFull(int nSize)
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
static int Aig_ManNodeNum(Aig_Man_t *p)
static int Saig_ObjIsLi(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 Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
static void Abc_PrintTime(int level, const char *pStr, abctime time)
int * Abc_MergeSortCost(int *pCosts, int nSize)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Abc_MinInt(int a, int b)
static Vec_Int_t * Vec_IntStart(int nSize)
static int Abc_LitIsCompl(int Lit)
#define Aig_ManForEachNode(p, pObj, i)
static void Vec_VecPushInt(Vec_Vec_t *p, int Level, int Entry)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Saig_ObjCexMinSet1(Aig_Obj_t *pObj)
Abc_Cex_t * Saig_ManCbaReason2Cex(Saig_ManCba_t *p, Vec_Int_t *vReasons)
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
#define Saig_ManForEachLi(p, pObj, i)
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Aig_ManCiNum(Aig_Man_t *p)
void Abc_CexPrintStats(Abc_Cex_t *p)
static Aig_Obj_t * Saig_ObjLiToLo(Aig_Man_t *p, Aig_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Vec_Int_t * Saig_ManCbaPerform(Aig_Man_t *pAbs, int nInputs, Saig_ParBmc_t *pPars)
static Aig_Obj_t * Saig_ManLi(Aig_Man_t *p, int i)
Vec_Int_t * Saig_ManCbaFilterFlops(Aig_Man_t *pAig, Abc_Cex_t *pAbsCex, Vec_Int_t *vFlopClasses, Vec_Int_t *vAbsFfsToAdd, int nFfsToSelect)
FUNCTION DEFINITIONS ///.
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define Saig_ManForEachLo(p, pObj, i)
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
static Vec_Vec_t * Vec_VecStart(int nSize)
static void Vec_IntFreeP(Vec_Int_t **p)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
static int Saig_ManRegNum(Aig_Man_t *p)
static int Aig_ManObjNumMax(Aig_Man_t *p)
typedefABC_NAMESPACE_IMPL_START struct Saig_ManCba_t_ Saig_ManCba_t
DECLARATIONS ///.
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
#define ABC_NAMESPACE_IMPL_START
static void Abc_InfoSetBit(unsigned *p, int i)
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
static int Aig_ObjToLit(Aig_Obj_t *pObj)
void Saig_ManCbaShrink(Saig_ManCba_t *p)
static int Aig_ManRegNum(Aig_Man_t *p)
static int Vec_IntSize(Vec_Int_t *p)
static void Saig_ObjCexMinPrint(Aig_Obj_t *pObj)
static int Saig_ObjCexMinGet1(Aig_Obj_t *pObj)
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
static void Saig_ObjCexMinSet0(Aig_Obj_t *pObj)
void Aig_ManCleanMarkAB(Aig_Man_t *p)
Abc_Cex_t * Abc_CexDup(Abc_Cex_t *p, int nRegsNew)
Aig_Man_t * Saig_ManDupWithCubes(Aig_Man_t *pAig, Vec_Vec_t *vReg2Value)
Vec_Int_t * Saig_ManCbaFilterInputs(Aig_Man_t *pAig, int iFirstFlopPi, Abc_Cex_t *pCex, int fVerbose)
static int Vec_VecSizeSize(Vec_Vec_t *p)
#define ABC_CALLOC(type, num)
static int Abc_Lit2Var(int Lit)
Vec_Int_t * Saig_ManCbaFindReason(Saig_ManCba_t *p)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Vec_Int_t * Saig_ManCbaReason2Inputs(Saig_ManCba_t *p, Vec_Int_t *vReasons)
void Saig_ManCbaFindReason_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Int_t *vPrios, Vec_Int_t *vReasons)
static void Saig_ObjCexMinSetX(Aig_Obj_t *pObj)
static int Abc_BitWordNum(int nBits)
static void Vec_VecFreeP(Vec_Vec_t **p)
static int Aig_ObjId(Aig_Obj_t *pObj)
static void Saig_ObjCexMinSim(Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
static int Saig_ObjCexMinGet1Fanin0(Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
static void Vec_IntFree(Vec_Int_t *p)
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
int Saig_ManCexVerifyUsingTernary(Aig_Man_t *pAig, Abc_Cex_t *pCex, Abc_Cex_t *pCare)
char * Abc_UtilStrsav(char *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
void Saig_ManCbaUnrollCollect_rec(Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Int_t *vObjs, Vec_Int_t *vRoots)
static int Saig_ObjIsPi(Aig_Man_t *p, Aig_Obj_t *pObj)
int Aig_ManCleanup(Aig_Man_t *p)
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
static int Aig_ObjIsAnd(Aig_Obj_t *pObj)
static int Saig_ObjCexMinGet0(Aig_Obj_t *pObj)
static int Aig_ObjCioId(Aig_Obj_t *pObj)
#define Saig_ManForEachPi(p, pObj, i)