abc/src/base/abc/abcDfs.c
/**Function*************************************************************

  Synopsis    [Returns the DFS ordered array of logic nodes.]

  Description [Collects only the internal nodes, leaving out CIs/COs.
  However it marks both CIs and COs with the current TravId.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Returns the DFS ordered array of logic nodes.]

Description [Collects only the internal nodes, leaving out CIs/COs.
However it marks both CIs and COs with the current TravId.]




Function Synopsis [ Returns the DFS ordered array of logic nodes . ] Description [ Collects only the internal nodes leaving out CIs / COs . However it marks both CIs and COs with the current TravId . ]
Vec_Ptr_t * Abc_AigDfsMap( Abc_Ntk_t * pNtk )
{
    Vec_Ptr_t * vNodes;
    Abc_Obj_t * pNode;
    int i;
    assert( Abc_NtkIsStrash(pNtk) );
    Abc_NtkIncrementTravId( pNtk );
    vNodes = Vec_PtrAlloc( 100 );
    Abc_NtkForEachCo( pNtk, pNode, i )
    {
        if ( i < Abc_NtkCoNum(pNtk) - pNtk->nBarBufs )
            continue;
        Abc_AigDfs_rec( Abc_ObjFanin0(pNode), vNodes );
        Abc_NodeSetTravIdCurrent( pNode );
        assert( Abc_ObjIsLatch(Abc_ObjFanout0(pNode)) );
        Vec_PtrPush( vNodes, Abc_ObjFanout0(pNode) );
    }
    Abc_NtkForEachCo( pNtk, pNode, i )
    {
        if ( i >= Abc_NtkCoNum(pNtk) - pNtk->nBarBufs )
            break;
        Abc_AigDfs_rec( Abc_ObjFanin0(pNode), vNodes );
        assert( Abc_ObjIsCo(pNode) );
        Abc_NodeSetTravIdCurrent( pNode );
    }
    return vNodes;
}
Vec_Ptr_t * Abc_AigDfsMap ( Abc_Ntk_t * pNtk ) { Vec_Ptr_t * vNodes ; Abc_Obj_t * pNode ; int i ; assert ( Abc_NtkIsStrash ( pNtk ) ) ; Abc_NtkIncrementTravId ( pNtk ) ; vNodes = Vec_PtrAlloc ( 100 ) ; Abc_NtkForEachCo ( pNtk , pNode , i ) { if ( i < Abc_NtkCoNum ( pNtk ) - pNtk -> nBarBufs ) continue ; Abc_AigDfs_rec ( Abc_ObjFanin0 ( pNode ) , vNodes ) ; Abc_NodeSetTravIdCurrent ( pNode ) ; assert ( Abc_ObjIsLatch ( Abc_ObjFanout0 ( pNode ) ) ) ; Vec_PtrPush ( vNodes , Abc_ObjFanout0 ( pNode ) ) ; } Abc_NtkForEachCo ( pNtk , pNode , i ) { if ( i >= Abc_NtkCoNum ( pNtk ) - pNtk -> nBarBufs ) break ; Abc_AigDfs_rec ( Abc_ObjFanin0 ( pNode ) , vNodes ) ; assert ( Abc_ObjIsCo ( pNode ) ) ; Abc_NodeSetTravIdCurrent ( pNode ) ; } return vNodes ; }
Function
Synopsis    [Returns the DFS ordered array of logic nodes.]
Function Synopsis [ Returns the DFS ordered array of logic nodes . ]
// set the traversal ID // start the array of nodes // collect cones of barbufs // collect latch as a placeholder // collect nodes of real POs