aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-01-08 09:33:36 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-03-04 08:07:26 -0600
commit107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 (patch)
treefdeaad56030a02948377c45838dab97beb7a5c84 /host/lib/rfnoc
parent7d5e48032baa62cbe7467833b9e057900602f4b9 (diff)
downloaduhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.gz
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.bz2
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.zip
host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/chdr_ctrl_endpoint.cpp8
-rw-r--r--host/lib/rfnoc/chdr_packet_writer.cpp32
-rw-r--r--host/lib/rfnoc/chdr_types.cpp6
-rw-r--r--host/lib/rfnoc/ctrlport_endpoint.cpp42
-rw-r--r--host/lib/rfnoc/ddc_block_control.cpp18
-rw-r--r--host/lib/rfnoc/duc_block_control.cpp16
-rw-r--r--host/lib/rfnoc/fft_block_control.cpp20
-rw-r--r--host/lib/rfnoc/fir_filter_block_control.cpp6
-rw-r--r--host/lib/rfnoc/fosphor_block_control.cpp58
-rw-r--r--host/lib/rfnoc/graph_stream_manager.cpp38
-rw-r--r--host/lib/rfnoc/keep_one_in_n_block_control.cpp10
-rw-r--r--host/lib/rfnoc/link_stream_manager.cpp39
-rw-r--r--host/lib/rfnoc/mgmt_portal.cpp45
-rw-r--r--host/lib/rfnoc/moving_average_block_control.cpp8
-rw-r--r--host/lib/rfnoc/null_block_control.cpp19
-rw-r--r--host/lib/rfnoc/register_iface_holder.cpp32
-rw-r--r--host/lib/rfnoc/replay_block_control.cpp47
-rw-r--r--host/lib/rfnoc/rfnoc_graph.cpp46
-rw-r--r--host/lib/rfnoc/siggen_block_control.cpp24
-rw-r--r--host/lib/rfnoc/switchboard_block_control.cpp2
-rw-r--r--host/lib/rfnoc/vector_iir_block_control.cpp14
-rw-r--r--host/lib/rfnoc/window_block_control.cpp6
22 files changed, 270 insertions, 266 deletions
diff --git a/host/lib/rfnoc/chdr_ctrl_endpoint.cpp b/host/lib/rfnoc/chdr_ctrl_endpoint.cpp
index 8fe6a8856..592d3dde8 100644
--- a/host/lib/rfnoc/chdr_ctrl_endpoint.cpp
+++ b/host/lib/rfnoc/chdr_ctrl_endpoint.cpp
@@ -44,7 +44,7 @@ public:
% thread_name % _my_epid);
}
- virtual ~chdr_ctrl_endpoint_impl()
+ ~chdr_ctrl_endpoint_impl() override
{
UHD_SAFE_CALL(
// Interrupt buffer updater loop
@@ -67,12 +67,12 @@ public:
_endpoint_map.clear(););
}
- virtual ctrlport_endpoint::sptr get_ctrlport_ep(sep_id_t dst_epid,
+ ctrlport_endpoint::sptr get_ctrlport_ep(sep_id_t dst_epid,
uint16_t dst_port,
size_t buff_capacity,
size_t max_outstanding_async_msgs,
const clock_iface& client_clk,
- const clock_iface& timebase_clk)
+ const clock_iface& timebase_clk) override
{
std::lock_guard<std::mutex> lock(_mutex);
@@ -111,7 +111,7 @@ public:
}
}
- virtual size_t get_num_drops() const
+ size_t get_num_drops() const override
{
return _num_drops;
}
diff --git a/host/lib/rfnoc/chdr_packet_writer.cpp b/host/lib/rfnoc/chdr_packet_writer.cpp
index c58ffd932..95bf5c5d2 100644
--- a/host/lib/rfnoc/chdr_packet_writer.cpp
+++ b/host/lib/rfnoc/chdr_packet_writer.cpp
@@ -25,16 +25,16 @@ class chdr_packet_impl : public chdr_packet_writer
public:
chdr_packet_impl() = delete;
chdr_packet_impl(size_t mtu_bytes) : _mtu_bytes(mtu_bytes) {}
- ~chdr_packet_impl() = default;
+ ~chdr_packet_impl() override = default;
- virtual void refresh(const void* pkt_buff) const
+ void refresh(const void* pkt_buff) const override
{
assert(pkt_buff);
_pkt_buff = const_cast<uint64_t*>(reinterpret_cast<const uint64_t*>(pkt_buff));
_mdata_offset = _compute_mdata_offset(get_chdr_header());
}
- virtual void refresh(void* pkt_buff, chdr_header& header, uint64_t timestamp = 0)
+ void refresh(void* pkt_buff, chdr_header& header, uint64_t timestamp = 0) override
{
assert(pkt_buff);
_pkt_buff = reinterpret_cast<uint64_t*>(pkt_buff);
@@ -45,7 +45,7 @@ public:
_mdata_offset = _compute_mdata_offset(get_chdr_header());
}
- virtual void update_payload_size(size_t payload_size_bytes)
+ void update_payload_size(size_t payload_size_bytes) override
{
chdr_header header = get_chdr_header();
header.set_length(((_mdata_offset + header.get_num_mdata()) * chdr_w_bytes)
@@ -53,23 +53,23 @@ public:
_pkt_buff[0] = u64_from_host(header);
}
- virtual endianness_t get_byte_order() const
+ endianness_t get_byte_order() const override
{
return endianness;
}
- virtual size_t get_mtu_bytes() const
+ size_t get_mtu_bytes() const override
{
return _mtu_bytes;
}
- virtual chdr_header get_chdr_header() const
+ chdr_header get_chdr_header() const override
{
assert(_pkt_buff);
return std::move(chdr_header(u64_to_host(_pkt_buff[0])));
}
- virtual boost::optional<uint64_t> get_timestamp() const
+ boost::optional<uint64_t> get_timestamp() const override
{
if (_has_timestamp(get_chdr_header())) {
// In a unit64_t buffer, the timestamp is always immediately after the header
@@ -80,43 +80,43 @@ public:
}
}
- virtual size_t get_mdata_size() const
+ size_t get_mdata_size() const override
{
return get_chdr_header().get_num_mdata() * chdr_w_bytes;
}
- virtual const void* get_mdata_const_ptr() const
+ const void* get_mdata_const_ptr() const override
{
return const_cast<void*>(
const_cast<chdr_packet_impl<chdr_w, endianness>*>(this)->get_mdata_ptr());
}
- virtual void* get_mdata_ptr()
+ void* get_mdata_ptr() override
{
return reinterpret_cast<void*>(_pkt_buff + (chdr_w_stride * _mdata_offset));
}
- virtual size_t get_payload_size() const
+ size_t get_payload_size() const override
{
return get_chdr_header().get_length() - get_mdata_size()
- (chdr_w_bytes * _mdata_offset);
}
- virtual const void* get_payload_const_ptr() const
+ const void* get_payload_const_ptr() const override
{
return const_cast<void*>(
const_cast<chdr_packet_impl<chdr_w, endianness>*>(this)->get_payload_ptr());
}
- virtual void* get_payload_ptr()
+ void* get_payload_ptr() override
{
return reinterpret_cast<void*>(
_pkt_buff
+ (chdr_w_stride * (_mdata_offset + get_chdr_header().get_num_mdata())));
}
- virtual size_t calculate_payload_offset(
- const packet_type_t pkt_type, const uint8_t num_mdata = 0) const
+ size_t calculate_payload_offset(
+ const packet_type_t pkt_type, const uint8_t num_mdata = 0) const override
{
chdr_header header;
header.set_pkt_type(pkt_type);
diff --git a/host/lib/rfnoc/chdr_types.cpp b/host/lib/rfnoc/chdr_types.cpp
index 950bf39f2..7975a0228 100644
--- a/host/lib/rfnoc/chdr_types.cpp
+++ b/host/lib/rfnoc/chdr_types.cpp
@@ -48,7 +48,7 @@ size_t ctrl_payload::serialize(uint64_t* buff,
{
// Ctrl Packet Payload can't have more than 15 data -> 8 CHDR_W (RFNoC Spec.
// Section 2.2.3)
- UHD_ASSERT_THROW((data_vtr.size() > 0 && data_vtr.size() < 16));
+ UHD_ASSERT_THROW((!data_vtr.empty() && data_vtr.size() < 16));
UHD_ASSERT_THROW(get_length() * sizeof(uint64_t) <= max_size_bytes);
size_t ptr = 0;
@@ -108,7 +108,7 @@ void ctrl_payload::deserialize(const uint64_t* buff,
// Read control header
uint64_t ctrl_header = conv_byte_order(buff[ptr++]);
data_vtr.resize(get_field_u64<size_t>(ctrl_header, NUM_DATA_OFFSET, NUM_DATA_WIDTH));
- UHD_ASSERT_THROW((data_vtr.size() > 0 && data_vtr.size() < 16));
+ UHD_ASSERT_THROW((!data_vtr.empty() && data_vtr.size() < 16));
dst_port = get_field_u64<uint16_t>(ctrl_header, DST_PORT_OFFSET, DST_PORT_WIDTH);
src_port = get_field_u64<uint16_t>(ctrl_header, SRC_PORT_OFFSET, SRC_PORT_WIDTH);
seq_num = get_field_u64<uint8_t>(ctrl_header, SEQ_NUM_OFFSET, SEQ_NUM_WIDTH);
@@ -124,7 +124,7 @@ void ctrl_payload::deserialize(const uint64_t* buff,
// Read control operation word
uint64_t op_word = conv_byte_order(buff[ptr++]);
- if (data_vtr.size() > 0) {
+ if (!data_vtr.empty()) {
data_vtr[0] = get_field_u64<uint32_t>(op_word, HI_DATA_OFFSET, 32);
}
address = get_field_u64<uint32_t>(op_word, ADDRESS_OFFSET, ADDRESS_WIDTH);
diff --git a/host/lib/rfnoc/ctrlport_endpoint.cpp b/host/lib/rfnoc/ctrlport_endpoint.cpp
index 607cc6f72..c544a3d4e 100644
--- a/host/lib/rfnoc/ctrlport_endpoint.cpp
+++ b/host/lib/rfnoc/ctrlport_endpoint.cpp
@@ -57,12 +57,12 @@ public:
{
}
- virtual ~ctrlport_endpoint_impl() = default;
+ ~ctrlport_endpoint_impl() override = default;
- virtual void poke32(uint32_t addr,
+ void poke32(uint32_t addr,
uint32_t data,
uhd::time_spec_t timestamp = uhd::time_spec_t::ASAP,
- bool ack = false)
+ bool ack = false) override
{
// Send request
auto request = send_request_packet(OP_WRITE, addr, {data}, timestamp);
@@ -72,10 +72,10 @@ public:
}
}
- virtual void multi_poke32(const std::vector<uint32_t> addrs,
+ void multi_poke32(const std::vector<uint32_t> addrs,
const std::vector<uint32_t> data,
uhd::time_spec_t timestamp = uhd::time_spec_t::ASAP,
- bool ack = false)
+ bool ack = false) override
{
if (addrs.size() != data.size()) {
throw uhd::value_error("addrs and data vectors must be of the same length");
@@ -88,10 +88,10 @@ public:
}
}
- virtual void block_poke32(uint32_t first_addr,
+ void block_poke32(uint32_t first_addr,
const std::vector<uint32_t> data,
uhd::time_spec_t timestamp = uhd::time_spec_t::ASAP,
- bool ack = false)
+ bool ack = false) override
{
for (size_t i = 0; i < data.size(); i++) {
poke32(first_addr + (i * sizeof(uint32_t)),
@@ -110,8 +110,8 @@ public:
*/
}
- virtual uint32_t peek32(
- uint32_t addr, uhd::time_spec_t timestamp = uhd::time_spec_t::ASAP)
+ uint32_t peek32(
+ uint32_t addr, uhd::time_spec_t timestamp = uhd::time_spec_t::ASAP) override
{
// Send request
auto request = send_request_packet(OP_READ, addr, {uint32_t(0)}, timestamp);
@@ -121,9 +121,9 @@ public:
return response.data_vtr[0];
}
- virtual std::vector<uint32_t> block_peek32(uint32_t first_addr,
+ std::vector<uint32_t> block_peek32(uint32_t first_addr,
size_t length,
- uhd::time_spec_t timestamp = uhd::time_spec_t::ASAP)
+ uhd::time_spec_t timestamp = uhd::time_spec_t::ASAP) override
{
std::vector<uint32_t> values;
for (size_t i = 0; i < length; i++) {
@@ -145,12 +145,12 @@ public:
*/
}
- virtual void poll32(uint32_t addr,
+ void poll32(uint32_t addr,
uint32_t data,
uint32_t mask,
uhd::time_spec_t timeout,
uhd::time_spec_t timestamp = uhd::time_spec_t::ASAP,
- bool ack = false)
+ bool ack = false) override
{
// TODO: Uncomment when this is implemented in the FPGA
throw uhd::not_implemented_error("Control poll not implemented in the FPGA");
@@ -169,7 +169,7 @@ public:
}
}
- virtual void sleep(uhd::time_spec_t duration, bool ack = false)
+ void sleep(uhd::time_spec_t duration, bool ack = false) override
{
// Send request
auto request = send_request_packet(OP_SLEEP,
@@ -183,19 +183,19 @@ public:
}
}
- virtual void register_async_msg_validator(async_msg_validator_t callback_f)
+ void register_async_msg_validator(async_msg_validator_t callback_f) override
{
std::unique_lock<std::mutex> lock(_mutex);
_validate_async_msg = callback_f;
}
- virtual void register_async_msg_handler(async_msg_callback_t callback_f)
+ void register_async_msg_handler(async_msg_callback_t callback_f) override
{
std::unique_lock<std::mutex> lock(_mutex);
_handle_async_msg = callback_f;
}
- virtual void set_policy(const std::string& name, const uhd::device_addr_t& args)
+ void set_policy(const std::string& name, const uhd::device_addr_t& args) override
{
std::unique_lock<std::mutex> lock(_mutex);
if (name == "default") {
@@ -207,7 +207,7 @@ public:
}
}
- virtual void handle_recv(const ctrl_payload& rx_ctrl)
+ void handle_recv(const ctrl_payload& rx_ctrl) override
{
if (rx_ctrl.is_ack) {
// Function to process a response with no sequence errors
@@ -312,13 +312,13 @@ public:
}
}
- virtual uint16_t get_src_epid() const
+ uint16_t get_src_epid() const override
{
// Is const, does not require a mutex
return _my_epid;
}
- virtual uint16_t get_port_num() const
+ uint16_t get_port_num() const override
{
// Is const, does not require a mutex
return _local_port;
@@ -447,7 +447,7 @@ private:
throw uhd::op_timerr("Control operation returned a timestamp error");
}
// Check data vector size
- if (rx_ctrl.data_vtr.size() == 0) {
+ if (rx_ctrl.data_vtr.empty()) {
throw uhd::op_failed(
"Control operation returned a malformed response");
}
diff --git a/host/lib/rfnoc/ddc_block_control.cpp b/host/lib/rfnoc/ddc_block_control.cpp
index 99a00dd1d..91c53a5e9 100644
--- a/host/lib/rfnoc/ddc_block_control.cpp
+++ b/host/lib/rfnoc/ddc_block_control.cpp
@@ -106,7 +106,7 @@ public:
double set_freq(const double freq,
const size_t chan,
- const boost::optional<uhd::time_spec_t> time)
+ const boost::optional<uhd::time_spec_t> time) override
{
// Store the current command time so we can restore it later
auto prev_cmd_time = get_command_time(chan);
@@ -119,12 +119,12 @@ public:
return get_freq(chan);
}
- double get_freq(const size_t chan) const
+ double get_freq(const size_t chan) const override
{
return _freq.at(chan).get();
}
- uhd::freq_range_t get_frequency_range(const size_t chan) const
+ uhd::freq_range_t get_frequency_range(const size_t chan) const override
{
const double input_rate =
_samp_rate_in.at(chan).is_valid() ? _samp_rate_in.at(chan).get() : 1.0;
@@ -132,22 +132,22 @@ public:
return uhd::freq_range_t(-input_rate / 2, input_rate / 2);
}
- double get_input_rate(const size_t chan) const
+ double get_input_rate(const size_t chan) const override
{
return _samp_rate_in.at(chan).is_valid() ? _samp_rate_in.at(chan).get() : 1.0;
}
- void set_input_rate(const double rate, const size_t chan)
+ void set_input_rate(const double rate, const size_t chan) override
{
set_property<double>("samp_rate", rate, {res_source_info::INPUT_EDGE, chan});
}
- double get_output_rate(const size_t chan) const
+ double get_output_rate(const size_t chan) const override
{
return _samp_rate_out.at(chan).is_valid() ? _samp_rate_out.at(chan).get() : 1.0;
}
- uhd::meta_range_t get_output_rates(const size_t chan) const
+ uhd::meta_range_t get_output_rates(const size_t chan) const override
{
uhd::meta_range_t result;
if (!_samp_rate_in.at(chan).is_valid()) {
@@ -163,7 +163,7 @@ public:
return result;
}
- double set_output_rate(const double rate, const size_t chan)
+ double set_output_rate(const double rate, const size_t chan) override
{
if (_samp_rate_in.at(chan).is_valid()) {
const int coerced_decim = coerce_decim(get_input_rate(chan) / rate);
@@ -184,7 +184,7 @@ public:
// handler goes both ways.
// This way, calling issue_stream_cmd() is the same as posting a message to
// our output port.
- void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd, const size_t port)
+ void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd, const size_t port) override
{
RFNOC_LOG_TRACE("issue_stream_cmd(stream_mode=" << char(stream_cmd.stream_mode)
<< ", port=" << port);
diff --git a/host/lib/rfnoc/duc_block_control.cpp b/host/lib/rfnoc/duc_block_control.cpp
index 0e75390bc..f78274067 100644
--- a/host/lib/rfnoc/duc_block_control.cpp
+++ b/host/lib/rfnoc/duc_block_control.cpp
@@ -103,7 +103,7 @@ public:
double set_freq(const double freq,
const size_t chan,
- const boost::optional<uhd::time_spec_t> time)
+ const boost::optional<uhd::time_spec_t> time) override
{
// Store the current command time so we can restore it later
auto prev_cmd_time = get_command_time(chan);
@@ -116,12 +116,12 @@ public:
return get_freq(chan);
}
- double get_freq(const size_t chan) const
+ double get_freq(const size_t chan) const override
{
return _freq.at(chan).get();
}
- uhd::freq_range_t get_frequency_range(const size_t chan) const
+ uhd::freq_range_t get_frequency_range(const size_t chan) const override
{
const double input_rate =
_samp_rate_in.at(chan).is_valid() ? _samp_rate_in.at(chan).get() : 1.0;
@@ -129,22 +129,22 @@ public:
return uhd::freq_range_t(-input_rate / 2, input_rate / 2);
}
- double get_input_rate(const size_t chan) const
+ double get_input_rate(const size_t chan) const override
{
return _samp_rate_in.at(chan).is_valid() ? _samp_rate_in.at(chan).get() : 1.0;
}
- double get_output_rate(const size_t chan) const
+ double get_output_rate(const size_t chan) const override
{
return _samp_rate_out.at(chan).is_valid() ? _samp_rate_out.at(chan).get() : 1.0;
}
- void set_output_rate(const double rate, const size_t chan)
+ void set_output_rate(const double rate, const size_t chan) override
{
set_property<double>("samp_rate", rate, {res_source_info::OUTPUT_EDGE, chan});
}
- uhd::meta_range_t get_input_rates(const size_t chan) const
+ uhd::meta_range_t get_input_rates(const size_t chan) const override
{
uhd::meta_range_t result;
if (!_samp_rate_out.at(chan).is_valid()) {
@@ -160,7 +160,7 @@ public:
return result;
}
- double set_input_rate(const double rate, const size_t chan)
+ double set_input_rate(const double rate, const size_t chan) override
{
if (_samp_rate_out.at(chan).is_valid()) {
const int coerced_interp = coerce_interp(get_output_rate(chan) / rate);
diff --git a/host/lib/rfnoc/fft_block_control.cpp b/host/lib/rfnoc/fft_block_control.cpp
index 23ee380ac..d2ab368ff 100644
--- a/host/lib/rfnoc/fft_block_control.cpp
+++ b/host/lib/rfnoc/fft_block_control.cpp
@@ -47,52 +47,52 @@ public:
_register_props();
}
- void set_direction(const fft_direction direction)
+ void set_direction(const fft_direction direction) override
{
set_property<int>(PROP_KEY_DIRECTION, static_cast<int>(direction));
}
- fft_direction get_direction() const
+ fft_direction get_direction() const override
{
return static_cast<fft_direction>(_direction.get());
}
- void set_magnitude(const fft_magnitude magnitude)
+ void set_magnitude(const fft_magnitude magnitude) override
{
set_property<int>(PROP_KEY_MAGNITUDE, static_cast<int>(magnitude));
}
- fft_magnitude get_magnitude() const
+ fft_magnitude get_magnitude() const override
{
return static_cast<fft_magnitude>(_magnitude.get());
}
- void set_shift_config(const fft_shift shift)
+ void set_shift_config(const fft_shift shift) override
{
set_property<int>(PROP_KEY_SHIFT_CONFIG, static_cast<int>(shift));
}
- fft_shift get_shift_config() const
+ fft_shift get_shift_config() const override
{
return static_cast<fft_shift>(_shift.get());
}
- void set_scaling(const uint16_t scaling)
+ void set_scaling(const uint16_t scaling) override
{
set_property<int>(PROP_KEY_FFT_SCALING, scaling);
}
- uint16_t get_scaling() const
+ uint16_t get_scaling() const override
{
return static_cast<uint16_t>(_scaling.get());
}
- void set_length(const size_t size)
+ void set_length(const size_t size) override
{
set_property<int>(PROP_KEY_LENGTH, size);
}
- size_t get_length() const
+ size_t get_length() const override
{
return static_cast<size_t>(_length.get());
}
diff --git a/host/lib/rfnoc/fir_filter_block_control.cpp b/host/lib/rfnoc/fir_filter_block_control.cpp
index 38a0e4b9c..a89e9691d 100644
--- a/host/lib/rfnoc/fir_filter_block_control.cpp
+++ b/host/lib/rfnoc/fir_filter_block_control.cpp
@@ -40,12 +40,12 @@ public:
_program_coefficients();
}
- size_t get_max_num_coefficients() const
+ size_t get_max_num_coefficients() const override
{
return _max_num_coeffs;
}
- void set_coefficients(const std::vector<int16_t>& coeffs)
+ void set_coefficients(const std::vector<int16_t>& coeffs) override
{
if (coeffs.size() > _max_num_coeffs) {
std::string error_msg =
@@ -62,7 +62,7 @@ public:
_program_coefficients();
}
- std::vector<int16_t> get_coefficients() const
+ std::vector<int16_t> get_coefficients() const override
{
return _coeffs;
}
diff --git a/host/lib/rfnoc/fosphor_block_control.cpp b/host/lib/rfnoc/fosphor_block_control.cpp
index 6bf621982..9734c17d4 100644
--- a/host/lib/rfnoc/fosphor_block_control.cpp
+++ b/host/lib/rfnoc/fosphor_block_control.cpp
@@ -80,150 +80,150 @@ public:
_register_props();
}
- void set_enable_histogram(const bool enable_histogram)
+ void set_enable_histogram(const bool enable_histogram) override
{
set_property<bool>(PROP_KEY_ENABLE_HISTOGRAM, enable_histogram);
}
- bool get_enable_histogram() const
+ bool get_enable_histogram() const override
{
return _prop_enable_histogram.get();
}
- void set_enable_waterfall(const bool enable_waterfall)
+ void set_enable_waterfall(const bool enable_waterfall) override
{
set_property<bool>(PROP_KEY_ENABLE_WATERFALL, enable_waterfall);
}
- bool get_enable_waterfall() const
+ bool get_enable_waterfall() const override
{
return _prop_enable_waterfall.get();
}
- void clear_history()
+ void clear_history() override
{
set_property<bool>(PROP_KEY_CLEAR_HISTORY, true);
}
- void set_enable_dither(const bool enable_dither)
+ void set_enable_dither(const bool enable_dither) override
{
set_property<bool>(PROP_KEY_ENABLE_DITHER, enable_dither);
}
- bool get_enable_dither() const
+ bool get_enable_dither() const override
{
return _prop_enable_dither.get();
}
- void set_enable_noise(const bool enable_noise)
+ void set_enable_noise(const bool enable_noise) override
{
set_property<bool>(PROP_KEY_ENABLE_NOISE, enable_noise);
}
- bool get_enable_noise() const
+ bool get_enable_noise() const override
{
return _prop_enable_noise.get();
}
- void set_histogram_decimation(const uint16_t decimation)
+ void set_histogram_decimation(const uint16_t decimation) override
{
set_property<int>(PROP_KEY_HIST_DECIMATION, decimation);
}
- uint16_t get_histogram_decimation() const
+ uint16_t get_histogram_decimation() const override
{
return _prop_hist_decimation.get();
}
- void set_histogram_offset(const uint16_t offset)
+ void set_histogram_offset(const uint16_t offset) override
{
set_property<int>(PROP_KEY_OFFSET, offset);
}
- uint16_t get_histogram_offset() const
+ uint16_t get_histogram_offset() const override
{
return _prop_offset.get();
}
- void set_histogram_scale(const uint16_t scale)
+ void set_histogram_scale(const uint16_t scale) override
{
set_property<int>(PROP_KEY_SCALE, scale);
}
- uint16_t get_histogram_scale() const
+ uint16_t get_histogram_scale() const override
{
return _prop_scale.get();
}
- void set_histogram_rise_rate(const uint16_t rise_rate)
+ void set_histogram_rise_rate(const uint16_t rise_rate) override
{
set_property<int>(PROP_KEY_RISE_TIME, rise_rate);
}
- uint16_t get_histogram_rise_rate() const
+ uint16_t get_histogram_rise_rate() const override
{
return _prop_trise.get();
}
- void set_histogram_decay_rate(const uint16_t decay_rate)
+ void set_histogram_decay_rate(const uint16_t decay_rate) override
{
set_property<int>(PROP_KEY_DECAY_TIME, decay_rate);
}
- uint16_t get_histogram_decay_rate() const
+ uint16_t get_histogram_decay_rate() const override
{
return _prop_tdecay.get();
}
- void set_spectrum_alpha(const uint16_t alpha)
+ void set_spectrum_alpha(const uint16_t alpha) override
{
set_property<int>(PROP_KEY_ALPHA, alpha);
}
- uint16_t get_spectrum_alpha() const
+ uint16_t get_spectrum_alpha() const override
{
return _prop_alpha.get();
}
- void set_spectrum_max_hold_decay(const uint16_t epsilon)
+ void set_spectrum_max_hold_decay(const uint16_t epsilon) override
{
set_property<int>(PROP_KEY_EPSILON, epsilon);
}
- uint16_t get_spectrum_max_hold_decay() const
+ uint16_t get_spectrum_max_hold_decay() const override
{
return _prop_epsilon.get();
}
void set_waterfall_predivision(
- const fosphor_waterfall_predivision_ratio waterfall_predivision)
+ const fosphor_waterfall_predivision_ratio waterfall_predivision) override
{
set_property<int>(
PROP_KEY_WF_PREDIVISION_RATIO, static_cast<int>(waterfall_predivision));
}
- fosphor_waterfall_predivision_ratio get_waterfall_predivision() const
+ fosphor_waterfall_predivision_ratio get_waterfall_predivision() const override
{
return static_cast<fosphor_waterfall_predivision_ratio>(
_prop_wf_prediv_ratio.get());
}
- void set_waterfall_mode(const fosphor_waterfall_mode waterfall_mode)
+ void set_waterfall_mode(const fosphor_waterfall_mode waterfall_mode) override
{
set_property<int>(PROP_KEY_WF_MODE, static_cast<int>(waterfall_mode));
}
- fosphor_waterfall_mode get_waterfall_mode() const
+ fosphor_waterfall_mode get_waterfall_mode() const override
{
return static_cast<fosphor_waterfall_mode>(_prop_wf_mode.get());
}
- void set_waterfall_decimation(const uint16_t waterfall_decimation)
+ void set_waterfall_decimation(const uint16_t waterfall_decimation) override
{
set_property<int>(PROP_KEY_WF_DECIMATION, waterfall_decimation);
}
- uint16_t get_waterfall_decimation() const
+ uint16_t get_waterfall_decimation() const override
{
return _prop_wf_decim.get();
}
diff --git a/host/lib/rfnoc/graph_stream_manager.cpp b/host/lib/rfnoc/graph_stream_manager.cpp
index be2dff3ce..de86d299b 100644
--- a/host/lib/rfnoc/graph_stream_manager.cpp
+++ b/host/lib/rfnoc/graph_stream_manager.cpp
@@ -51,14 +51,14 @@ public:
}
}
- virtual ~graph_stream_manager_impl() = default;
+ ~graph_stream_manager_impl() override = default;
- virtual const std::set<sep_addr_t>& get_reachable_endpoints() const
+ const std::set<sep_addr_t>& get_reachable_endpoints() const override
{
return _reachable_endpoints;
}
- virtual std::vector<device_id_t> get_local_devices() const
+ std::vector<device_id_t> get_local_devices() const override
{
std::vector<device_id_t> retval;
for (const auto& mgr_pair : _link_mgrs) {
@@ -67,8 +67,8 @@ public:
return retval;
}
- virtual sep_id_pair_t connect_host_to_device(sep_addr_t dst_addr,
- uhd::transport::adapter_id_t adapter = uhd::transport::NULL_ADAPTER_ID)
+ sep_id_pair_t connect_host_to_device(sep_addr_t dst_addr,
+ uhd::transport::adapter_id_t adapter = uhd::transport::NULL_ADAPTER_ID) override
{
UHD_LOGGER_DEBUG("RFNOC::GRAPH")
<< boost::format("Connecting the Host to Endpoint %d:%d through Adapter "
@@ -90,8 +90,8 @@ public:
return epid_pair;
}
- virtual sep_id_pair_t connect_device_to_device(
- sep_addr_t dst_addr, sep_addr_t src_addr)
+ sep_id_pair_t connect_device_to_device(
+ sep_addr_t dst_addr, sep_addr_t src_addr) override
{
UHD_LOGGER_DEBUG("RFNOC::GRAPH")
<< boost::format("Connecting the Endpoint %d:%d to Endpoint %d:%d...")
@@ -119,11 +119,11 @@ public:
"specified source endpoint");
}
- virtual ctrlport_endpoint::sptr get_block_register_iface(sep_addr_t dst_addr,
+ ctrlport_endpoint::sptr get_block_register_iface(sep_addr_t dst_addr,
uint16_t block_index,
const clock_iface& client_clk,
const clock_iface& timebase_clk,
- uhd::transport::adapter_id_t adapter = uhd::transport::NULL_ADAPTER_ID)
+ uhd::transport::adapter_id_t adapter = uhd::transport::NULL_ADAPTER_ID) override
{
// We must be connected to dst_addr before getting a register iface
sep_id_t dst_epid = _epid_alloc->get_epid(dst_addr);
@@ -133,8 +133,9 @@ public:
dst_epid, block_index, client_clk, timebase_clk);
}
- virtual detail::client_zero::sptr get_client_zero(sep_addr_t dst_addr,
- uhd::transport::adapter_id_t adapter = uhd::transport::NULL_ADAPTER_ID) const
+ detail::client_zero::sptr get_client_zero(sep_addr_t dst_addr,
+ uhd::transport::adapter_id_t adapter =
+ uhd::transport::NULL_ADAPTER_ID) const override
{
// We must be connected to dst_addr before getting a client zero
sep_id_t dst_epid = _epid_alloc->get_epid(dst_addr);
@@ -143,13 +144,13 @@ public:
return _link_mgrs.at(dev)->get_client_zero(dst_epid);
}
- virtual std::tuple<sep_id_pair_t, stream_buff_params_t>
- create_device_to_device_data_stream(const sep_addr_t dst_addr,
+ std::tuple<sep_id_pair_t, stream_buff_params_t> create_device_to_device_data_stream(
+ const sep_addr_t dst_addr,
const sep_addr_t src_addr,
const bool lossy_xport,
const double fc_freq_ratio,
const double fc_headroom_ratio,
- const bool reset = false)
+ const bool reset = false) override
{
UHD_LOGGER_DEBUG("RFNOC::GRAPH")
<< boost::format(
@@ -190,7 +191,7 @@ public:
const sw_buff_t mdata_buff_fmt,
const uhd::transport::adapter_id_t adapter,
const device_addr_t& xport_args,
- const std::string& streamer_id)
+ const std::string& streamer_id) override
{
device_id_t dev = _check_dst_and_find_src(
src_addr, adapter, uhd::transport::link_type_t::RX_DATA);
@@ -202,13 +203,12 @@ public:
src_addr, pyld_buff_fmt, mdata_buff_fmt, xport_args, streamer_id);
}
- virtual chdr_tx_data_xport::uptr create_host_to_device_data_stream(
- sep_addr_t dst_addr,
+ chdr_tx_data_xport::uptr create_host_to_device_data_stream(sep_addr_t dst_addr,
const sw_buff_t pyld_buff_fmt,
const sw_buff_t mdata_buff_fmt,
const uhd::transport::adapter_id_t adapter,
const device_addr_t& xport_args,
- const std::string& streamer_id)
+ const std::string& streamer_id) override
{
device_id_t dev = _check_dst_and_find_src(
dst_addr, adapter, uhd::transport::link_type_t::TX_DATA);
@@ -220,7 +220,7 @@ public:
dst_addr, pyld_buff_fmt, mdata_buff_fmt, xport_args, streamer_id);
}
- std::vector<uhd::transport::adapter_id_t> get_adapters(sep_addr_t addr) const
+ std::vector<uhd::transport::adapter_id_t> get_adapters(sep_addr_t addr) const override
{
auto adapters = std::vector<uhd::transport::adapter_id_t>();
if (_src_map.count(addr) > 0) {
diff --git a/host/lib/rfnoc/keep_one_in_n_block_control.cpp b/host/lib/rfnoc/keep_one_in_n_block_control.cpp
index baec58fbf..da0dcda90 100644
--- a/host/lib/rfnoc/keep_one_in_n_block_control.cpp
+++ b/host/lib/rfnoc/keep_one_in_n_block_control.cpp
@@ -35,27 +35,27 @@ public:
_register_props();
}
- size_t get_max_n() const
+ size_t get_max_n() const override
{
return _max_n;
}
- void set_n(const size_t n, const size_t chan = 0)
+ void set_n(const size_t n, const size_t chan = 0) override
{
set_property<int>(PROP_KEY_N, static_cast<int>(n), chan);
}
- size_t get_n(const size_t chan = 0) const
+ size_t get_n(const size_t chan = 0) const override
{
return _n.at(chan).get();
}
- void set_mode(const mode mode, const size_t chan = 0)
+ void set_mode(const mode mode, const size_t chan = 0) override
{
set_property<int>(PROP_KEY_MODE, static_cast<int>(mode), chan);
}
- mode get_mode(const size_t chan = 0) const
+ mode get_mode(const size_t chan = 0) const override
{
return static_cast<mode>(_mode.at(chan).get());
}
diff --git a/host/lib/rfnoc/link_stream_manager.cpp b/host/lib/rfnoc/link_stream_manager.cpp
index 59b80b59e..d73eff319 100644
--- a/host/lib/rfnoc/link_stream_manager.cpp
+++ b/host/lib/rfnoc/link_stream_manager.cpp
@@ -72,35 +72,35 @@ public:
*_ctrl_xport, _pkt_factory, sep_addr_t(_my_device_id, SEP_INST_MGMT_CTRL));
}
- virtual ~link_stream_manager_impl()
+ ~link_stream_manager_impl() override
{
for (const auto& epid : _allocated_epids) {
_epid_alloc->deallocate_epid(epid);
}
}
- virtual device_id_t get_self_device_id() const
+ device_id_t get_self_device_id() const override
{
return _my_device_id;
}
- virtual uhd::transport::adapter_id_t get_adapter_id() const
+ uhd::transport::adapter_id_t get_adapter_id() const override
{
return _my_adapter_id;
}
- virtual const std::set<sep_addr_t>& get_reachable_endpoints() const
+ const std::set<sep_addr_t>& get_reachable_endpoints() const override
{
return _mgmt_portal->get_reachable_endpoints();
}
- virtual bool can_connect_device_to_device(
- sep_addr_t dst_addr, sep_addr_t src_addr) const
+ bool can_connect_device_to_device(
+ sep_addr_t dst_addr, sep_addr_t src_addr) const override
{
return _mgmt_portal->can_remote_route(dst_addr, src_addr);
}
- virtual sep_id_pair_t connect_host_to_device(sep_addr_t dst_addr)
+ sep_id_pair_t connect_host_to_device(sep_addr_t dst_addr) override
{
_ensure_ep_is_reachable(dst_addr);
@@ -130,8 +130,8 @@ public:
return sep_id_pair_t(_my_mgmt_ctrl_epid, dst_epid);
}
- virtual sep_id_pair_t connect_device_to_device(
- sep_addr_t dst_addr, sep_addr_t src_addr)
+ sep_id_pair_t connect_device_to_device(
+ sep_addr_t dst_addr, sep_addr_t src_addr) override
{
_ensure_ep_is_reachable(dst_addr);
_ensure_ep_is_reachable(src_addr);
@@ -148,10 +148,10 @@ public:
return sep_id_pair_t(src_epid, dst_epid);
}
- virtual ctrlport_endpoint::sptr get_block_register_iface(sep_id_t dst_epid,
+ ctrlport_endpoint::sptr get_block_register_iface(sep_id_t dst_epid,
uint16_t block_index,
const clock_iface& client_clk,
- const clock_iface& timebase_clk)
+ const clock_iface& timebase_clk) override
{
// Ensure that the endpoint is initialized for control at the specified EPID
if (_ctrl_ep == nullptr) {
@@ -176,7 +176,7 @@ public:
timebase_clk);
}
- virtual client_zero::sptr get_client_zero(sep_id_t dst_epid) const
+ client_zero::sptr get_client_zero(sep_id_t dst_epid) const override
{
if (_client_zero_map.count(dst_epid) == 0) {
throw uhd::runtime_error(
@@ -185,13 +185,12 @@ public:
return _client_zero_map.at(dst_epid);
}
- virtual stream_buff_params_t create_device_to_device_data_stream(
- const sep_id_t& dst_epid,
+ stream_buff_params_t create_device_to_device_data_stream(const sep_id_t& dst_epid,
const sep_id_t& src_epid,
const bool lossy_xport,
const double fc_freq_ratio,
const double fc_headroom_ratio,
- const bool reset = false)
+ const bool reset = false) override
{
// We assume that the devices are already connected (because this API requires
// EPIDs)
@@ -218,12 +217,11 @@ public:
STREAM_SETUP_TIMEOUT);
}
- virtual chdr_tx_data_xport::uptr create_host_to_device_data_stream(
- const sep_addr_t dst_addr,
+ chdr_tx_data_xport::uptr create_host_to_device_data_stream(const sep_addr_t dst_addr,
const sw_buff_t pyld_buff_fmt,
const sw_buff_t mdata_buff_fmt,
const device_addr_t& xport_args,
- const std::string& streamer_id)
+ const std::string& streamer_id) override
{
_ensure_ep_is_reachable(dst_addr);
@@ -249,12 +247,11 @@ public:
streamer_id);
}
- virtual chdr_rx_data_xport::uptr create_device_to_host_data_stream(
- sep_addr_t src_addr,
+ chdr_rx_data_xport::uptr create_device_to_host_data_stream(sep_addr_t src_addr,
const sw_buff_t pyld_buff_fmt,
const sw_buff_t mdata_buff_fmt,
const device_addr_t& xport_args,
- const std::string& streamer_id)
+ const std::string& streamer_id) override
{
_ensure_ep_is_reachable(src_addr);
diff --git a/host/lib/rfnoc/mgmt_portal.cpp b/host/lib/rfnoc/mgmt_portal.cpp
index 7b09c540b..ea78aee48 100644
--- a/host/lib/rfnoc/mgmt_portal.cpp
+++ b/host/lib/rfnoc/mgmt_portal.cpp
@@ -196,15 +196,15 @@ public:
}
}
- virtual ~mgmt_portal_impl() {}
+ ~mgmt_portal_impl() override {}
- virtual const std::set<sep_addr_t>& get_reachable_endpoints() const
+ const std::set<sep_addr_t>& get_reachable_endpoints() const override
{
return _discovered_ep_set;
}
- virtual void initialize_endpoint(
- chdr_ctrl_xport& xport, const sep_addr_t& addr, const sep_id_t& epid)
+ void initialize_endpoint(
+ chdr_ctrl_xport& xport, const sep_addr_t& addr, const sep_id_t& epid) override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
@@ -237,7 +237,7 @@ public:
register_endpoint(addr, epid);
}
- virtual void register_endpoint(const sep_addr_t& addr, const sep_id_t& epid)
+ void register_endpoint(const sep_addr_t& addr, const sep_id_t& epid) override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
if (is_endpoint_registered(epid)) {
@@ -260,13 +260,13 @@ public:
% epid % to_string(_node_addr_map.at(lookup_node))));
}
- virtual bool is_endpoint_registered(const sep_id_t& epid) const
+ bool is_endpoint_registered(const sep_id_t& epid) const override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
return (_epid_addr_map.count(epid) > 0);
}
- virtual sep_info_t get_endpoint_info(const sep_id_t& epid) const
+ sep_info_t get_endpoint_info(const sep_id_t& epid) const override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
@@ -295,7 +295,7 @@ public:
return retval;
}
- virtual void setup_local_route(chdr_ctrl_xport& xport, const sep_id_t& dst_epid)
+ void setup_local_route(chdr_ctrl_xport& xport, const sep_id_t& dst_epid) override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
auto my_epid = xport.get_epid();
@@ -383,8 +383,8 @@ public:
% dst_epid % to_string(node_addr)));
}
- virtual bool can_remote_route(
- const sep_addr_t& dst_addr, const sep_addr_t& src_addr) const
+ bool can_remote_route(
+ const sep_addr_t& dst_addr, const sep_addr_t& src_addr) const override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
@@ -412,8 +412,9 @@ public:
return false;
}
- virtual void setup_remote_route(
- chdr_ctrl_xport& xport, const sep_id_t& dst_epid, const sep_id_t& src_epid)
+ void setup_remote_route(chdr_ctrl_xport& xport,
+ const sep_id_t& dst_epid,
+ const sep_id_t& src_epid) override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
@@ -450,14 +451,14 @@ public:
% src_epid % dst_epid));
}
- virtual void config_local_rx_stream_start(chdr_ctrl_xport& xport,
+ void config_local_rx_stream_start(chdr_ctrl_xport& xport,
const sep_id_t& epid,
const bool lossy_xport,
const sw_buff_t pyld_buff_fmt,
const sw_buff_t mdata_buff_fmt,
const stream_buff_params_t& fc_freq,
const stream_buff_params_t& fc_headroom,
- const bool reset = false)
+ const bool reset = false) override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
auto my_epid = xport.get_epid();
@@ -501,8 +502,8 @@ public:
(boost::format("Initiated RX stream setup for EPID=%d") % epid));
}
- virtual stream_buff_params_t config_local_rx_stream_commit(
- chdr_ctrl_xport& xport, const sep_id_t& epid, const double timeout = 0.2)
+ stream_buff_params_t config_local_rx_stream_commit(
+ chdr_ctrl_xport& xport, const sep_id_t& epid, const double timeout = 0.2) override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
@@ -517,11 +518,11 @@ public:
return std::get<1>(_get_ostrm_status(xport, node_addr));
}
- virtual void config_local_tx_stream(chdr_ctrl_xport& xport,
+ void config_local_tx_stream(chdr_ctrl_xport& xport,
const sep_id_t& epid,
const sw_buff_t pyld_buff_fmt,
const sw_buff_t mdata_buff_fmt,
- const bool reset = false)
+ const bool reset = false) override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
auto my_epid = xport.get_epid();
@@ -561,14 +562,14 @@ public:
(boost::format("Finished TX stream setup for EPID=%d") % epid));
}
- virtual stream_buff_params_t config_remote_stream(chdr_ctrl_xport& xport,
+ stream_buff_params_t config_remote_stream(chdr_ctrl_xport& xport,
const sep_id_t& dst_epid,
const sep_id_t& src_epid,
const bool lossy_xport,
const stream_buff_params_t& fc_freq,
const stream_buff_params_t& fc_headroom,
const bool reset = false,
- const double timeout = 0.2)
+ const double timeout = 0.2) override
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
auto my_epid = xport.get_epid();
@@ -647,9 +648,9 @@ public:
}
- virtual void register_xport_hop_cfg_fns(uint8_t xport_subtype,
+ void register_xport_hop_cfg_fns(uint8_t xport_subtype,
xport_cfg_fn_t init_hop_cfg_fn,
- xport_cfg_fn_t rtcfg_hop_cfg_fn)
+ xport_cfg_fn_t rtcfg_hop_cfg_fn) override
{
_init_cfg_fns[xport_subtype] = init_hop_cfg_fn;
_rtcfg_cfg_fns[xport_subtype] = rtcfg_hop_cfg_fn;
diff --git a/host/lib/rfnoc/moving_average_block_control.cpp b/host/lib/rfnoc/moving_average_block_control.cpp
index f812d535d..9ed3ef470 100644
--- a/host/lib/rfnoc/moving_average_block_control.cpp
+++ b/host/lib/rfnoc/moving_average_block_control.cpp
@@ -30,22 +30,22 @@ public:
this->regs().poke32(REG_DIVISOR_ADDR, uint32_t(_divisor));
}
- void set_sum_len(const uint8_t sum_len)
+ void set_sum_len(const uint8_t sum_len) override
{
set_property(PROP_KEY_SUM_LEN, static_cast<int>(sum_len), res_source_info::USER);
}
- uint8_t get_sum_len() const
+ uint8_t get_sum_len() const override
{
return _sum_len;
}
- void set_divisor(const uint32_t divisor)
+ void set_divisor(const uint32_t divisor) override
{
set_property(PROP_KEY_DIVISOR, static_cast<int>(divisor), res_source_info::USER);
}
- uint32_t get_divisor() const
+ uint32_t get_divisor() const override
{
return _divisor;
}
diff --git a/host/lib/rfnoc/null_block_control.cpp b/host/lib/rfnoc/null_block_control.cpp
index ba8ec8da4..bb5fe2ea9 100644
--- a/host/lib/rfnoc/null_block_control.cpp
+++ b/host/lib/rfnoc/null_block_control.cpp
@@ -51,7 +51,7 @@ public:
register_issue_stream_cmd();
}
- void issue_stream_cmd(const stream_cmd_t& stream_cmd)
+ void issue_stream_cmd(const stream_cmd_t& stream_cmd) override
{
if (stream_cmd.stream_mode == stream_cmd_t::STREAM_MODE_START_CONTINUOUS) {
RFNOC_LOG_TRACE("Received start stream request!");
@@ -66,7 +66,7 @@ public:
}
}
- void reset_counters()
+ void reset_counters() override
{
const uint32_t streaming_flag = _streaming ? 0x2 : 0x0;
regs().poke32(REG_CTRL_STATUS, streaming_flag | 0x1);
@@ -88,7 +88,7 @@ public:
regs().poke32(REG_SRC_LINES_PER_PKT, lpp - 2);
}
- void set_bytes_per_packet(const uint32_t bpp)
+ void set_bytes_per_packet(const uint32_t bpp) override
{
if (bpp > 0xFFFF) {
throw uhd::value_error("Null source lines per packet cannot exceed 16 bits!");
@@ -101,7 +101,7 @@ public:
set_lines_per_packet(lpp);
}
- void set_throttle_cycles(const uint32_t cycs)
+ void set_throttle_cycles(const uint32_t cycs) override
{
if (cycs > 0x3FF) {
throw uhd::value_error("Null source throttle cycles cannot exceed 10 bits!");
@@ -119,22 +119,23 @@ public:
return _nipc;
}
- uint32_t get_lines_per_packet()
+ uint32_t get_lines_per_packet() override
{
return regs().peek32(REG_SRC_LINES_PER_PKT) + 2;
}
- uint32_t get_bytes_per_packet()
+ uint32_t get_bytes_per_packet() override
{
return regs().peek32(REG_SRC_BYTES_PER_PKT);
}
- uint32_t get_throttle_cycles()
+ uint32_t get_throttle_cycles() override
{
return regs().peek32(REG_SRC_THROTTLE_CYC);
}
- uint64_t get_count(const port_type_t port_type, const count_type_t count_type)
+ uint64_t get_count(
+ const port_type_t port_type, const count_type_t count_type) override
{
const uint32_t count_addr_lo = [&]() {
switch (port_type) {
@@ -174,7 +175,7 @@ private:
});
}
- void deinit()
+ void deinit() override
{
issue_stream_cmd(stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS);
}
diff --git a/host/lib/rfnoc/register_iface_holder.cpp b/host/lib/rfnoc/register_iface_holder.cpp
index d3a0e82e5..ba50cc784 100644
--- a/host/lib/rfnoc/register_iface_holder.cpp
+++ b/host/lib/rfnoc/register_iface_holder.cpp
@@ -19,68 +19,72 @@ using namespace uhd::rfnoc;
class invalid_register_iface : public register_iface
{
public:
- ~invalid_register_iface() = default;
+ ~invalid_register_iface() override = default;
- void poke32(uint32_t, uint32_t, uhd::time_spec_t, bool)
+ void poke32(uint32_t, uint32_t, uhd::time_spec_t, bool) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
}
- void multi_poke32(
- const std::vector<uint32_t>, const std::vector<uint32_t>, uhd::time_spec_t, bool)
+ void multi_poke32(const std::vector<uint32_t>,
+ const std::vector<uint32_t>,
+ uhd::time_spec_t,
+ bool) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
}
- void block_poke32(uint32_t, const std::vector<uint32_t>, uhd::time_spec_t, bool)
+ void block_poke32(
+ uint32_t, const std::vector<uint32_t>, uhd::time_spec_t, bool) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
}
- uint32_t peek32(uint32_t, uhd::time_spec_t)
+ uint32_t peek32(uint32_t, uhd::time_spec_t) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
return {};
}
- std::vector<uint32_t> block_peek32(uint32_t, size_t, uhd::time_spec_t)
+ std::vector<uint32_t> block_peek32(uint32_t, size_t, uhd::time_spec_t) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
return {};
}
- void poll32(uint32_t, uint32_t, uint32_t, uhd::time_spec_t, uhd::time_spec_t, bool)
+ void poll32(
+ uint32_t, uint32_t, uint32_t, uhd::time_spec_t, uhd::time_spec_t, bool) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
}
- void sleep(uhd::time_spec_t, bool)
+ void sleep(uhd::time_spec_t, bool) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
}
- void register_async_msg_handler(async_msg_callback_t)
+ void register_async_msg_handler(async_msg_callback_t) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
}
- void register_async_msg_validator(async_msg_validator_t)
+ void register_async_msg_validator(async_msg_validator_t) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
}
- void set_policy(const std::string&, const uhd::device_addr_t&)
+ void set_policy(const std::string&, const uhd::device_addr_t&) override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
}
- uint16_t get_src_epid() const
+ uint16_t get_src_epid() const override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
return 0;
}
- uint16_t get_port_num() const
+ uint16_t get_port_num() const override
{
UHD_LOG_ERROR("REGS", "Attempting to use invalidated register interface!");
return 0;
diff --git a/host/lib/rfnoc/replay_block_control.cpp b/host/lib/rfnoc/replay_block_control.cpp
index 289e24e97..201390cd1 100644
--- a/host/lib/rfnoc/replay_block_control.cpp
+++ b/host/lib/rfnoc/replay_block_control.cpp
@@ -123,7 +123,7 @@ public:
/**************************************************************************
* Replay Control API
**************************************************************************/
- void record(const uint64_t offset, const uint64_t size, const size_t port)
+ void record(const uint64_t offset, const uint64_t size, const size_t port) override
{
set_property<uint64_t>(
PROP_KEY_RECORD_OFFSET, offset, {res_source_info::USER, port});
@@ -133,7 +133,7 @@ public:
record_restart(port);
}
- void record_restart(const size_t port)
+ void record_restart(const size_t port) override
{
// Ensure that the buffer is properly configured before recording
_validate_record_buffer(port);
@@ -145,7 +145,7 @@ public:
const uint64_t size,
const size_t port,
const uhd::time_spec_t time_spec,
- const bool repeat)
+ const bool repeat) override
{
config_play(offset, size, port);
uhd::stream_cmd_t play_cmd =
@@ -157,19 +157,19 @@ public:
issue_stream_cmd(play_cmd, port);
}
- void stop(const size_t port)
+ void stop(const size_t port) override
{
uhd::stream_cmd_t stop_cmd =
uhd::stream_cmd_t(uhd::stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS);
issue_stream_cmd(stop_cmd, port);
}
- uint64_t get_mem_size() const
+ uint64_t get_mem_size() const override
{
return _mem_size;
}
- uint64_t get_word_size() const
+ uint64_t get_word_size() const override
{
return _word_size;
}
@@ -177,27 +177,27 @@ public:
/**************************************************************************
* Record Buffer State API
**************************************************************************/
- uint64_t get_record_offset(const size_t port) const
+ uint64_t get_record_offset(const size_t port) const override
{
return _record_offset.at(port).get();
}
- uint64_t get_record_size(const size_t port) const
+ uint64_t get_record_size(const size_t port) const override
{
return _record_size.at(port).get();
}
- uint64_t get_record_fullness(const size_t port)
+ uint64_t get_record_fullness(const size_t port) override
{
return _replay_reg_iface.peek64(REG_REC_FULLNESS_LO_ADDR, port);
}
- io_type_t get_record_type(const size_t port) const
+ io_type_t get_record_type(const size_t port) const override
{
return _record_type.at(port).get();
}
- virtual size_t get_record_item_size(const size_t port) const
+ size_t get_record_item_size(const size_t port) const override
{
return uhd::convert::get_bytes_per_item(get_record_type(port));
}
@@ -205,33 +205,33 @@ public:
/**************************************************************************
* Playback State API
**************************************************************************/
- uint64_t get_play_offset(const size_t port) const
+ uint64_t get_play_offset(const size_t port) const override
{
return _play_offset.at(port).get();
}
- uint64_t get_play_size(const size_t port) const
+ uint64_t get_play_size(const size_t port) const override
{
return _play_size.at(port).get();
}
- uint32_t get_max_items_per_packet(const size_t port) const
+ uint32_t get_max_items_per_packet(const size_t port) const override
{
return (_packet_size.at(port).get() - CHDR_MAX_LEN_HDR)
/ get_play_item_size(port);
}
- uint32_t get_max_packet_size(const size_t port) const
+ uint32_t get_max_packet_size(const size_t port) const override
{
return _packet_size.at(port).get();
}
- io_type_t get_play_type(const size_t port) const
+ io_type_t get_play_type(const size_t port) const override
{
return _play_type.at(port).get();
}
- size_t get_play_item_size(const size_t port) const
+ size_t get_play_item_size(const size_t port) const override
{
return uhd::convert::get_bytes_per_item(get_play_type(port));
}
@@ -239,7 +239,7 @@ public:
/**************************************************************************
* Advanced Record Control API calls
*************************************************************************/
- void set_record_type(const io_type_t type, const size_t port)
+ void set_record_type(const io_type_t type, const size_t port) override
{
set_property<std::string>(
PROP_KEY_TYPE, type, {res_source_info::INPUT_EDGE, port});
@@ -248,7 +248,8 @@ public:
/**************************************************************************
* Advanced Playback Control API
**************************************************************************/
- void config_play(const uint64_t offset, const uint64_t size, const size_t port)
+ void config_play(
+ const uint64_t offset, const uint64_t size, const size_t port) override
{
set_property<uint64_t>(
PROP_KEY_PLAY_OFFSET, offset, {res_source_info::USER, port});
@@ -256,23 +257,23 @@ public:
_validate_play_buffer(port);
}
- void set_play_type(const io_type_t type, const size_t port)
+ void set_play_type(const io_type_t type, const size_t port) override
{
set_property<std::string>(
PROP_KEY_TYPE, type, {res_source_info::OUTPUT_EDGE, port});
}
- void set_max_items_per_packet(const uint32_t ipp, const size_t port)
+ void set_max_items_per_packet(const uint32_t ipp, const size_t port) override
{
set_max_packet_size(CHDR_MAX_LEN_HDR + ipp * get_play_item_size(port), port);
}
- void set_max_packet_size(const uint32_t size, const size_t port)
+ void set_max_packet_size(const uint32_t size, const size_t port) override
{
set_property<uint32_t>(PROP_KEY_PKT_SIZE, size, {res_source_info::USER, port});
}
- void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd, const size_t port)
+ void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd, const size_t port) override
{
// Ensure that the buffer is properly configured before issuing a stream command
_validate_play_buffer(port);
diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp
index 56629d057..f6b07a36f 100644
--- a/host/lib/rfnoc/rfnoc_graph.cpp
+++ b/host/lib/rfnoc/rfnoc_graph.cpp
@@ -104,7 +104,7 @@ public:
throw uhd::runtime_error("Failure to create rfnoc_graph.");
}
- ~rfnoc_graph_impl()
+ ~rfnoc_graph_impl() override
{
UHD_LOG_TRACE(LOG_ID, "Shutting down detail::graph...");
_graph->shutdown();
@@ -116,17 +116,17 @@ public:
/**************************************************************************
* Block Discovery/Retrieval
*************************************************************************/
- std::vector<block_id_t> find_blocks(const std::string& block_id_hint) const
+ std::vector<block_id_t> find_blocks(const std::string& block_id_hint) const override
{
return _block_registry->find_blocks(block_id_hint);
}
- bool has_block(const block_id_t& block_id) const
+ bool has_block(const block_id_t& block_id) const override
{
return _block_registry->has_block(block_id);
}
- noc_block_base::sptr get_block(const block_id_t& block_id) const
+ noc_block_base::sptr get_block(const block_id_t& block_id) const override
{
return _block_registry->get_block(block_id);
}
@@ -137,7 +137,7 @@ public:
bool is_connectable(const block_id_t& src_blk,
size_t src_port,
const block_id_t& dst_blk,
- size_t dst_port)
+ size_t dst_port) override
{
try {
const std::string src_blk_info =
@@ -211,7 +211,7 @@ public:
size_t src_port,
const block_id_t& dst_blk,
size_t dst_port,
- bool skip_property_propagation)
+ bool skip_property_propagation) override
{
if (!has_block(src_blk)) {
throw uhd::lookup_error(
@@ -235,7 +235,7 @@ public:
void disconnect(const block_id_t& src_blk,
size_t src_port,
const block_id_t& dst_blk,
- size_t dst_port)
+ size_t dst_port) override
{
if (not has_block(src_blk)) {
throw uhd::lookup_error(
@@ -260,7 +260,7 @@ public:
size_t strm_port,
const block_id_t& dst_blk,
size_t dst_port,
- uhd::transport::adapter_id_t adapter_id)
+ uhd::transport::adapter_id_t adapter_id) override
{
// Verify the streamer was created by us
auto rfnoc_streamer = std::dynamic_pointer_cast<rfnoc_tx_streamer>(streamer);
@@ -321,7 +321,7 @@ public:
size_t src_port,
uhd::rx_streamer::sptr streamer,
size_t strm_port,
- uhd::transport::adapter_id_t adapter_id)
+ uhd::transport::adapter_id_t adapter_id) override
{
// Verify the streamer was created by us
auto rfnoc_streamer = std::dynamic_pointer_cast<rfnoc_rx_streamer>(streamer);
@@ -378,7 +378,7 @@ public:
src.get(), rfnoc_streamer.get(), edge_info};
}
- void disconnect(const std::string& streamer_id)
+ void disconnect(const std::string& streamer_id) override
{
UHD_LOG_TRACE(LOG_ID, std::string("Disconnecting ") + streamer_id);
if (_tx_streamers.count(streamer_id)) {
@@ -404,7 +404,7 @@ public:
UHD_LOG_TRACE(LOG_ID, std::string("Disconnected ") + streamer_id);
}
- void disconnect(const std::string& streamer_id, size_t port)
+ void disconnect(const std::string& streamer_id, size_t port) override
{
std::string id_str = streamer_id + ":" + std::to_string(port);
UHD_LOG_TRACE(LOG_ID, std::string("Disconnecting ") + id_str);
@@ -432,7 +432,7 @@ public:
}
uhd::rx_streamer::sptr create_rx_streamer(
- const size_t num_ports, const uhd::stream_args_t& args)
+ const size_t num_ports, const uhd::stream_args_t& args) override
{
auto this_graph = shared_from_this();
return std::make_shared<rfnoc_rx_streamer>(
@@ -440,19 +440,19 @@ public:
}
uhd::tx_streamer::sptr create_tx_streamer(
- const size_t num_ports, const uhd::stream_args_t& args)
+ const size_t num_ports, const uhd::stream_args_t& args) override
{
auto this_graph = shared_from_this();
return std::make_shared<rfnoc_tx_streamer>(
num_ports, args, [this_graph](const std::string& id) { this_graph->disconnect(id); });
}
- size_t get_num_mboards() const
+ size_t get_num_mboards() const override
{
return _num_mboards;
}
- std::shared_ptr<mb_controller> get_mb_controller(const size_t mb_index = 0)
+ std::shared_ptr<mb_controller> get_mb_controller(const size_t mb_index = 0) override
{
if (_mb_controllers.size() <= mb_index) {
throw uhd::index_error(
@@ -462,7 +462,7 @@ public:
return _mb_controllers.at(mb_index);
}
- bool synchronize_devices(const uhd::time_spec_t& time_spec, const bool quiet)
+ bool synchronize_devices(const uhd::time_spec_t& time_spec, const bool quiet) override
{
auto mb_controllers_copy = _mb_controllers;
bool result =
@@ -476,13 +476,13 @@ public:
return result;
}
- uhd::property_tree::sptr get_tree(void) const
+ uhd::property_tree::sptr get_tree(void) const override
{
return _tree;
}
std::vector<uhd::transport::adapter_id_t> enumerate_adapters_to_dst(
- const block_id_t& dst_blk, size_t dst_port)
+ const block_id_t& dst_blk, size_t dst_port) override
{
// Verify dst_blk even exists in this graph
if (!has_block(dst_blk)) {
@@ -515,7 +515,7 @@ public:
}
std::vector<uhd::transport::adapter_id_t> enumerate_adapters_from_src(
- const block_id_t& src_blk, size_t src_port)
+ const block_id_t& src_blk, size_t src_port) override
{
// Verify src_blk even exists in this graph
if (!has_block(src_blk)) {
@@ -547,23 +547,23 @@ public:
return _gsm->get_adapters(sep_addr);
}
- std::vector<graph_edge_t> enumerate_active_connections()
+ std::vector<graph_edge_t> enumerate_active_connections() override
{
return _graph->enumerate_edges();
}
- std::vector<graph_edge_t> enumerate_static_connections() const
+ std::vector<graph_edge_t> enumerate_static_connections() const override
{
return _static_edges;
}
- void commit()
+ void commit() override
{
_graph->commit();
}
- void release()
+ void release() override
{
_graph->release();
}
diff --git a/host/lib/rfnoc/siggen_block_control.cpp b/host/lib/rfnoc/siggen_block_control.cpp
index fa527f3f6..7fbe79337 100644
--- a/host/lib/rfnoc/siggen_block_control.cpp
+++ b/host/lib/rfnoc/siggen_block_control.cpp
@@ -56,64 +56,64 @@ public:
_register_props();
}
- void set_enable(const bool enable, const size_t port)
+ void set_enable(const bool enable, const size_t port) override
{
set_property<bool>(PROP_KEY_ENABLE, enable, port);
}
- bool get_enable(const size_t port) const
+ bool get_enable(const size_t port) const override
{
return _prop_enable.at(port).get();
}
- void set_waveform(const siggen_waveform waveform, const size_t port)
+ void set_waveform(const siggen_waveform waveform, const size_t port) override
{
set_property<int>(PROP_KEY_WAVEFORM, static_cast<int>(waveform), port);
}
- siggen_waveform get_waveform(const size_t port) const
+ siggen_waveform get_waveform(const size_t port) const override
{
return static_cast<siggen_waveform>(_prop_waveform.at(port).get());
}
- void set_amplitude(const double amplitude, const size_t port)
+ void set_amplitude(const double amplitude, const size_t port) override
{
set_property<double>(PROP_KEY_AMPLITUDE, amplitude, port);
}
- double get_amplitude(const size_t port) const
+ double get_amplitude(const size_t port) const override
{
return _prop_amplitude.at(port).get();
}
- void set_constant(const std::complex<double> constant, const size_t port)
+ void set_constant(const std::complex<double> constant, const size_t port) override
{
set_property<double>(PROP_KEY_CONSTANT_I, constant.real(), port);
set_property<double>(PROP_KEY_CONSTANT_Q, constant.imag(), port);
}
- std::complex<double> get_constant(const size_t port) const
+ std::complex<double> get_constant(const size_t port) const override
{
return std::complex<double>(
_prop_constant_i.at(port).get(), _prop_constant_q.at(port).get());
}
- void set_sine_phase_increment(const double phase_inc, const size_t port)
+ void set_sine_phase_increment(const double phase_inc, const size_t port) override
{
set_property<double>(PROP_KEY_SINE_PHASE_INC, phase_inc, port);
}
- double get_sine_phase_increment(const size_t port) const
+ double get_sine_phase_increment(const size_t port) const override
{
return _prop_phase_inc.at(port).get();
}
- void set_samples_per_packet(const size_t spp, const size_t port)
+ void set_samples_per_packet(const size_t spp, const size_t port) override
{
set_property<int>(PROP_KEY_SPP, uhd::narrow_cast<int>(spp), port);
}
- size_t get_samples_per_packet(const size_t port) const
+ size_t get_samples_per_packet(const size_t port) const override
{
return _prop_spp.at(port).get();
}
diff --git a/host/lib/rfnoc/switchboard_block_control.cpp b/host/lib/rfnoc/switchboard_block_control.cpp
index 229c224e9..eec7f666f 100644
--- a/host/lib/rfnoc/switchboard_block_control.cpp
+++ b/host/lib/rfnoc/switchboard_block_control.cpp
@@ -40,7 +40,7 @@ public:
_update_forwarding_map();
}
- void connect(const size_t input, const size_t output)
+ void connect(const size_t input, const size_t output) override
{
set_property<int>(PROP_KEY_INPUT_SELECT, static_cast<int>(input), output);
set_property<int>(PROP_KEY_OUTPUT_SELECT, static_cast<int>(output), input);
diff --git a/host/lib/rfnoc/vector_iir_block_control.cpp b/host/lib/rfnoc/vector_iir_block_control.cpp
index 404e85aa8..eaeb75ef0 100644
--- a/host/lib/rfnoc/vector_iir_block_control.cpp
+++ b/host/lib/rfnoc/vector_iir_block_control.cpp
@@ -39,37 +39,37 @@ public:
_register_props();
}
- void set_alpha(const double alpha, const size_t chan)
+ void set_alpha(const double alpha, const size_t chan) override
{
set_property<double>(PROP_KEY_ALPHA, alpha, chan);
}
- double get_alpha(const size_t chan) const
+ double get_alpha(const size_t chan) const override
{
return _prop_alpha.at(chan).get();
}
- void set_beta(const double beta, const size_t chan)
+ void set_beta(const double beta, const size_t chan) override
{
set_property<double>(PROP_KEY_BETA, beta, chan);
}
- double get_beta(const size_t chan) const
+ double get_beta(const size_t chan) const override
{
return _prop_beta.at(chan).get();
}
- void set_delay(const uint16_t delay, const size_t chan)
+ void set_delay(const uint16_t delay, const size_t chan) override
{
set_property<int>(PROP_KEY_DELAY, delay, chan);
}
- uint16_t get_delay(const size_t chan) const
+ uint16_t get_delay(const size_t chan) const override
{
return _prop_delay.at(chan).get();
}
- uint16_t get_max_delay(const size_t chan) const
+ uint16_t get_max_delay(const size_t chan) const override
{
return _prop_max_delay.at(chan).get();
}
diff --git a/host/lib/rfnoc/window_block_control.cpp b/host/lib/rfnoc/window_block_control.cpp
index 1bd6a1295..5d3201838 100644
--- a/host/lib/rfnoc/window_block_control.cpp
+++ b/host/lib/rfnoc/window_block_control.cpp
@@ -32,12 +32,12 @@ public:
_register_props();
}
- size_t get_max_num_coefficients(const size_t chan) const
+ size_t get_max_num_coefficients(const size_t chan) const override
{
return _max_len.at(chan);
}
- void set_coefficients(const std::vector<int16_t>& coeffs, const size_t chan)
+ void set_coefficients(const std::vector<int16_t>& coeffs, const size_t chan) override
{
if (coeffs.size() > _max_len.at(chan)) {
std::string error_msg = "Too many window coefficients specified (max "
@@ -49,7 +49,7 @@ public:
_program_coefficients(chan);
}
- std::vector<int16_t> get_coefficients(const size_t chan) const
+ std::vector<int16_t> get_coefficients(const size_t chan) const override
{
return _coeffs.at(chan);
}