diff options
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r-- | host/lib/rfnoc/block_ctrl_base.cpp | 5 | ||||
-rw-r--r-- | host/lib/rfnoc/ddc_block_ctrl_impl.cpp | 9 | ||||
-rw-r--r-- | host/lib/rfnoc/duc_block_ctrl_impl.cpp | 9 | ||||
-rw-r--r-- | host/lib/rfnoc/radio_ctrl_impl.cpp | 1 |
4 files changed, 24 insertions, 0 deletions
diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp index efd723fcb..e9d6c0030 100644 --- a/host/lib/rfnoc/block_ctrl_base.cpp +++ b/host/lib/rfnoc/block_ctrl_base.cpp @@ -354,6 +354,7 @@ void block_ctrl_base::set_command_time( } iface_sptr->set_time(time_spec); + _set_command_time(time_spec, port); } time_spec_t block_ctrl_base::get_command_time( @@ -581,4 +582,8 @@ void block_ctrl_base::_clear(const size_t port) sr_write(SR_CLEAR_RX_FC, 0x00C1EA12, port); // 'CLEAR', but we can write anything, really } +void block_ctrl_base::_set_command_time(const time_spec_t & /*time_spec*/, const size_t /*port*/) +{ + UHD_RFNOC_BLOCK_TRACE() << "block_ctrl_base::_set_command_time() "; +} // vim: sw=4 et: diff --git a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp index 830664e5c..b0b510cde 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 07279ed47..d0742a6d0 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; } diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp index 1caa9bb99..5504efbb0 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.cpp +++ b/host/lib/rfnoc/radio_ctrl_impl.cpp @@ -161,6 +161,7 @@ double radio_ctrl_impl::set_rate(double rate) _tick_rate = rate; _time64->set_tick_rate(_tick_rate); _time64->self_test(); + set_command_tick_rate(rate); return _tick_rate; } |