64 if ( fExdc && pNtk->
pExdc == NULL )
65 fExdc = 0, printf(
"Warning: Networks has no EXDC.\n" );
85 printf(
"Abc_NtkFraig: The network check has failed.\n" );
240 pNode->
pNext = *ppSlot;
248 if ( pClass->
pNext == NULL )
252 for ( pNode = pClass->
pNext; pNode; pNode = pNode->
pNext )
256 for ( pNode = pClass; pNode; pNode = pNode->
pNext )
318 Abc_Obj_t * pRes, * pRes0, * pRes1, * pResMin, * pResCur;
344 ppTail = &pResMin->
pData;
345 if ( pRes != pResMin )
348 ppTail = &pRes->
pData;
354 if ( pResMin == pResCur )
357 ppTail = &pResCur->
pData;
359 assert( *ppTail == NULL );
401 else if ( (*ppSlot)->Level > pNode->
Level )
411 if ( pNode != pRepr )
491 printf(
"Abc_NtkFraigTrust: Trust mode works for netlists and logic SOP networks.\n" );
497 printf(
"Abc_NtkFraigTrust: The network does not look like an AIG with choice nodes.\n" );
508 printf(
"Warning: The resulting AIG contains %d choice nodes.\n",
Abc_NtkGetChoiceNum( pNtkNew ) );
513 printf(
"Abc_NtkFraigTrust: The network check has failed.\n" );
584 pObj->
pCopy = pNodeNew;
605 int i, nFanins, fCompl;
625 ppTail = &pSum->
pData;
630 *ppTail = pFanin->
pCopy;
636 assert( *ppTail == NULL );
662 printf(
"Abc_NtkFraigStore: Initial strashing has failed.\n" );
673 printf(
"Trying to store the network with different primary inputs.\n" );
674 printf(
"The previously stored networks are deleted and this one is added.\n" );
700 int nWords1, nWords2, nWordsMin;
707 printf(
"There are no network currently in storage.\n" );
787 int nPoOrig, nPoFinal, nStored;
792 assert( nPoFinal % nStored == 0 );
793 nPoOrig = nPoFinal / nStored;
794 for ( i = 0; i < nPoOrig; i++ )
797 for ( k = 1; k < nStored; k++ )
800 if ( pNode0 != pNode1 )
801 printf(
"Verification for PO #%d of network #%d has failed. The PO function is not used.\n", i+1, k+1 );
Fraig_Node_t * Fraig_NodeReadRepr(Fraig_Node_t *p)
Abc_Ntk_t * Abc_NtkFraig(Abc_Ntk_t *pNtk, void *pParams, int fAllNodes, int fExdc)
FUNCTION DEFINITIONS ///.
static Vec_Ptr_t * Vec_PtrStart(int nSize)
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
void Fraig_ManSetPo(Fraig_Man_t *p, Fraig_Node_t *pNode)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static Abc_Obj_t * Abc_ObjFanin1(Abc_Obj_t *pObj)
Fraig_Node_t * Fraig_ManReadConst1(Fraig_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Fraig_ManStruct_t_ Fraig_Man_t
INCLUDES ///.
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
stmm_table * stmm_init_table(stmm_compare_func_type compare, stmm_hash_func_type hash)
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
static int Abc_ObjFaninC1(Abc_Obj_t *pObj)
static int Abc_NtkIsNetlist(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_SopIsOrType(char *pSop)
void Fraig_ManFree(Fraig_Man_t *pMan)
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
static void Abc_NtkFromFraig2_rec(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pNode, Vec_Ptr_t *vNodeReprs)
ABC_DLL char ** Abc_NtkCollectCioNames(Abc_Ntk_t *pNtk, int fCollectCos)
Abc_Ntk_t * Abc_NtkFraigRestore()
static Abc_Obj_t * Abc_ObjChild1Copy(Abc_Obj_t *pObj)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Fraig_Node_t * Fraig_NodeReadNextE(Fraig_Node_t *p)
ABC_DLL int Abc_SopIsInv(char *pSop)
static int Abc_ObjFaninC0(Abc_Obj_t *pObj)
ABC_DLL Abc_Ntk_t * Abc_NtkDup(Abc_Ntk_t *pNtk)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
void Abc_NtkFraigStoreClean()
int Abc_NtkFraigStore(Abc_Ntk_t *pNtkAdd)
#define Abc_NtkForEachCo(pNtk, pCo, i)
ABC_DLL int Abc_NtkCompareSignals(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int fOnlyPis, int fComb)
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
static int Abc_NtkIsSopLogic(Abc_Ntk_t *pNtk)
ABC_NAMESPACE_IMPL_START Abc_Ntk_t * Abc_NtkFromFraig(Fraig_Man_t *pMan, Abc_Ntk_t *pNtk)
DECLARATIONS ///.
ABC_DLL Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void * Vec_PtrPop(Vec_Ptr_t *p)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
ABC_DLL int Abc_NtkGetChoiceNum(Abc_Ntk_t *pNtk)
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
static int Abc_NtkFraigTrustCheck(Abc_Ntk_t *pNtk)
Fraig_Node_t ** Fraig_ManReadOutputs(Fraig_Man_t *p)
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Fraig_Node_t * Abc_NtkToFraigExdc(Fraig_Man_t *pMan, Abc_Ntk_t *pNtkMain, Abc_Ntk_t *pNtkExdc)
ABC_DLL void Abc_NtkReassignIds(Abc_Ntk_t *pNtk)
int Fraig_NodeReadSimInv(Fraig_Node_t *p)
#define Abc_AigForEachAnd(pNtk, pNode, i)
void * Abc_NtkToFraig(Abc_Ntk_t *pNtk, void *pParams, int fAllNodes, int fExdc)
Fraig_Node_t * Fraig_NodeReadTwo(Fraig_Node_t *p)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
ABC_DLL Abc_Obj_t * Abc_AigAnd(Abc_Aig_t *pMan, Abc_Obj_t *p0, Abc_Obj_t *p1)
static int Abc_MinInt(int a, int b)
static Abc_Obj_t * Abc_ObjChild0Copy(Abc_Obj_t *pObj)
static void Abc_NtkFraigRemapUsingExdc(Fraig_Man_t *pMan, Abc_Ntk_t *pNtk)
ABC_DLL Abc_Ntk_t * Abc_NtkStartFrom(Abc_Ntk_t *pNtk, Abc_NtkType_t Type, Abc_NtkFunc_t Func)
Fraig_Node_t * Fraig_NodeAnd(Fraig_Man_t *p, Fraig_Node_t *p1, Fraig_Node_t *p2)
Fraig_Node_t * Fraig_ManReadIthVar(Fraig_Man_t *p, int i)
static Abc_Obj_t * Abc_NodeFraigTrust(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pNode)
int stmm_lookup(stmm_table *table, char *key, char **value)
int stmm_ptrhash(const char *x, int size)
Fraig_Node_t * Fraig_NodeReadData1(Fraig_Node_t *p)
void Fraig_NodeSetData1(Fraig_Node_t *p, Fraig_Node_t *pData)
#define ABC_NAMESPACE_IMPL_END
void Abc_NtkFraigStoreCheck(Abc_Ntk_t *pFraig)
void Fraig_ParamsSetDefault(Fraig_Params_t *pParams)
ABC_DLL void Abc_NtkFinalize(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkNew)
ABC_DLL void Abc_NtkCleanNext(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_SopIsConst0(char *pSop)
Abc_Ntk_t * Abc_NtkFraigPartitioned(Vec_Ptr_t *vStore, void *pParams)
int stmm_find_or_add(stmm_table *table, char *key, char ***slot)
#define Fraig_IsComplement(p)
GLOBAL VARIABLES ///.
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
#define Abc_NtkForEachNode(pNtk, pNode, i)
ABC_DLL Vec_Ptr_t * Abc_AigDfs(Abc_Ntk_t *pNtk, int fCollectAll, int fCollectCos)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
int stmm_ptrcmp(const char *x, const char *y)
Fraig_Node_t * Fraig_NodeReadOne(Fraig_Node_t *p)
void stmm_free_table(stmm_table *table)
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
ABC_DLL int Abc_SopGetIthCareLit(char *pSop, int i)
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
Fraig_Man_t * Fraig_ManCreate(Fraig_Params_t *pParams)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
static Abc_Ntk_t * Abc_NtkFromFraig2(Fraig_Man_t *pMan, Abc_Ntk_t *pNtk)
Abc_Ntk_t * Abc_NtkFraigTrust(Abc_Ntk_t *pNtk)
#define Fraig_NotCond(p, c)
ABC_DLL int Abc_SopGetVarNum(char *pSop)
ABC_DLL void Abc_NtkCleanCopy(Abc_Ntk_t *pNtk)
static void Abc_NtkFraigTrustOne(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkNew)
static Abc_Obj_t * Abc_ObjNotCond(Abc_Obj_t *p, int c)
static void Vec_PtrClear(Vec_Ptr_t *p)
ABC_DLL int Abc_SopIsAndType(char *pSop)
ABC_DLL int Abc_FrameReadStoreSize()
#define stmm_foreach_item(table, gen, key, value)
ABC_DLL void Abc_AigSetNodePhases(Abc_Ntk_t *pNtk)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static Abc_Obj_t * Abc_NodeFromFraig_rec(Abc_Ntk_t *pNtkNew, Fraig_Node_t *pNodeFraig)
ABC_DLL Vec_Ptr_t * Abc_FrameReadStore()
FUNCTION DEFINITIONS ///.
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)
void Fraig_ManProveMiter(Fraig_Man_t *p)