diff options
author | michael-west <michael.west@ettus.com> | 2018-12-18 17:35:46 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2018-12-19 18:44:25 -0800 |
commit | 20b71a5fd76f1e183cc33f7f59b70beb99ca7e8e (patch) | |
tree | 0bd458ed1bb85f7e43094ac9c0b68c881200a940 /host/lib/rfnoc | |
parent | bc71cd5c3961a214b2dc771ad0074d305026a2a8 (diff) | |
download | uhd-20b71a5fd76f1e183cc33f7f59b70beb99ca7e8e.tar.gz uhd-20b71a5fd76f1e183cc33f7f59b70beb99ca7e8e.tar.bz2 uhd-20b71a5fd76f1e183cc33f7f59b70beb99ca7e8e.zip |
RFNoC: Fix graph traversal
- Allows different TX sample rates on separate channels
- Prevents stream commands from being issued on wrong ports
- Prevents some receive timeout errors
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/ddc_block_ctrl_impl.cpp | 9 | ||||
-rw-r--r-- | host/lib/rfnoc/duc_block_ctrl_impl.cpp | 6 | ||||
-rw-r--r-- | host/lib/rfnoc/source_block_ctrl_base.cpp | 15 |
3 files changed, 16 insertions, 14 deletions
diff --git a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp index b70ae8959..7ea81e255 100644 --- a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp +++ b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp @@ -186,14 +186,7 @@ public: stream_cmd.num_samps *= decimation; } - source_node_ctrl::sptr this_upstream_block_ctrl = - boost::dynamic_pointer_cast<source_node_ctrl>(list_upstream_nodes().at(chan).lock()); - if (this_upstream_block_ctrl) { - this_upstream_block_ctrl->issue_stream_cmd( - stream_cmd, - get_upstream_port(chan) - ); - } + source_block_ctrl_base::issue_stream_cmd(stream_cmd, chan); } private: diff --git a/host/lib/rfnoc/duc_block_ctrl_impl.cpp b/host/lib/rfnoc/duc_block_ctrl_impl.cpp index cc9d30361..cf22ab7da 100644 --- a/host/lib/rfnoc/duc_block_ctrl_impl.cpp +++ b/host/lib/rfnoc/duc_block_ctrl_impl.cpp @@ -173,11 +173,7 @@ public: stream_cmd.num_samps *= interpolation; } - for(const node_ctrl_base::node_map_pair_t upstream_node: list_upstream_nodes()) { - source_node_ctrl::sptr this_upstream_block_ctrl = - boost::dynamic_pointer_cast<source_node_ctrl>(upstream_node.second.lock()); - this_upstream_block_ctrl->issue_stream_cmd(stream_cmd, chan); - } + source_block_ctrl_base::issue_stream_cmd(stream_cmd, chan); } private: diff --git a/host/lib/rfnoc/source_block_ctrl_base.cpp b/host/lib/rfnoc/source_block_ctrl_base.cpp index 0f1c31e4f..364aa01c6 100644 --- a/host/lib/rfnoc/source_block_ctrl_base.cpp +++ b/host/lib/rfnoc/source_block_ctrl_base.cpp @@ -29,9 +29,22 @@ void source_block_ctrl_base::issue_stream_cmd( } for(const node_ctrl_base::node_map_pair_t upstream_node: _upstream_nodes) { + // FIXME: Need proper mapping from input port to output port + // The code below assumes the input port and output port are the same + // if the number of upstream and downstream connections are the same. + // The stream command is limited to only that port to prevent issuing + // it on the wrong block and port. + if (_upstream_nodes.size() == _downstream_nodes.size() and + upstream_node.first != chan) + { + continue; + } source_node_ctrl::sptr this_upstream_block_ctrl = boost::dynamic_pointer_cast<source_node_ctrl>(upstream_node.second.lock()); - this_upstream_block_ctrl->issue_stream_cmd(stream_cmd, chan); + if (this_upstream_block_ctrl) + { + this_upstream_block_ctrl->issue_stream_cmd(stream_cmd, get_upstream_port(chan)); + } } } |