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 and CO.
  However it marks with the current TravId both CIs and COs.]
               
  SideEffects []

  SeeAlso     []

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

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




Function Synopsis [ Returns the DFS ordered array of logic nodes . ] Description [ Collects only the internal nodes leaving out CIs and CO . However it marks with the current TravId both CIs and COs . ]
void Abc_NtkDfsWithBoxes_rec( Abc_Obj_t * pNode, Vec_Ptr_t * vNodes )
{
    Abc_Obj_t * pFanin;
    int i;
    assert( !Abc_ObjIsNet(pNode) );
    if ( Abc_ObjIsBo(pNode) )
        pNode = Abc_ObjFanin0(pNode);
    if ( Abc_ObjIsPi(pNode) )
        return;
    assert( Abc_ObjIsNode( pNode ) || Abc_ObjIsBox( pNode ) );
    if ( Abc_NodeIsTravIdCurrent( pNode ) )
        return;
    Abc_NodeSetTravIdCurrent( pNode );
    Abc_ObjForEachFanin( pNode, pFanin, i )
    {
        if ( Abc_ObjIsBox(pNode) )
            pFanin = Abc_ObjFanin0(pFanin);
        assert( Abc_ObjIsNet(pFanin) );
        Abc_NtkDfsWithBoxes_rec( Abc_ObjFanin0Ntk(pFanin), vNodes );
    }
    Vec_PtrPush( vNodes, pNode );
}
void Abc_NtkDfsWithBoxes_rec ( Abc_Obj_t * pNode , Vec_Ptr_t * vNodes ) { Abc_Obj_t * pFanin ; int i ; assert ( ! Abc_ObjIsNet ( pNode ) ) ; if ( Abc_ObjIsBo ( pNode ) ) pNode = Abc_ObjFanin0 ( pNode ) ; if ( Abc_ObjIsPi ( pNode ) ) return ; assert ( Abc_ObjIsNode ( pNode ) || Abc_ObjIsBox ( pNode ) ) ; if ( Abc_NodeIsTravIdCurrent ( pNode ) ) return ; Abc_NodeSetTravIdCurrent ( pNode ) ; Abc_ObjForEachFanin ( pNode , pFanin , i ) { if ( Abc_ObjIsBox ( pNode ) ) pFanin = Abc_ObjFanin0 ( pFanin ) ; assert ( Abc_ObjIsNet ( pFanin ) ) ; Abc_NtkDfsWithBoxes_rec ( Abc_ObjFanin0Ntk ( pFanin ) , vNodes ) ; } Vec_PtrPush ( vNodes , pNode ) ; }
Function
Synopsis    [Returns the DFS ordered array of logic nodes.]
Function Synopsis [ Returns the DFS ordered array of logic nodes . ]