aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-04-10 14:44:24 -0700
committerMartin Braun <martin.braun@ettus.com>2017-04-13 15:30:13 -0700
commitfae9468c3a2c00c4390a50679b5ae176c5f9a2a5 (patch)
tree5e880c71a186dc501b1a1c83b62a8ee7dbbcbde7 /host/lib/rfnoc
parent75fd281d270d41a6db4010afbdf0be1aaf946039 (diff)
downloaduhd-fae9468c3a2c00c4390a50679b5ae176c5f9a2a5.tar.gz
uhd-fae9468c3a2c00c4390a50679b5ae176c5f9a2a5.tar.bz2
uhd-fae9468c3a2c00c4390a50679b5ae176c5f9a2a5.zip
rfnoc: Update DDC and DUC command tick rate
Update happens when the sampling rate is queried, which needs revisiting, but happens to occur at the correct time in the sequence.
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/ddc_block_ctrl_impl.cpp9
-rw-r--r--host/lib/rfnoc/duc_block_ctrl_impl.cpp9
2 files changed, 18 insertions, 0 deletions
diff --git a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp
index fb70b6f45..8c8b07afd 100644
--- a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp
+++ b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp
@@ -130,6 +130,15 @@ public:
}
}
}
+
+ // Wait, what? If this seems out of place to you, you're right. However,
+ // we need a function call that is called when the graph is complete,
+ // but streaming is not yet set up.
+ if (_tree->exists("tick_rate")) {
+ const double tick_rate = _tree->access<double>("tick_rate").get();
+ set_command_tick_rate(tick_rate, port);
+ }
+
if (not (_rx_streamer_active.count(port) and _rx_streamer_active.at(port))) {
return RATE_UNDEFINED;
}
diff --git a/host/lib/rfnoc/duc_block_ctrl_impl.cpp b/host/lib/rfnoc/duc_block_ctrl_impl.cpp
index 0340ba0d6..d755bf519 100644
--- a/host/lib/rfnoc/duc_block_ctrl_impl.cpp
+++ b/host/lib/rfnoc/duc_block_ctrl_impl.cpp
@@ -113,6 +113,15 @@ public:
double get_input_samp_rate(size_t port=ANY_PORT)
{
port = (port == ANY_PORT) ? 0 : port;
+
+ // Wait, what? If this seems out of place to you, you're right. However,
+ // we need a function call that is called when the graph is complete,
+ // but streaming is not yet set up.
+ if (_tree->exists("tick_rate")) {
+ const double tick_rate = _tree->access<double>("tick_rate").get();
+ set_command_tick_rate(tick_rate, port);
+ }
+
if (not (_tx_streamer_active.count(port) and _tx_streamer_active.at(port))) {
return RATE_UNDEFINED;
}