diff options
Diffstat (limited to 'host/lib/include/uhdlib')
| -rw-r--r-- | host/lib/include/uhdlib/rfnoc/graph.hpp | 62 | 
1 files changed, 3 insertions, 59 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/graph.hpp b/host/lib/include/uhdlib/rfnoc/graph.hpp index ec6309bd0..fdb4525d1 100644 --- a/host/lib/include/uhdlib/rfnoc/graph.hpp +++ b/host/lib/include/uhdlib/rfnoc/graph.hpp @@ -7,6 +7,7 @@  #ifndef INCLUDED_LIBUHD_GRAPH_HPP  #define INCLUDED_LIBUHD_GRAPH_HPP +#include <uhd/rfnoc/graph_edge.hpp>  #include <uhd/rfnoc/actions.hpp>  #include <uhd/rfnoc/node.hpp>  #include <boost/graph/adjacency_list.hpp> @@ -14,64 +15,7 @@  #include <memory>  #include <deque> -namespace uhd { namespace rfnoc { - -/*! A container that holds information about a graph edge - */ -struct graph_edge_t -{ -    enum edge_t { -        STATIC, ///< A static connection between two blocks in the FPGA -        DYNAMIC, ///< A user (dynamic) connection between two blocks in the FPGA -        RX_STREAM, ///< A connection from an FPGA block to a software RX streamer -        TX_STREAM ///< A connection from a software TX streamer and an FPGA block -    }; - -    graph_edge_t() = default; - -    graph_edge_t(const size_t src_port_, -        const size_t dst_port_, -        const edge_t edge_, -        const bool ppa) -        : src_port(src_port_) -        , dst_port(dst_port_) -        , edge(edge_) -        , property_propagation_active(ppa) -    { -    } - -    //! The block ID of the source block for this edge -    std::string src_blockid; -    //! The port number of the source block for this edge -    size_t src_port = 0; -    //! The block ID of the destination block for this edge -    std::string dst_blockid; -    //! The port number of the destination block for this edge -    size_t dst_port = 0; -    //! The type of edge -    edge_t edge = DYNAMIC; -    //! When true, the framework will use this edge for property propagation -    bool property_propagation_active = true; - -    bool operator==(const graph_edge_t& rhs) const -    { -        return std::tie(src_blockid, -                   src_port, -                   dst_blockid, -                   dst_port, -                   edge, -                   property_propagation_active) -               == std::tie(rhs.src_blockid, -                      rhs.src_port, -                      rhs.dst_blockid, -                      rhs.dst_port, -                      rhs.edge, -                      rhs.property_propagation_active); -    } -}; - - -namespace detail { +namespace uhd { namespace rfnoc { namespace detail {  //! Container for the logical graph within an uhd::rfnoc_graph  class graph_t @@ -80,7 +24,7 @@ public:      using uptr = std::unique_ptr<graph_t>;      //! A shorthand for a pointer to a node      using node_ref_t = uhd::rfnoc::node_t*; - +    //! Shorthand to existing graph_edge_t      using graph_edge_t = uhd::rfnoc::graph_edge_t;      /*! Add a connection to the graph  | 
