diff options
| author | Brent Stapleton <brent.stapleton@ettus.com> | 2019-06-03 14:07:58 -0700 |
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:23 -0800 |
| commit | 03023905360dd2c9c17ba70ff1543b0c70f98ad4 (patch) | |
| tree | b907adaf95910f93608f35ce99c809bc81d3e688 /host/include | |
| parent | debe5189364b0684500b7ce4cd8f45894a3e54e7 (diff) | |
| download | uhd-03023905360dd2c9c17ba70ff1543b0c70f98ad4.tar.gz uhd-03023905360dd2c9c17ba70ff1543b0c70f98ad4.tar.bz2 uhd-03023905360dd2c9c17ba70ff1543b0c70f98ad4.zip | |
rfnoc: enumerate and construct block controllers, enable connect()
During construction of the rfnoc_graph, enumerate all of the connected
blocks, construct their controllers, and store them in the graph.
Diffstat (limited to 'host/include')
| -rw-r--r-- | host/include/uhd/rfnoc_graph.hpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/host/include/uhd/rfnoc_graph.hpp b/host/include/uhd/rfnoc_graph.hpp index a0a9bf907..55563c6fc 100644 --- a/host/include/uhd/rfnoc_graph.hpp +++ b/host/include/uhd/rfnoc_graph.hpp @@ -36,9 +36,16 @@ public: */ using sptr = std::shared_ptr<rfnoc_graph>; - virtual ~rfnoc_graph() {} + + //! Stuct to store information about which blocks are actually stored at a given port on the crossbar + struct block_xbar_info { + size_t xbar_port; + noc_block_base::noc_id_t noc_id; + size_t inst_num; + }; + /****************************************** * Factory ******************************************/ @@ -113,7 +120,7 @@ public: * \param block_id Canonical block name (e.g. "0/FFT#1"). * \note this access is not thread safe if peformed during block enumeration */ - noc_block_base::sptr get_block(const block_id_t& block_id) const; + virtual noc_block_base::sptr get_block(const block_id_t& block_id) const = 0; /*! Same as get_block(), but with a type cast. * @@ -161,11 +168,11 @@ public: * \throws connect_disallowed_on_dst * if the destination port is statically connected to a *different* block */ - void connect(const block_id_t& src_blk, + virtual void connect(const block_id_t& src_blk, size_t src_port, const block_id_t& dst_blk, size_t dst_port, - bool skip_property_propagation = false); + bool skip_property_propagation = false) = 0; /*! Connect TX streamer to an input of an NoC block * @@ -177,10 +184,10 @@ public: * \throws connect_disallowed_on_dst * if the destination port is statically connected to a *different* block */ - void connect(uhd::tx_streamer& streamer, + virtual void connect(uhd::tx_streamer& streamer, size_t strm_port, const block_id_t& dst_blk, - size_t dst_port); + size_t dst_port) = 0; /*! Connect RX streamer to an output of an NoC block * @@ -192,10 +199,10 @@ public: * \throws connect_disallowed_on_src * if the source port is statically connected to a *different* block */ - void connect(const block_id_t& src_blk, + virtual void connect(const block_id_t& src_blk, size_t src_port, uhd::rx_streamer& streamer, - size_t strm_port); + size_t strm_port) = 0; /*! Enumerate all the connections in the graph * |
