aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/rfnoc
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc')
-rw-r--r--host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp2
-rw-r--r--host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp222
-rw-r--r--host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp12
-rw-r--r--host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp6
-rw-r--r--host/lib/include/uhdlib/rfnoc/rfnoc_rx_streamer.hpp14
-rw-r--r--host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp14
6 files changed, 136 insertions, 134 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp b/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp
index ecedd09ca..b16b5d03b 100644
--- a/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp
+++ b/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp
@@ -28,7 +28,7 @@ public:
//! The function to call when sending a packet to a remote device
using send_fn_t = std::function<void(const chdr::ctrl_payload&, double)>;
- virtual ~ctrlport_endpoint() = 0;
+ ~ctrlport_endpoint() override = 0;
//! Handles an incoming control packet (request and response)
//
diff --git a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp
index 2a93fbfa5..ba11e50bf 100644
--- a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp
+++ b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp
@@ -38,151 +38,153 @@ public:
*************************************************************************/
radio_control_impl(make_args_ptr make_args);
- virtual void deinit() {}
+ void deinit() override {}
- virtual ~radio_control_impl() {}
+ ~radio_control_impl() override {}
/**************************************************************************
* Stream control API calls
*************************************************************************/
- 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;
- void enable_rx_timestamps(const bool enable, const size_t chan);
+ void enable_rx_timestamps(const bool enable, const size_t chan) override;
/**************************************************************************
* Rate-Related API Calls
*************************************************************************/
- virtual double set_rate(const double rate);
- virtual double get_rate() const;
- virtual meta_range_t get_rate_range() const;
+ double set_rate(const double rate) override;
+ double get_rate() const override;
+ meta_range_t get_rate_range() const override;
/**************************************************************************
* RF-specific API calls
*************************************************************************/
// Setters
- virtual void set_tx_antenna(const std::string& ant, const size_t chan);
- virtual void set_rx_antenna(const std::string& ant, const size_t chan);
- virtual double set_tx_frequency(const double freq, const size_t chan);
- virtual double set_rx_frequency(const double freq, const size_t chan);
- virtual void set_tx_tune_args(const uhd::device_addr_t&, const size_t chan);
- virtual void set_rx_tune_args(const uhd::device_addr_t&, const size_t chan);
- virtual double set_tx_gain(const double gain, const size_t chan);
- virtual double set_tx_gain(
- const double gain, const std::string& name, const size_t chan);
- virtual double set_rx_gain(const double gain, const size_t chan);
- virtual double set_rx_gain(
- const double gain, const std::string& name, const size_t chan);
- virtual void set_rx_agc(const bool enable, const size_t chan);
- virtual double set_tx_bandwidth(const double bandwidth, const size_t chan);
- virtual double set_rx_bandwidth(const double bandwidth, const size_t chan);
- virtual void set_tx_gain_profile(const std::string& profile, const size_t chan);
- virtual void set_rx_gain_profile(const std::string& profile, const size_t chan);
- virtual void set_rx_power_reference(const double power_dbm, const size_t chan);
- virtual void set_tx_power_reference(const double power_dbm, const size_t chan);
+ void set_tx_antenna(const std::string& ant, const size_t chan) override;
+ void set_rx_antenna(const std::string& ant, const size_t chan) override;
+ double set_tx_frequency(const double freq, const size_t chan) override;
+ double set_rx_frequency(const double freq, const size_t chan) override;
+ void set_tx_tune_args(const uhd::device_addr_t&, const size_t chan) override;
+ void set_rx_tune_args(const uhd::device_addr_t&, const size_t chan) override;
+ double set_tx_gain(const double gain, const size_t chan) override;
+ double set_tx_gain(
+ const double gain, const std::string& name, const size_t chan) override;
+ double set_rx_gain(const double gain, const size_t chan) override;
+ double set_rx_gain(
+ const double gain, const std::string& name, const size_t chan) override;
+ void set_rx_agc(const bool enable, const size_t chan) override;
+ double set_tx_bandwidth(const double bandwidth, const size_t chan) override;
+ double set_rx_bandwidth(const double bandwidth, const size_t chan) override;
+ void set_tx_gain_profile(const std::string& profile, const size_t chan) override;
+ void set_rx_gain_profile(const std::string& profile, const size_t chan) override;
+ void set_rx_power_reference(const double power_dbm, const size_t chan) override;
+ void set_tx_power_reference(const double power_dbm, const size_t chan) override;
// Getters
- virtual std::string get_tx_antenna(const size_t chan) const;
- virtual std::string get_rx_antenna(const size_t chan) const;
- virtual std::vector<std::string> get_tx_antennas(const size_t chan) const;
- virtual std::vector<std::string> get_rx_antennas(const size_t chan) const;
- virtual double get_tx_frequency(const size_t);
- virtual double get_rx_frequency(const size_t);
- virtual uhd::freq_range_t get_tx_frequency_range(const size_t chan) const;
- virtual uhd::freq_range_t get_rx_frequency_range(const size_t chan) const;
- virtual std::vector<std::string> get_tx_gain_names(const size_t) const;
- virtual std::vector<std::string> get_rx_gain_names(const size_t) const;
- virtual double get_tx_gain(const size_t);
- virtual double get_tx_gain(const std::string&, size_t);
- virtual double get_rx_gain(const size_t);
- virtual double get_rx_gain(const std::string&, size_t);
- virtual uhd::gain_range_t get_tx_gain_range(const size_t) const;
- virtual uhd::gain_range_t get_tx_gain_range(const std::string&, const size_t) const;
- virtual uhd::gain_range_t get_rx_gain_range(const size_t) const;
- virtual uhd::gain_range_t get_rx_gain_range(const std::string&, const size_t) const;
- virtual std::vector<std::string> get_tx_gain_profile_names(const size_t chan) const;
- virtual std::vector<std::string> get_rx_gain_profile_names(const size_t chan) const;
- virtual std::string get_tx_gain_profile(const size_t chan) const;
- virtual std::string get_rx_gain_profile(const size_t chan) const;
- virtual double get_tx_bandwidth(const size_t);
- virtual double get_rx_bandwidth(const size_t);
- virtual meta_range_t get_tx_bandwidth_range(size_t chan) const;
- virtual meta_range_t get_rx_bandwidth_range(size_t chan) const;
- virtual bool has_rx_power_reference(const size_t chan);
- virtual bool has_tx_power_reference(const size_t chan);
- virtual double get_rx_power_reference(const size_t chan);
- virtual double get_tx_power_reference(const size_t chan);
- virtual std::vector<std::string> get_rx_power_ref_keys(const size_t);
- virtual std::vector<std::string> get_tx_power_ref_keys(const size_t);
- virtual meta_range_t get_rx_power_range(const size_t chan);
- virtual meta_range_t get_tx_power_range(const size_t chan);
+ std::string get_tx_antenna(const size_t chan) const override;
+ std::string get_rx_antenna(const size_t chan) const override;
+ std::vector<std::string> get_tx_antennas(const size_t chan) const override;
+ std::vector<std::string> get_rx_antennas(const size_t chan) const override;
+ double get_tx_frequency(const size_t) override;
+ double get_rx_frequency(const size_t) override;
+ uhd::freq_range_t get_tx_frequency_range(const size_t chan) const override;
+ uhd::freq_range_t get_rx_frequency_range(const size_t chan) const override;
+ std::vector<std::string> get_tx_gain_names(const size_t) const override;
+ std::vector<std::string> get_rx_gain_names(const size_t) const override;
+ double get_tx_gain(const size_t) override;
+ double get_tx_gain(const std::string&, size_t) override;
+ double get_rx_gain(const size_t) override;
+ double get_rx_gain(const std::string&, size_t) override;
+ uhd::gain_range_t get_tx_gain_range(const size_t) const override;
+ uhd::gain_range_t get_tx_gain_range(const std::string&, const size_t) const override;
+ uhd::gain_range_t get_rx_gain_range(const size_t) const override;
+ uhd::gain_range_t get_rx_gain_range(const std::string&, const size_t) const override;
+ std::vector<std::string> get_tx_gain_profile_names(const size_t chan) const override;
+ std::vector<std::string> get_rx_gain_profile_names(const size_t chan) const override;
+ std::string get_tx_gain_profile(const size_t chan) const override;
+ std::string get_rx_gain_profile(const size_t chan) const override;
+ double get_tx_bandwidth(const size_t) override;
+ double get_rx_bandwidth(const size_t) override;
+ meta_range_t get_tx_bandwidth_range(size_t chan) const override;
+ meta_range_t get_rx_bandwidth_range(size_t chan) const override;
+ bool has_rx_power_reference(const size_t chan) override;
+ bool has_tx_power_reference(const size_t chan) override;
+ double get_rx_power_reference(const size_t chan) override;
+ double get_tx_power_reference(const size_t chan) override;
+ std::vector<std::string> get_rx_power_ref_keys(const size_t) override;
+ std::vector<std::string> get_tx_power_ref_keys(const size_t) override;
+ meta_range_t get_rx_power_range(const size_t chan) override;
+ meta_range_t get_tx_power_range(const size_t chan) override;
/**************************************************************************
* LO Controls
*************************************************************************/
- virtual std::vector<std::string> get_rx_lo_names(const size_t chan) const;
- virtual std::vector<std::string> get_rx_lo_sources(
- const std::string& name, const size_t chan) const;
- virtual freq_range_t get_rx_lo_freq_range(
- const std::string& name, const size_t chan) const;
- virtual void set_rx_lo_source(
- const std::string& src, const std::string& name, const size_t chan);
- virtual const std::string get_rx_lo_source(
- const std::string& name, const size_t chan);
- virtual void set_rx_lo_export_enabled(
- bool enabled, const std::string& name, const size_t chan);
- virtual bool get_rx_lo_export_enabled(
- const std::string& name, const size_t chan) const;
- virtual double set_rx_lo_freq(
- double freq, const std::string& name, const size_t chan);
- virtual double get_rx_lo_freq(const std::string& name, const size_t chan);
- virtual std::vector<std::string> get_tx_lo_names(const size_t chan) const;
- virtual std::vector<std::string> get_tx_lo_sources(
- const std::string& name, const size_t chan);
- virtual freq_range_t get_tx_lo_freq_range(const std::string& name, const size_t chan);
- virtual void set_tx_lo_source(
- const std::string& src, const std::string& name, const size_t chan);
- virtual const std::string get_tx_lo_source(
- const std::string& name, const size_t chan);
- virtual void set_tx_lo_export_enabled(
- const bool enabled, const std::string& name, const size_t chan);
- virtual bool get_tx_lo_export_enabled(const std::string& name, const size_t chan);
- virtual double set_tx_lo_freq(
- const double freq, const std::string& name, const size_t chan);
- virtual double get_tx_lo_freq(const std::string& name, const size_t chan);
+ std::vector<std::string> get_rx_lo_names(const size_t chan) const override;
+ std::vector<std::string> get_rx_lo_sources(
+ const std::string& name, const size_t chan) const override;
+ freq_range_t get_rx_lo_freq_range(
+ const std::string& name, const size_t chan) const override;
+ void set_rx_lo_source(
+ const std::string& src, const std::string& name, const size_t chan) override;
+ const std::string get_rx_lo_source(
+ const std::string& name, const size_t chan) override;
+ void set_rx_lo_export_enabled(
+ bool enabled, const std::string& name, const size_t chan) override;
+ bool get_rx_lo_export_enabled(
+ const std::string& name, const size_t chan) const override;
+ double set_rx_lo_freq(
+ double freq, const std::string& name, const size_t chan) override;
+ double get_rx_lo_freq(const std::string& name, const size_t chan) override;
+ std::vector<std::string> get_tx_lo_names(const size_t chan) const override;
+ std::vector<std::string> get_tx_lo_sources(
+ const std::string& name, const size_t chan) override;
+ freq_range_t get_tx_lo_freq_range(
+ const std::string& name, const size_t chan) override;
+ void set_tx_lo_source(
+ const std::string& src, const std::string& name, const size_t chan) override;
+ const std::string get_tx_lo_source(
+ const std::string& name, const size_t chan) override;
+ void set_tx_lo_export_enabled(
+ const bool enabled, const std::string& name, const size_t chan) override;
+ bool get_tx_lo_export_enabled(const std::string& name, const size_t chan) override;
+ double set_tx_lo_freq(
+ const double freq, const std::string& name, const size_t chan) override;
+ double get_tx_lo_freq(const std::string& name, const size_t chan) override;
/**************************************************************************
* Calibration-Related API Calls
*************************************************************************/
- virtual void set_tx_dc_offset(const std::complex<double>& offset, size_t chan);
- virtual meta_range_t get_tx_dc_offset_range(size_t chan) const;
- virtual void set_tx_iq_balance(const std::complex<double>& correction, size_t chan);
- virtual void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS);
- virtual void set_rx_dc_offset(const std::complex<double>& offset, size_t chan);
- virtual meta_range_t get_rx_dc_offset_range(size_t chan) const;
- virtual void set_rx_iq_balance(const bool enb, size_t chan);
- virtual void set_rx_iq_balance(const std::complex<double>& correction, size_t chan);
+ void set_tx_dc_offset(const std::complex<double>& offset, size_t chan) override;
+ meta_range_t get_tx_dc_offset_range(size_t chan) const override;
+ void set_tx_iq_balance(const std::complex<double>& correction, size_t chan) override;
+ void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS) override;
+ void set_rx_dc_offset(const std::complex<double>& offset, size_t chan) override;
+ meta_range_t get_rx_dc_offset_range(size_t chan) const override;
+ void set_rx_iq_balance(const bool enb, size_t chan) override;
+ void set_rx_iq_balance(const std::complex<double>& correction, size_t chan) override;
/**************************************************************************
* GPIO Controls
*************************************************************************/
- virtual std::vector<std::string> get_gpio_banks() const;
- virtual void set_gpio_attr(
- const std::string& bank, const std::string& attr, const uint32_t value);
- virtual uint32_t get_gpio_attr(const std::string& bank, const std::string& attr);
+ std::vector<std::string> get_gpio_banks() const override;
+ void set_gpio_attr(
+ const std::string& bank, const std::string& attr, const uint32_t value) override;
+ uint32_t get_gpio_attr(const std::string& bank, const std::string& attr) override;
/**************************************************************************
* Sensor API
*************************************************************************/
- virtual std::vector<std::string> get_rx_sensor_names(size_t chan) const;
- virtual uhd::sensor_value_t get_rx_sensor(const std::string& name, size_t chan);
- virtual std::vector<std::string> get_tx_sensor_names(size_t chan) const;
- virtual uhd::sensor_value_t get_tx_sensor(const std::string& name, size_t chan);
+ std::vector<std::string> get_rx_sensor_names(size_t chan) const override;
+ uhd::sensor_value_t get_rx_sensor(const std::string& name, size_t chan) override;
+ std::vector<std::string> get_tx_sensor_names(size_t chan) const override;
+ uhd::sensor_value_t get_tx_sensor(const std::string& name, size_t chan) override;
/**************************************************************************
* Identification API
*************************************************************************/
- virtual std::string get_fe_name(
- const size_t chan, const uhd::direction_t direction) const
+ std::string get_fe_name(
+ const size_t chan, const uhd::direction_t direction) const override
{
return get_dboard_fe_from_chan(chan, direction);
}
@@ -190,8 +192,8 @@ public:
/**************************************************************************
* EEPROM API
*************************************************************************/
- virtual void set_db_eeprom(const uhd::eeprom_map_t& db_eeprom);
- virtual uhd::eeprom_map_t get_db_eeprom();
+ void set_db_eeprom(const uhd::eeprom_map_t& db_eeprom) override;
+ uhd::eeprom_map_t get_db_eeprom() override;
/***********************************************************************
* Reg Map
diff --git a/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp b/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp
index 5e5d06288..3eacc7590 100644
--- a/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp
+++ b/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp
@@ -76,32 +76,32 @@ public:
// nop
}
- void poke32(const uhd::wb_iface::wb_addr_type addr, const uint32_t data)
+ void poke32(const uhd::wb_iface::wb_addr_type addr, const uint32_t data) override
{
_regs_accessor().poke32(_base_offset + addr, data, _time_accessor());
}
- void poke64(const uhd::wb_iface::wb_addr_type addr, const uint64_t data)
+ void poke64(const uhd::wb_iface::wb_addr_type addr, const uint64_t data) override
{
_regs_accessor().poke64(_base_offset + addr, data, _time_accessor());
}
- uint32_t peek32(const uhd::wb_iface::wb_addr_type addr)
+ uint32_t peek32(const uhd::wb_iface::wb_addr_type addr) override
{
return _regs_accessor().peek32(_base_offset + addr, _time_accessor());
}
- uint64_t peek64(const uhd::wb_iface::wb_addr_type addr)
+ uint64_t peek64(const uhd::wb_iface::wb_addr_type addr) override
{
return _regs_accessor().peek64(_base_offset + addr, _time_accessor());
}
- uhd::time_spec_t get_time(void)
+ uhd::time_spec_t get_time(void) override
{
return _time_accessor();
}
- void set_time(const uhd::time_spec_t& t)
+ void set_time(const uhd::time_spec_t& t) override
{
_time_setter(t);
}
diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp
index 4b2479ae5..de06c672f 100644
--- a/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp
+++ b/host/lib/include/uhdlib/rfnoc/rfnoc_device.hpp
@@ -39,19 +39,19 @@ public:
}
//! Directly getting a streamer no longer supported
- uhd::rx_streamer::sptr get_rx_stream(const stream_args_t&)
+ uhd::rx_streamer::sptr get_rx_stream(const stream_args_t&) override
{
UHD_THROW_INVALID_CODE_PATH();
}
//! Directly getting a streamer no longer supported
- uhd::tx_streamer::sptr get_tx_stream(const stream_args_t&)
+ uhd::tx_streamer::sptr get_tx_stream(const stream_args_t&) override
{
UHD_THROW_INVALID_CODE_PATH();
}
//! Directly getting async messages no longer supported
- bool recv_async_msg(uhd::async_metadata_t&, double)
+ bool recv_async_msg(uhd::async_metadata_t&, double) override
{
UHD_THROW_INVALID_CODE_PATH();
}
diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_rx_streamer.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_rx_streamer.hpp
index 9cda81785..ca569e338 100644
--- a/host/lib/include/uhdlib/rfnoc/rfnoc_rx_streamer.hpp
+++ b/host/lib/include/uhdlib/rfnoc/rfnoc_rx_streamer.hpp
@@ -38,7 +38,7 @@ public:
/*! Destructor
*/
- ~rfnoc_rx_streamer();
+ ~rfnoc_rx_streamer() override;
/*! Returns a unique identifier string for this node. In every RFNoC graph,
* no two nodes cannot have the same ID. Returns a string in the form of
@@ -46,13 +46,13 @@ public:
*
* \returns The unique ID as a string
*/
- std::string get_unique_id() const;
+ std::string get_unique_id() const override;
/*! Returns the number of input ports for this block.
*
* \return noc_id The number of ports
*/
- size_t get_num_input_ports() const;
+ size_t get_num_input_ports() const override;
/*! Returns the number of output ports for this block.
*
@@ -60,13 +60,13 @@ public:
*
* \return noc_id The number of ports
*/
- size_t get_num_output_ports() const;
+ size_t get_num_output_ports() const override;
/*! Implementation of rx_streamer API method
*
* \param stream_cmd the stream command to issue
*/
- void issue_stream_cmd(const stream_cmd_t& stream_cmd);
+ void issue_stream_cmd(const stream_cmd_t& stream_cmd) override;
/*! Returns stream args provided at creation
*
@@ -83,7 +83,7 @@ public:
* \returns true if the block can deal with this configuration
*/
bool check_topology(const std::vector<size_t>& connected_inputs,
- const std::vector<size_t>& connected_outputs);
+ const std::vector<size_t>& connected_outputs) override;
/*! Connects a channel to the streamer port
*
@@ -92,7 +92,7 @@ public:
* \param channel The streamer channel to which to connect
* \param xport The transport for the specified channel
*/
- void connect_channel(const size_t channel, chdr_rx_data_xport::uptr xport);
+ void connect_channel(const size_t channel, chdr_rx_data_xport::uptr xport) override;
private:
void _register_props(const size_t chan, const std::string& otw_format);
diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp
index 5d741a844..a071d7248 100644
--- a/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp
+++ b/host/lib/include/uhdlib/rfnoc/rfnoc_tx_streamer.hpp
@@ -38,7 +38,7 @@ public:
/*! Destructor
*/
- ~rfnoc_tx_streamer();
+ ~rfnoc_tx_streamer() override;
/*! Returns a unique identifier string for this node. In every RFNoC graph,
* no two nodes cannot have the same ID. Returns a string in the form of
@@ -46,7 +46,7 @@ public:
*
* \returns The unique ID as a string
*/
- std::string get_unique_id() const;
+ std::string get_unique_id() const override;
/*! Returns the number of input ports for this block.
*
@@ -54,13 +54,13 @@ public:
*
* \return noc_id The number of ports
*/
- size_t get_num_input_ports() const;
+ size_t get_num_input_ports() const override;
/*! Returns the number of output ports for this block.
*
* \return noc_id The number of ports
*/
- size_t get_num_output_ports() const;
+ size_t get_num_output_ports() const override;
/*! Returns stream args provided at creation
*
@@ -77,7 +77,7 @@ public:
* \returns true if the block can deal with this configuration
*/
bool check_topology(const std::vector<size_t>& connected_inputs,
- const std::vector<size_t>& connected_outputs);
+ const std::vector<size_t>& connected_outputs) override;
/*! Connects a channel to the streamer port
*
@@ -86,7 +86,7 @@ public:
* \param channel The streamer channel to which to connect
* \param xport The transport for the specified channel
*/
- void connect_channel(const size_t channel, chdr_tx_data_xport::uptr xport);
+ void connect_channel(const size_t channel, chdr_tx_data_xport::uptr xport) override;
/*! Receive an asynchronous message from this tx stream
*
@@ -96,7 +96,7 @@ public:
* \param timeout the timeout in seconds to wait for a message
* \return true when the async_metadata is valid, false for timeout
*/
- bool recv_async_msg(uhd::async_metadata_t& async_metadata, double timeout);
+ bool recv_async_msg(uhd::async_metadata_t& async_metadata, double timeout) override;
private:
void _register_props(const size_t chan, const std::string& otw_format);