129 for ( i = 0; i < nNodes; i++ )
273 for ( i = 0; i < nNodes; i++ )
302 int i, k, m, nLevels;
309 for ( i = 0; i < nNodes; i++ )
320 for ( i = 0; i <= nLevels; i++ )
345 pFanout->
Level = nLevels + 1;
503 iFanin = (int)(ABC_PTRINT_T)
Vec_PtrPop(vStack);
514 Vec_PtrPush( vStack, (
void *)(ABC_PTRINT_T)(iFanin+1) );
868 for ( i = 0; i < nNodes; i++ )
936 printf(
"Nodes with small support %d (out of %d)\n", Counter,
Abc_NtkNodeNum(p) );
956 int i, nTotalSupps = 0;
963 printf(
"Total supports = %d.\n", nTotalSupps );
1170 return pNode->
Level;
1174 return pNode->
Level;
1182 if ( pNode->
Level < (
unsigned)Level )
1183 pNode->
Level = Level;
1187 return pNode->
Level;
1208 return pNode->
Level;
1212 return pNode->
Level;
1220 if ( pNode->
Level < (
unsigned)Level )
1221 pNode->
Level = Level;
1225 return pNode->
Level;
1284 if ( LevelsMax < (
int)pNode->
Level )
1285 LevelsMax = (int)pNode->
Level;
1294 if ( LevelsMax < (
int)pDriver->
Level )
1295 LevelsMax = (int)pDriver->
Level;
1297 if ( i < pNtk->nBarBufs )
1328 if ( LevelsMax < (
int)pNode->
Level )
1329 LevelsMax = (int)pNode->
Level;
1360 fprintf( stdout,
"Network \"%s\" contains combinational loop!\n",
Abc_NtkName(pNtk) );
1361 fprintf( stdout,
"Node \"%s\" is encountered twice on the following path to the COs:\n",
Abc_ObjName(pNode) );
1395 fprintf( stdout,
" (choice of %s) -> ",
Abc_ObjName(pNode) );
1475 fprintf( stdout,
"Network \"%s\" contains combinational loop!\n",
Abc_NtkName(pNtk) );
1477 fprintf( stdout,
"Box \"%s\" is encountered twice on the following path to the COs:\n",
Abc_ObjName(pNode) );
1479 fprintf( stdout,
"Node \"%s\" is encountered twice on the following path to the COs:\n",
Abc_ObjName(
Abc_ObjFanout0(pNode)) );
1573 int Level1, Level2, Level, LevelE;
1576 return (
int)(ABC_PTRINT_T)pNode->
pCopy;
1614 int i, LevelMax, LevelCur;
1662 ppHead = ((
Abc_Obj_t **)vLevels->pArray) + (int)(ABC_PTRINT_T)pNode->
pCopy;
1663 pNode->
pCopy = *ppHead;
1669 for ( ; pNode; pNode = pNode->
pCopy )
static Vec_Ptr_t * Vec_PtrStart(int nSize)
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static Abc_Obj_t * Abc_ObjFanin1(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_AigDfs(Abc_Ntk_t *pNtk, int fCollectAll, int fCollectCos)
static void Vec_VecPush(Vec_Vec_t *p, int Level, void *Entry)
static Vec_Vec_t * Vec_VecAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
ABC_DLL int Abc_NodeIsConst(Abc_Obj_t *pNode)
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
Vec_Ptr_t * Abc_NtkDfsNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
Vec_Ptr_t * Abc_AigGetLevelizedOrder(Abc_Ntk_t *pNtk, int fCollectCis)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
static int Abc_ObjIsBo(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_NtkDfsIter(Abc_Ntk_t *pNtk, int fCollectAll)
static int Abc_NtkIsNetlist(Abc_Ntk_t *pNtk)
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_NtkDfsReverse(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFanin0Ntk(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_NtkSupport(Abc_Ntk_t *pNtk)
static void Abc_NodeSetTravIdPrevious(Abc_Obj_t *p)
int Abc_NtkIsAcyclic(Abc_Ntk_t *pNtk)
static void Vec_PtrFillExtra(Vec_Ptr_t *p, int nSize, void *Fill)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
static int Abc_ObjIsBarBuf(Abc_Obj_t *pObj)
static int Abc_ObjIsPi(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
static int Abc_AigNodeIsConst(Abc_Obj_t *pNode)
void Abc_NtkSupportSum(Abc_Ntk_t *pNtk)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCo(pNtk, pCo, i)
int Abc_ObjSuppSize_rec(Abc_Obj_t *pObj)
void Abc_NtkDfsReverseNodes_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
int Abc_NtkSuppSizeTest(Abc_Ntk_t *p)
Vec_Ptr_t * Abc_NtkDfsSeqReverse(Abc_Ntk_t *pNtk)
static abctime Abc_Clock()
static int Abc_NodeIsTravIdPrevious(Abc_Obj_t *p)
void Abc_DfsLevelizedTfo_rec(Abc_Obj_t *pNode, Vec_Vec_t *vLevels)
int Abc_NtkLevel(Abc_Ntk_t *pNtk)
static int Abc_MaxInt(int a, int b)
int Abc_NtkIsAcyclicWithBoxes_rec(Abc_Obj_t *pNode)
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)
int Abc_ObjSuppSize(Abc_Obj_t *pObj)
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
Vec_Ptr_t * Abc_NtkDfsReverseNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_NtkDfsSeq(Abc_Ntk_t *pNtk)
int Abc_NtkIsAcyclicWithBoxes(Abc_Ntk_t *pNtk)
Vec_Vec_t * Abc_NtkLevelize(Abc_Ntk_t *pNtk)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
int Abc_NtkIsDfsOrdered(Abc_Ntk_t *pNtk)
static int Abc_MinInt(int a, int b)
void Abc_AigDfs_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
int Abc_NodeSetChoiceLevel_rec(Abc_Obj_t *pNode, int fMaximum)
ABC_DLL int Abc_AigLevel(Abc_Ntk_t *pNtk)
Vec_Vec_t * Abc_DfsLevelized(Abc_Obj_t *pNode, int fTfi)
void Abc_NtkNodeSupport_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
int Abc_AigSetChoiceLevels(Abc_Ntk_t *pNtk)
#define ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START void Abc_NtkDfs_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
DECLARATIONS ///.
Vec_Ptr_t * Abc_AigDfsMap(Abc_Ntk_t *pNtk)
static Vec_Vec_t * Vec_VecStart(int nSize)
static Abc_Obj_t * Abc_ObjFanout0Ntk(Abc_Obj_t *pObj)
void Abc_NtkDfs_iter(Vec_Ptr_t *vStack, Abc_Obj_t *pRoot, Vec_Ptr_t *vNodes)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
#define Abc_NtkForEachNode(pNtk, pNode, i)
Vec_Ptr_t * Abc_NtkDfsHie(Abc_Ntk_t *pNtk, int fCollectAll)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
ABC_DLL float Abc_NodeReadArrivalWorst(Abc_Obj_t *pNode)
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
static int Abc_AigNodeIsChoice(Abc_Obj_t *pNode)
#define Abc_NtkForEachLiPo(pNtk, pCo, i)
static Abc_Obj_t * Abc_ObjRegular(Abc_Obj_t *p)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
static char * Abc_NtkName(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Vec_Ptr_t * Abc_NtkDfsWithBoxes(Abc_Ntk_t *pNtk)
void Abc_NtkDfsWithBoxes_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
int Abc_NtkPrintSubraphSizes(Abc_Ntk_t *pNtk)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
int Abc_NtkLevelReverse_rec(Abc_Obj_t *pNode)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
#define Abc_NtkForEachLatchInput(pNtk, pObj, i)
void Abc_NtkDfsNets_rec(Abc_Obj_t *pNet, Vec_Ptr_t *vNets)
static int Abc_ObjIsNet(Abc_Obj_t *pObj)
int Abc_ObjSugraphSize(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_NtkDfsReverseNodesContained(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
int Abc_NtkIsAcyclic_rec(Abc_Obj_t *pNode)
void Abc_NtkDfsReverse_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
ABC_DLL void Abc_NtkCleanCopy(Abc_Ntk_t *pNtk)
void Abc_NtkDfsSeq_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
int Abc_NtkLevel_rec(Abc_Obj_t *pNode)
static void Vec_PtrClear(Vec_Ptr_t *p)
static int Abc_ObjIsBox(Abc_Obj_t *pObj)
void Abc_NtkDfsSeqReverse_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
Vec_Ptr_t * Abc_NtkDfsIterNodes(Abc_Ntk_t *pNtk, Vec_Ptr_t *vRoots)
static Abc_Ntk_t * Abc_ObjNtk(Abc_Obj_t *pObj)
#define Abc_NtkForEachPo(pNtk, pPo, i)
static Abc_Obj_t * Abc_ObjFanin(Abc_Obj_t *pObj, int i)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
int Abc_NtkLevelReverse(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NodeIsExorType(Abc_Obj_t *pNode)
Vec_Ptr_t * Abc_NtkDfsNets(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
#define Abc_NtkForEachPi(pNtk, pPi, i)
void Abc_NtkDfsHie_rec(Abc_Obj_t *pObj, Vec_Ptr_t *vNodes)
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)
static int Abc_ObjIsBlackbox(Abc_Obj_t *pObj)