aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-05-02 16:10:52 -0700
committermichael-west <michael.west@ettus.com>2019-05-21 21:37:19 -0700
commit62e6e2899d6bc2c709473ffe059e6ff786a813f0 (patch)
treece92073f06ec9cb406f94559b3c68e5444d5637f /host
parent32ececbf36508a374d471ea370897b1c17cf1294 (diff)
downloaduhd-62e6e2899d6bc2c709473ffe059e6ff786a813f0.tar.gz
uhd-62e6e2899d6bc2c709473ffe059e6ff786a813f0.tar.bz2
uhd-62e6e2899d6bc2c709473ffe059e6ff786a813f0.zip
rfnoc: tick_node: Search all nodes for tick rates
The tick_node was trying to find the current tick rate by only querying active blocks (i.e., blocks that were flagged active-streaming). However, this is not necessary since we require all blocks to run at the same tick rate. In theory, querying active-only ports should be fine, but due to some idiosyncrasies in our current graph code, connecting a single streamer to channel 1 (out of 0, 1) would try and get the info from the wrong port. This is not a fix to the graph code, but the change to tick_node is also appropriate and is sufficient to fix the "late packets on channel 1" issue. This issue would manifest when sending timed packats to channel 1 in a single-channel streamer. The problem is that it wouldn't be able to read the correct tick rate.
Diffstat (limited to 'host')
-rw-r--r--host/lib/rfnoc/tick_node_ctrl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/host/lib/rfnoc/tick_node_ctrl.cpp b/host/lib/rfnoc/tick_node_ctrl.cpp
index 84edd92db..40131e72f 100644
--- a/host/lib/rfnoc/tick_node_ctrl.cpp
+++ b/host/lib/rfnoc/tick_node_ctrl.cpp
@@ -26,12 +26,14 @@ double tick_node_ctrl::get_tick_rate(
// This will fail if we get different values.
std::set<node_ctrl_base::sptr> explored_nodes(_explored_nodes);
explored_nodes.insert(shared_from_this());
- // Here, we need all up- and downstream nodes
+ // Here, we need all up- and downstream nodes. Note that we have the rule
+ // that there can only be one tick rate in all of the nodes, that means we
+ // don't only search active neighbouring nodes.
std::vector<sptr> neighbouring_tick_nodes =
- find_downstream_node<tick_node_ctrl>(true);
+ find_downstream_node<tick_node_ctrl>(false);
{
std::vector<sptr> upstream_neighbouring_tick_nodes =
- find_upstream_node<tick_node_ctrl>(true);
+ find_upstream_node<tick_node_ctrl>(false);
neighbouring_tick_nodes.insert(neighbouring_tick_nodes.end(),
upstream_neighbouring_tick_nodes.begin(),
upstream_neighbouring_tick_nodes.end());