50 assert( !Abc_ObjIsNet(pNode) );
52 if ( Abc_NodeIsTravIdCurrent( pNode ) )
55 Abc_NodeSetTravIdCurrent( pNode );
57 if ( Abc_ObjIsCi(pNode) || (Abc_NtkIsStrash(pNode->
pNtk) && Abc_AigNodeIsConst(pNode)) )
59 assert( Abc_ObjIsNode( pNode ) || Abc_ObjIsBox( pNode ) );
67 Vec_PtrPush( vNodes, pNode );
88 Abc_NtkIncrementTravId( pNtk );
90 vNodes = Vec_PtrAlloc( 100 );
95 Abc_NodeSetTravIdCurrent( pObj );
97 Vec_PtrPush( vNodes, pObj );
102 Abc_NodeSetTravIdCurrent( pObj );
109 if ( !Abc_NodeIsTravIdCurrent(pObj) )
129 Vec_Ptr_t * vNodes = Vec_PtrAlloc( 100 );
131 Abc_NtkIncrementTravId( pNtk );
134 Abc_NodeSetTravIdCurrent( pObj );
156 Abc_NtkIncrementTravId( pNtk );
158 vNodes = Vec_PtrAlloc( 100 );
160 for ( i = 0; i < nNodes; i++ )
162 if ( Abc_NtkIsStrash(pNtk) && Abc_AigNodeIsConst(ppNodes[i]) )
164 if ( Abc_ObjIsCo(ppNodes[i]) )
166 Abc_NodeSetTravIdCurrent(ppNodes[i]);
167 Abc_NtkDfs_rec( Abc_ObjFanin0Ntk(Abc_ObjFanin0(ppNodes[i])), vNodes );
169 else if ( Abc_ObjIsNode(ppNodes[i]) || Abc_ObjIsCi(ppNodes[i]) )
191 assert( !Abc_ObjIsNet(pNode) );
193 if ( Abc_NodeIsTravIdCurrent( pNode ) )
196 Abc_NodeSetTravIdCurrent( pNode );
198 if ( Abc_ObjIsCo(pNode) )
200 assert( Abc_ObjIsNode( pNode ) );
202 pNode = Abc_ObjFanout0Ntk(pNode);
206 Vec_PtrPush( vNodes, pNode );
227 Abc_NtkIncrementTravId( pNtk );
229 vNodes = Vec_PtrAlloc( 100 );
232 Abc_NodeSetTravIdCurrent( pObj );
233 pObj = Abc_ObjFanout0Ntk(pObj);
238 if ( !Abc_NtkIsStrash(pNtk) ) {
241 Vec_PtrPush( vNodes, pObj );
261 assert( !Abc_ObjIsNet(pNode) );
263 if ( Abc_NodeIsTravIdCurrent( pNode ) )
266 Abc_NodeSetTravIdCurrent( pNode );
268 if ( Abc_ObjIsCo(pNode) )
270 assert( Abc_ObjIsNode( pNode ) );
272 pNode = Abc_ObjFanout0Ntk(pNode);
277 Vec_PtrFillExtra( vNodes, pNode->
Level + 1, NULL );
279 Vec_PtrWriteEntry( vNodes, pNode->
Level, pNode );
299 assert( Abc_NtkIsStrash(pNtk) );
301 Abc_NtkIncrementTravId( pNtk );
304 for ( i = 0; i < nNodes; i++ )
307 assert( Abc_ObjIsCi(pObj) );
308 Abc_NodeSetTravIdCurrent( pObj );
309 pObj = Abc_ObjFanout0Ntk(pObj);
333 int i, k, m, nLevels;
337 Abc_NtkIncrementTravId( pNtk );
339 vNodes = Vec_PtrStart( nLevels + 2 );
340 for ( i = 0; i < nNodes; i++ )
343 assert( Abc_ObjIsCi(pObj) );
344 Abc_NodeSetTravIdCurrent( pObj );
348 Vec_PtrWriteEntry( vNodes, pObj->
Level, pObj );
351 for ( i = 0; i <= nLevels; i++ )
354 for ( pObj = (
Abc_Obj_t *)Vec_PtrEntry(vNodes, i); pObj; pObj = pObj->
pCopy )
360 if ( Abc_NodeIsTravIdCurrent(pFanout) )
365 if ( !Abc_NodeIsTravIdCurrent(pFanin) )
368 if ( m < Abc_ObjFaninNum(pFanout) )
373 Abc_NodeSetTravIdCurrent( pFanout );
375 if ( Abc_ObjIsCo(pFanout) )
376 pFanout->
Level = nLevels + 1;
379 Vec_PtrWriteEntry( vNodes, pFanout->
Level, pFanout );
381 if ( Abc_ObjIsCo(pFanout) )
406 if ( Abc_NodeIsTravIdCurrent( pNode ) )
409 Abc_NodeSetTravIdCurrent( pNode );
414 Vec_PtrPush( vNodes, pNode );
433 assert( !Abc_NtkIsNetlist(pNtk) );
435 Abc_NtkIncrementTravId( pNtk );
437 vNodes = Vec_PtrAlloc( 100 );
463 if ( Abc_NodeIsTravIdCurrent( pNode ) )
466 Abc_NodeSetTravIdCurrent( pNode );
471 Vec_PtrPush( vNodes, pNode );
490 assert( !Abc_NtkIsNetlist(pNtk) );
492 Abc_NtkIncrementTravId( pNtk );
494 vNodes = Vec_PtrAlloc( 100 );
520 if ( Abc_NodeIsTravIdCurrent( pRoot ) )
523 Abc_NodeSetTravIdCurrent( pRoot );
525 if ( Abc_ObjIsCi(pRoot) || (Abc_NtkIsStrash(pRoot->
pNtk) && Abc_AigNodeIsConst(pRoot)) )
528 Vec_PtrClear( vStack );
529 Vec_PtrPush( vStack, pRoot );
530 Vec_PtrPush( vStack, (
void *)0 );
531 while ( Vec_PtrSize(vStack) > 0 )
534 iFanin = (int)(ABC_PTRINT_T)Vec_PtrPop(vStack);
536 assert( !Abc_ObjIsNet(pNode) );
538 if ( iFanin == Abc_ObjFaninNum(pNode) )
540 Vec_PtrPush( vNodes, pNode );
544 Vec_PtrPush( vStack, pNode );
545 Vec_PtrPush( vStack, (
void *)(ABC_PTRINT_T)(iFanin+1) );
547 pFanin = Abc_ObjFanin0Ntk( Abc_ObjFanin(pNode,iFanin) );
549 if ( Abc_NodeIsTravIdCurrent( pFanin ) )
552 Abc_NodeSetTravIdCurrent( pFanin );
554 if ( Abc_ObjIsCi(pFanin) || (Abc_NtkIsStrash(pFanin->
pNtk) && Abc_AigNodeIsConst(pFanin)) )
556 Vec_PtrPush( vStack, pFanin );
557 Vec_PtrPush( vStack, (
void *)0 );
579 Abc_NtkIncrementTravId( pNtk );
581 vNodes = Vec_PtrAlloc( 1000 );
582 vStack = Vec_PtrAlloc( 1000 );
585 Abc_NodeSetTravIdCurrent( pObj );
586 Abc_NtkDfs_iter( vStack, Abc_ObjFanin0Ntk(Abc_ObjFanin0(pObj)), vNodes );
592 if ( !Abc_NodeIsTravIdCurrent(pObj) )
595 Vec_PtrFree( vStack );
616 Abc_NtkIncrementTravId( pNtk );
617 vNodes = Vec_PtrAlloc( 1000 );
618 vStack = Vec_PtrAlloc( 1000 );
620 if ( !Abc_NodeIsTravIdCurrent(Abc_ObjRegular(pObj)) )
622 Vec_PtrFree( vStack );
643 if ( Abc_NodeIsTravIdCurrent( pObj ) )
646 Abc_NodeSetTravIdCurrent( pObj );
651 Vec_PtrPush( vNodes, pObj );
671 Abc_NtkIncrementTravId( pNtk );
673 vNodes = Vec_PtrAlloc( 100 );
680 if ( !Abc_NodeIsTravIdCurrent(pObj) )
703 Abc_NtkIncrementTravId( pNtk );
706 Abc_NodeSetTravIdCurrent( pNode );
712 if ( !Abc_NodeIsTravIdCurrent(pFanin) )
715 if ( Abc_NtkIsStrash(pNtk) && Abc_AigNodeIsChoice(pNode) )
717 if ( !Abc_NodeIsTravIdCurrent(pFanin) )
720 Abc_NodeSetTravIdCurrent( pNode );
740 assert( Abc_ObjIsNet(pNet) );
741 if ( Abc_NodeIsTravIdCurrent( pNet ) )
743 Abc_NodeSetTravIdCurrent( pNet );
744 pNode = Abc_ObjFanin0( pNet );
748 Vec_PtrPush( vNets, pNext );
754 vNets = Vec_PtrAlloc( 100 );
755 Abc_NtkIncrementTravId( pNtk );
757 Abc_NodeSetTravIdCurrent( Abc_ObjFanout0(pObj) );
759 Vec_PtrPush( vNets, Abc_ObjFanout0(pObj) );
781 assert( !Abc_ObjIsNet(pNode) );
782 if ( Abc_ObjIsBo(pNode) )
783 pNode = Abc_ObjFanin0(pNode);
784 if ( Abc_ObjIsPi(pNode) )
786 assert( Abc_ObjIsNode( pNode ) || Abc_ObjIsBox( pNode ) );
787 if ( Abc_NodeIsTravIdCurrent( pNode ) )
789 Abc_NodeSetTravIdCurrent( pNode );
792 if ( Abc_ObjIsBox(pNode) )
793 pFanin = Abc_ObjFanin0(pFanin);
794 assert( Abc_ObjIsNet(pFanin) );
797 Vec_PtrPush( vNodes, pNode );
804 Abc_NtkIncrementTravId( pNtk );
805 vNodes = Vec_PtrAlloc( 100 );
808 assert( Abc_ObjIsNet(Abc_ObjFanin0(pObj)) );
830 assert( !Abc_ObjIsNet(pNode) );
832 if ( Abc_NodeIsTravIdCurrent( pNode ) )
835 Abc_NodeSetTravIdCurrent( pNode );
837 if ( Abc_ObjIsCi(pNode) || (Abc_NtkIsStrash(pNode->
pNtk) && Abc_ObjFaninNum(pNode) == 0) )
839 Vec_PtrPush( vNodes, pNode );
842 assert( Abc_ObjIsNode( pNode ) );
865 Abc_NtkIncrementTravId( pNtk );
867 vNodes = Vec_PtrAlloc( 100 );
873 if ( !Abc_NodeIsTravIdCurrent( pNode ) )
874 Vec_PtrPush( vNodes, pNode );
875 assert( Vec_PtrSize(vNodes) == Abc_NtkCiNum(pNtk) );
895 Abc_NtkIncrementTravId( pNtk );
897 vNodes = Vec_PtrAlloc( 100 );
899 for ( i = 0; i < nNodes; i++ )
900 if ( Abc_ObjIsCo(ppNodes[i]) && Abc_ObjFaninNum(Abc_ObjFanin0(ppNodes[i])) != 0 )
902 else if ( !Abc_ObjIsCo(ppNodes[i]) && Abc_ObjFaninNum(ppNodes[i]) != 0 )
922 assert( !Abc_ObjIsNet(pNode) );
924 if ( Abc_NodeIsTravIdCurrent( pNode ) )
927 Abc_NodeSetTravIdCurrent( pNode );
929 if ( Abc_ObjIsCi(pNode) || (Abc_NtkIsStrash(pNode->
pNtk) && Abc_ObjFaninNum(pNode) == 0) )
931 if ( Abc_ObjIsCi(pNode) )
932 Vec_IntPush( vNodes, pNode->
iTemp );
935 assert( Abc_ObjIsNode( pNode ) );
945 if ( iCo < 0 || iCo >= Abc_NtkCoNum(pNtk) )
951 Abc_NtkIncrementTravId( pNtk );
952 pObj = Abc_NtkCo( pNtk, iCo );
953 vNodes = Vec_IntAlloc( 100 );
955 Vec_IntSort( vNodes, 0 );
973 if ( Abc_NodeIsTravIdCurrent(pNode) || Abc_ObjFaninNum(pNode) == 0 || Abc_ObjIsCi(pNode) )
975 assert( Abc_ObjIsNode( pNode ) );
976 Abc_NodeSetTravIdCurrent( pNode );
979 iLit0 = Abc_LitNotCond( iLit0, Abc_ObjFaninC0(pNode) );
980 iLit1 = Abc_LitNotCond( iLit1, Abc_ObjFaninC1(pNode) );
988 if ( Vec_IntSize(vSupp1) == Vec_IntSize(vSupp2) )
991 int i, iCi, iLit1, iLit2;
999 Vec_Int_t * vCommon = Vec_IntAlloc( Vec_IntSize(vSupp1) );
1000 Vec_IntTwoRemoveCommon( vSupp1, vSupp2, vCommon );
1001 Vec_IntAppend( vSupp1, vCommon );
1002 Vec_IntAppend( vSupp2, vCommon );
1003 Vec_IntFree( vCommon );
1004 assert( Vec_IntSize(vSupp1) == Vec_IntSize(vSupp2) );
1009 Abc_NtkCi(pNtk, iCi)->iTemp = Gia_ManAppendCi(pNew);
1011 Abc_NtkIncrementTravId( pNtk );
1012 pObj = Abc_NtkCo( pNtk, iCo1 );
1014 iLit1 = Abc_LitNotCond( iLit1, Abc_ObjFaninC0(pObj) );
1017 Abc_NtkCi(pNtk, iCi)->iTemp = Gia_ManCiLit(pNew, i);
1019 Abc_NtkIncrementTravId( pNtk );
1020 pObj = Abc_NtkCo( pNtk, iCo2 );
1022 iLit2 = Abc_LitNotCond( iLit2, Abc_ObjFaninC0(pObj) );
1023 Gia_ManAppendCo( pNew, iLit1 );
1024 Gia_ManAppendCo( pNew, iLit2 );
1029 Vec_IntFree( vSupp1 );
1030 Vec_IntFree( vSupp2 );
1036 assert( Abc_NtkIsStrash(pNtk) );
1037 if ( iCo1 < 0 || iCo1 >= Abc_NtkCoNum(pNtk) )
1039 if ( iCo2 < 0 || iCo2 >= Abc_NtkCoNum(pNtk) )
1046 return (
int)(Value == 1);
1051 if ( Abc_NtkIsStrash(pNtk) )
1075 if ( Abc_NodeIsTravIdCurrent(pObj) )
1077 Abc_NodeSetTravIdCurrent(pObj);
1078 if ( Abc_ObjIsPi(pObj) )
1080 assert( Abc_ObjIsNode(pObj) || Abc_ObjIsBox(pObj) );
1098 Abc_NtkIncrementTravId( Abc_ObjNtk(pObj) );
1118 if ( Abc_ObjIsNode(pObj) )
1120 printf(
"Nodes with small support %d (out of %d)\n", Counter, Abc_NtkNodeNum(
p) );
1121 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk );
1140 int i, nTotalSupps = 0;
1144 nTotalSupps += Vec_PtrSize( vSupp );
1145 Vec_PtrFree( vSupp );
1147 printf(
"Total supports = %d.\n", nTotalSupps );
1167 if ( Abc_NodeIsTravIdCurrent( pNode ) )
1170 Abc_NodeSetTravIdCurrent( pNode );
1172 if ( Abc_ObjIsCi(pNode) || Abc_AigNodeIsConst(pNode) )
1174 assert( Abc_ObjIsNode( pNode ) );
1179 if ( Abc_AigNodeIsChoice( pNode ) )
1183 Vec_PtrPush( vNodes, pNode );
1203 assert( Abc_NtkIsStrash(pNtk) );
1205 Abc_NtkIncrementTravId( pNtk );
1207 vNodes = Vec_PtrAlloc( 100 );
1212 Abc_NodeSetTravIdCurrent( pNode );
1214 Vec_PtrPush( vNodes, pNode );
1220 if ( !Abc_NodeIsTravIdCurrent(pNode) )
1243 assert( Abc_NtkIsStrash(pNtk) );
1245 Abc_NtkIncrementTravId( pNtk );
1247 vNodes = Vec_PtrAlloc( 100 );
1251 if ( i < Abc_NtkCoNum(pNtk) - pNtk->
nBarBufs )
1254 Abc_NodeSetTravIdCurrent( pNode );
1256 assert( Abc_ObjIsLatch(Abc_ObjFanout0(pNode)) );
1257 Vec_PtrPush( vNodes, Abc_ObjFanout0(pNode) );
1262 if ( i >= Abc_NtkCoNum(pNtk) - pNtk->
nBarBufs )
1265 assert( Abc_ObjIsCo(pNode) );
1266 Abc_NodeSetTravIdCurrent( pNode );
1287 if ( Abc_NodeIsTravIdCurrent( pNode ) )
1290 Abc_NodeSetTravIdCurrent( pNode );
1292 if ( Abc_ObjIsCo(pNode) )
1294 assert( Abc_ObjIsNode(pNode) );
1296 Vec_VecPush( vLevels, pNode->
Level, pNode );
1321 Abc_NtkIncrementTravId( pNode->
pNtk );
1322 vLevels = Vec_VecAlloc( 100 );
1323 if ( Abc_ObjIsNode(pNode) )
1327 assert( Abc_ObjIsCi(pNode) );
1328 Abc_NodeSetTravIdCurrent( pNode );
1351 assert( !Abc_ObjIsNet(pNode) );
1353 if ( Abc_ObjIsCi(pNode) )
1354 return pNode->
Level;
1357 if ( Abc_NodeIsTravIdCurrent( pNode ) )
1358 return pNode->
Level;
1360 Abc_NodeSetTravIdCurrent( pNode );
1366 if ( pNode->
Level < (
unsigned)Level )
1367 pNode->
Level = Level;
1369 if ( Abc_ObjFaninNum(pNode) > 0 && !Abc_ObjIsBarBuf(pNode) )
1371 return pNode->
Level;
1389 assert( !Abc_ObjIsNet(pNode) );
1391 if ( Abc_ObjIsCo(pNode) )
1392 return pNode->
Level;
1395 if ( Abc_NodeIsTravIdCurrent( pNode ) )
1396 return pNode->
Level;
1398 Abc_NodeSetTravIdCurrent( pNode );
1404 if ( pNode->
Level < (
unsigned)Level )
1405 pNode->
Level = Level;
1407 if ( Abc_ObjFaninNum(pNode) > 0 && !Abc_ObjIsBarBuf(pNode) )
1409 return pNode->
Level;
1429 vLevels = Vec_VecStart( nLevels + 1 );
1433 Vec_VecPush( vLevels, pObj->
Level, pObj );
1462 Abc_NtkIncrementTravId( pNtk );
1468 if ( LevelsMax < (
int)pNode->
Level )
1469 LevelsMax = (int)pNode->
Level;
1476 Abc_Obj_t * pDriver = Abc_ObjFanin0(pNode);
1478 if ( LevelsMax < (
int)pDriver->
Level )
1479 LevelsMax = (int)pDriver->
Level;
1481 if ( i < pNtk->nBarBufs )
1482 Abc_ObjFanout0(Abc_ObjFanout0(pNode))->Level = pDriver->
Level;
1508 Abc_NtkIncrementTravId( pNtk );
1512 if ( LevelsMax < (
int)pNode->
Level )
1513 LevelsMax = (int)pNode->
Level;
1522 pNode->
Level = (int)(LevelMax - pNode->
Level + 1);
1543 assert( !Abc_ObjIsNet(pNode) );
1544 if ( Abc_ObjIsCi(pNode) || Abc_ObjIsBox(pNode) || (Abc_NtkIsStrash(pNode->
pNtk) && Abc_AigNodeIsConst(pNode)) )
1546 assert( Abc_ObjIsNode(pNode) );
1548 assert( !Abc_NodeIsTravIdPrevious(pNode) );
1550 if ( Abc_NodeIsTravIdCurrent(pNode) )
1552 fprintf( stdout,
"Network \"%s\" contains combinational loop!\n", Abc_NtkName(pNtk) );
1553 fprintf( stdout,
"Node \"%s\" is encountered twice on the following path to the COs:\n",
Abc_ObjName(pNode) );
1557 Abc_NodeSetTravIdCurrent( pNode );
1561 pFanin = Abc_ObjFanin0Ntk(pFanin);
1565 if ( Abc_NodeIsTravIdPrevious(pFanin) )
1575 if ( Abc_NtkIsStrash(pNode->
pNtk) && Abc_AigNodeIsChoice(pNode) )
1580 if ( Abc_NodeIsTravIdPrevious(pFanin) )
1587 fprintf( stdout,
" (choice of %s) -> ",
Abc_ObjName(pNode) );
1592 Abc_NodeSetTravIdPrevious( pNode );
1620 Abc_NtkIncrementTravId( pNtk );
1621 Abc_NtkIncrementTravId( pNtk );
1629 pNode = Abc_ObjFanin0Ntk(Abc_ObjFanin0(pNode));
1630 if ( Abc_NodeIsTravIdPrevious(pNode) )
1636 fprintf( stdout,
" CO \"%s\"\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1658 assert( !Abc_ObjIsNet(pNode) );
1659 if ( Abc_ObjIsPi(pNode) || Abc_ObjIsLatch(pNode) || Abc_ObjIsBlackbox(pNode) )
1661 assert( Abc_ObjIsNode(pNode) || Abc_ObjIsBox(pNode) );
1663 assert( !Abc_NodeIsTravIdPrevious(pNode) );
1665 if ( Abc_NodeIsTravIdCurrent(pNode) )
1667 fprintf( stdout,
"Network \"%s\" contains combinational loop!\n", Abc_NtkName(pNtk) );
1668 if ( Abc_ObjIsBox(pNode) )
1669 fprintf( stdout,
"Box \"%s\" is encountered twice on the following path to the COs:\n",
Abc_ObjName(pNode) );
1671 fprintf( stdout,
"Node \"%s\" is encountered twice on the following path to the COs:\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1675 Abc_NodeSetTravIdCurrent( pNode );
1679 if ( Abc_ObjIsBox(pNode) )
1680 pFanin = Abc_ObjFanin0(pFanin);
1681 pFanin = Abc_ObjFanin0Ntk(pFanin);
1682 if ( Abc_ObjIsBo(pFanin) )
1683 pFanin = Abc_ObjFanin0(pFanin);
1685 if ( Abc_ObjIsPi(pFanin) || Abc_ObjIsLatch(pFanin) || Abc_ObjIsBlackbox(pFanin) )
1687 assert( Abc_ObjIsNode(pFanin) || Abc_ObjIsBox(pFanin) );
1688 if ( Abc_NodeIsTravIdPrevious(pFanin) )
1694 fprintf( stdout,
" %s ->",
Abc_ObjName( Abc_ObjIsBox(pFanin) ? pFanin : Abc_ObjFanout0(pFanin) ) );
1698 assert( Abc_ObjIsNode(pNode) || Abc_ObjIsBox(pNode) );
1699 Abc_NodeSetTravIdPrevious( pNode );
1708 Abc_NtkIncrementTravId( pNtk );
1709 Abc_NtkIncrementTravId( pNtk );
1717 pNode = Abc_ObjFanin0Ntk(Abc_ObjFanin0(pNode));
1718 if ( Abc_ObjIsBo(pNode) )
1719 pNode = Abc_ObjFanin0(pNode);
1720 if ( Abc_NodeIsTravIdPrevious(pNode) )
1726 fprintf( stdout,
" PO \"%s\"\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1733 pNode = Abc_ObjFanin0Ntk(Abc_ObjFanin0(pNode));
1734 if ( Abc_ObjIsBo(pNode) )
1735 pNode = Abc_ObjFanin0(pNode);
1736 if ( Abc_NodeIsTravIdPrevious(pNode) )
1742 fprintf( stdout,
" PO \"%s\"\n",
Abc_ObjName(Abc_ObjFanout0(pNode)) );
1765 int Level1, Level2, Level, LevelE;
1767 if ( Abc_NodeIsTravIdCurrent( pNode ) )
1768 return (
int)(ABC_PTRINT_T)pNode->
pCopy;
1769 Abc_NodeSetTravIdCurrent( pNode );
1773 Level = 1 + Abc_MaxInt( Level1, Level2 );
1778 Level = Abc_MaxInt( Level, LevelE );
1780 Level = Abc_MinInt( Level, LevelE );
1806 int i, LevelMax, LevelCur;
1807 assert( Abc_NtkIsStrash(pNtk) );
1809 Abc_NtkIncrementTravId( pNtk );
1813 Abc_NodeSetTravIdCurrent( pObj );
1817 Abc_NodeSetTravIdCurrent( pObj );
1824 LevelMax = Abc_MaxInt( LevelMax, LevelCur );
1846 assert( Abc_NtkIsStrash(pNtk) );
1851 vLevels = Vec_PtrStart( LevelMax + 1 );
1854 ppHead = ((
Abc_Obj_t **)vLevels->pArray) + (int)(ABC_PTRINT_T)pNode->
pCopy;
1855 pNode->
pCopy = *ppHead;
1859 vNodes = Vec_PtrStart( Abc_NtkNodeNum(pNtk) );
1861 for ( ; pNode; pNode = pNode->
pCopy )
1862 Vec_PtrPush( vNodes, pNode );
1863 Vec_PtrFree( vLevels );
1880 if ( Abc_ObjIsCi(pObj) )
1882 if ( Abc_ObjFanoutNum(pObj) > 1 )
1903 assert( Abc_NtkIsStrash(pNtk) );
Vec_Ptr_t * Abc_NtkDfsWithBoxes(Abc_Ntk_t *pNtk)
void Abc_AigDfs_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
int Abc_NtkFunctionalIso(Abc_Ntk_t *pNtk, int iCo1, int iCo2, int fCommon)
int Abc_NtkPrintSubraphSizes(Abc_Ntk_t *pNtk)
int Abc_NtkIsAcyclic(Abc_Ntk_t *pNtk)
Vec_Vec_t * Abc_DfsLevelized(Abc_Obj_t *pNode, int fTfi)
int Abc_AigSetChoiceLevels(Abc_Ntk_t *pNtk)
Vec_Ptr_t * Abc_NtkDfsNets(Abc_Ntk_t *pNtk)
Vec_Ptr_t * Abc_NtkDfs2(Abc_Ntk_t *pNtk)
void Abc_NtkNodeSupportInt_rec(Abc_Obj_t *pNode, Vec_Int_t *vNodes)
Vec_Ptr_t * Abc_AigDfsMap(Abc_Ntk_t *pNtk)
Vec_Ptr_t * Abc_AigDfs(Abc_Ntk_t *pNtk, int fCollectAll, int fCollectCos)
Gia_Man_t * Abc_NtkFunctionalIsoGia(Abc_Ntk_t *pNtk, int iCo1, int iCo2, int fCommon)
ABC_NAMESPACE_IMPL_START void Abc_NtkDfs_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
DECLARATIONS ///.
Vec_Vec_t * Abc_NtkLevelize(Abc_Ntk_t *pNtk)
int Abc_ObjSugraphSize(Abc_Obj_t *pObj)
int Abc_NodeSetChoiceLevel_rec(Abc_Obj_t *pNode, int fMaximum)
int Abc_NtkLevelReverse(Abc_Ntk_t *pNtk)
void Abc_NtkDfsReverse_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
int Abc_NtkIsAcyclicWithBoxes_rec(Abc_Obj_t *pNode)
void Abc_NtkSupportSum(Abc_Ntk_t *pNtk)
int Abc_NtkFunctionalIsoGia_rec(Gia_Man_t *pNew, Abc_Obj_t *pNode)
void Abc_DfsLevelizedTfo_rec(Abc_Obj_t *pNode, Vec_Vec_t *vLevels)
Vec_Ptr_t * Abc_NtkDfsReverseNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
Vec_Ptr_t * Abc_NtkDfsReverse(Abc_Ntk_t *pNtk)
int Abc_NtkSuppSizeTest(Abc_Ntk_t *p)
Vec_Ptr_t * Abc_NtkDfsHie(Abc_Ntk_t *pNtk, int fCollectAll)
void Abc_NtkDfsReverseNodes_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
void Abc_NtkDfsNets_rec(Abc_Obj_t *pNet, Vec_Ptr_t *vNets)
void Abc_NtkDfs_iter(Vec_Ptr_t *vStack, Abc_Obj_t *pRoot, Vec_Ptr_t *vNodes)
int Abc_NtkIsAcyclic_rec(Abc_Obj_t *pNode)
void Abc_NtkDfsSeqReverse_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
Vec_Ptr_t * Abc_NtkDfsSeqReverse(Abc_Ntk_t *pNtk)
Vec_Ptr_t * Abc_NtkDfsReverseNodesContained(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
int Abc_NtkLevelReverse_rec(Abc_Obj_t *pNode)
Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
int Abc_NtkIsAcyclicWithBoxes(Abc_Ntk_t *pNtk)
int Abc_NtkLevel_rec(Abc_Obj_t *pNode)
Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
void Abc_NtkDfsWithBoxes_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
int Abc_NtkFunctionalIsoInt(Abc_Ntk_t *pNtk, int iCo1, int iCo2, int fCommon)
Vec_Ptr_t * Abc_AigGetLevelizedOrder(Abc_Ntk_t *pNtk, int fCollectCis)
Vec_Ptr_t * Abc_NtkDfsIterNodes(Abc_Ntk_t *pNtk, Vec_Ptr_t *vRoots)
int Abc_NtkIsDfsOrdered(Abc_Ntk_t *pNtk)
int Abc_ObjSuppSize_rec(Abc_Obj_t *pObj)
Vec_Ptr_t * Abc_NtkDfsNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
void Abc_NtkDfsSeq_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
Vec_Int_t * Abc_NtkNodeSupportInt(Abc_Ntk_t *pNtk, int iCo)
int Abc_NtkLevel(Abc_Ntk_t *pNtk)
int Abc_NtkLevelR(Abc_Ntk_t *pNtk)
int Abc_ObjSuppSize(Abc_Obj_t *pObj)
void Abc_NtkNodeSupport_rec(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
Vec_Ptr_t * Abc_NtkDfsIter(Abc_Ntk_t *pNtk, int fCollectAll)
Vec_Ptr_t * Abc_NtkSupport(Abc_Ntk_t *pNtk)
Vec_Ptr_t * Abc_NtkDfsSeq(Abc_Ntk_t *pNtk)
void Abc_NtkDfsHie_rec(Abc_Obj_t *pObj, Vec_Ptr_t *vNodes)
#define Abc_NtkForEachBarBuf(pNtk, pNode, i)
struct Abc_Obj_t_ Abc_Obj_t
#define Abc_NtkForEachCo(pNtk, pCo, i)
#define Abc_NtkForEachPo(pNtk, pPo, i)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
struct Abc_Ntk_t_ Abc_Ntk_t
ABC_DLL int Abc_NodeIsConst(Abc_Obj_t *pNode)
#define Abc_NtkForEachLatchInput(pNtk, pObj, i)
#define Abc_NtkForEachPi(pNtk, pPi, i)
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
ABC_DLL int Abc_AigLevel(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCi(pNtk, pCi, i)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
ABC_DLL void Abc_NtkCleanCopy(Abc_Ntk_t *pNtk)
ABC_DLL float Abc_NodeReadArrivalWorst(Abc_Obj_t *pNode)
#define Abc_NtkForEachLiPo(pNtk, pCo, i)
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachNode(pNtk, pNode, i)
ABC_DLL int Abc_NodeIsExorType(Abc_Obj_t *pNode)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
int Cec_ManVerifySimple(Gia_Man_t *p)
void Gia_ManStop(Gia_Man_t *p)
void Gia_ManHashStart(Gia_Man_t *p)
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
struct Gia_Man_t_ Gia_Man_t
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.