61 unsigned * pSimmNode, * pSimmNode1, * pSimmNode2;
74 pSimmNode = (
unsigned *)vSuppStr->pArray[ pNode->
Id ];
77 for ( k = 0; k < nSuppWords; k++ )
78 pSimmNode[k] = pSimmNode1[k] | pSimmNode2[k];
83 pSimmNode = (
unsigned *)vSuppStr->pArray[ pNode->
Id ];
85 for ( k = 0; k < nSuppWords; k++ )
86 pSimmNode[k] = pSimmNode1[k];
126 for ( i = 0; i < 1; i++ )
135 printf(
"Targets = %5d. Solved = %5d. Fifo = %5d.\n",
149 printf(
"Targets = %5d. Solved = %5d. Fifo = %5d. SAT runs = %3d.\n",
182 for ( i = p->
iInput; i < p->nInputs; i++ )
185 if ( fUseTargets && vTargets->nSize == 0 )
210 int i, k, v, Output, LuckyPat, fType0, fType1;
236 for ( i = vTargets->nSize - 1; i >= 0; i-- )
239 Output = vTargets->pArray[i];
252 printf(
"(%d,%d) ", iNumCi, Output );
262 if ( !fFirst && p->
vFifo->nSize > 1000 )
269 pPat->
Input = iNumCi;
280 if ( fVerbose && Counter )
317 unsigned * pSuppStr, * pSuppFun;
321 pSuppStr = (
unsigned *)p->
vSuppStr->pArray[pNode->
Id];
322 pSuppFun = (
unsigned *)p->
vSuppFun->pArray[i];
349 pSimInfo = (
unsigned *)p->
vSim0->pArray[pNode->
Id];
372 int nWordsNew, iWord, iWordLim, i, w;
376 for ( iWord = 0; p->
vFifo->nSize > 0; iWord = iWordLim )
384 iWordLim = iWord + 1;
392 pSimInfo = (
unsigned *)p->
vSim0->pArray[pNode->
Id];
398 if ( i >= iBeg && i < iEnd )
412 pSimInfo = (
unsigned *)p->
vSim0->pArray[pNode->
Id];
415 for ( w = iWord; w < iWordLim; w++ )
420 for ( w = iWord; w < iWordLim; w++ )
458 int RetValue, Output, Input, k, v;
467 Output = (int)(ABC_PTRUINT_T)pEntry;
552 return (
int)(ABC_PTRUINT_T)pNode->
pCopy;
561 return Value0 & Value1;
586 else if ( pModel[i] == 1 )
594 return RetValue == 1 || RetValue == 2;
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static Abc_Obj_t * Abc_ObjFanin1(Abc_Obj_t *pObj)
static void Sim_UtilAssignFromFifo(Sim_Man_t *p)
#define Sim_SuppFunSetVar(vSupps, Output, v)
static void Vec_VecPush(Vec_Vec_t *p, int Level, void *Entry)
typedefABC_NAMESPACE_HEADER_START struct Fraig_ManStruct_t_ Fraig_Man_t
INCLUDES ///.
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
int Sim_NtkSimTwoPats_rec(Abc_Obj_t *pNode)
static int Abc_ObjFaninC1(Abc_Obj_t *pObj)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Vec_Ptr_t * Sim_ComputeStrSupp(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
void Fraig_ManFree(Fraig_Man_t *pMan)
#define Vec_VecForEachEntry(Type, vGlob, pEntry, i, k)
#define SIM_RANDOM_UNSIGNED
ABC_DLL Abc_Ntk_t * Abc_NtkMiterForCofactors(Abc_Ntk_t *pNtk, int Out, int In1, int In2)
static int Abc_ObjFaninC0(Abc_Obj_t *pObj)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCo(pNtk, pCo, i)
static Abc_Obj_t * Abc_NtkCi(Abc_Ntk_t *pNtk, int i)
static abctime Abc_Clock()
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_VecFree(Vec_Vec_t *p)
static void * Vec_PtrPop(Vec_Ptr_t *p)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static int Abc_ObjFaninId0(Abc_Obj_t *pObj)
for(p=first;p->value< newval;p=p->next)
static void Vec_PtrRemove(Vec_Ptr_t *p, void *Entry)
static void Sim_ComputeSuppSetTargets(Sim_Man_t *p)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_NtkCo(Abc_Ntk_t *pNtk, int i)
void Sim_ManPatFree(Sim_Man_t *p, Sim_Pat_t *pPat)
void Sim_UtilSimulateNode(Sim_Man_t *p, Abc_Obj_t *pNode, int fType, int fType1, int fType2)
#define Sim_SimInfoHasVar(vSupps, pNode, v)
static int Abc_MinInt(int a, int b)
Vec_Ptr_t * Sim_UtilInfoAlloc(int nSize, int nWords, int fClean)
FUNCTION DEFINITIONS ///.
void Sim_UtilInfoFlip(Sim_Man_t *p, Abc_Obj_t *pNode)
static int Sim_ComputeSuppRoundNode(Sim_Man_t *p, int iNumCi, int fUseTargets)
void Sim_UtilSimulate(Sim_Man_t *p, int fFirst)
Vec_Ptr_t * Sim_ComputeFunSupp(Abc_Ntk_t *pNtk, int fVerbose)
#define Vec_VecForEachEntryReverse(Type, vGlob, pEntry, i, k)
void Sim_ManStop(Sim_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
void Sim_UtilInfoDetectDiffs(unsigned *pInfo1, unsigned *pInfo2, int nWords, Vec_Int_t *vDiffs)
void Fraig_ParamsSetDefault(Fraig_Params_t *pParams)
static void Sim_UtilAssignRandom(Sim_Man_t *p)
#define SIM_NUM_WORDS(n)
MACRO DEFINITIONS ///.
static int Vec_IntRemove(Vec_Int_t *p, int Entry)
static int Sim_SolveSuppModelVerify(Abc_Ntk_t *pNtk, int *pModel, int Input, int Output)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_NAMESPACE_IMPL_START
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
ABC_DLL Vec_Vec_t * Abc_DfsLevelized(Abc_Obj_t *pNode, int fTfi)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static int Vec_VecSizeSize(Vec_Vec_t *p)
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
static ABC_NAMESPACE_IMPL_START int Sim_ComputeSuppRound(Sim_Man_t *p, int fUseTargets)
DECLARATIONS ///.
int Sim_UtilInfoCompare(Sim_Man_t *p, Abc_Obj_t *pNode)
static int Abc_ObjFaninId1(Abc_Obj_t *pObj)
Sim_Man_t * Sim_ManStart(Abc_Ntk_t *pNtk, int fLightweight)
static void Sim_SolveTargetsUsingSat(Sim_Man_t *p, int nCounters)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int * Fraig_ManReadModel(Fraig_Man_t *p)
int Fraig_ManCheckMiter(Fraig_Man_t *p)
void Sim_UtilInfoDetectNews(unsigned *pInfo1, unsigned *pInfo2, int nWords, Vec_Int_t *vDiffs)
#define Sim_SuppStrSetVar(vSupps, pNode, v)
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
ABC_DLL void * Abc_NtkToFraig(Abc_Ntk_t *pNtk, void *pParams, int fAllNodes, int fExdc)
#define Sim_SuppFunHasVar(vSupps, Output, v)
Sim_Pat_t * Sim_ManPatAlloc(Sim_Man_t *p)
void Fraig_ManProveMiter(Fraig_Man_t *p)