diff options
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/async_msg.hpp | 126 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/block_container.hpp | 5 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/chdr_ctrl_xport.hpp | 4 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/chdr_packet.hpp | 4 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/chdr_types.hpp | 6 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/clock_iface.hpp | 2 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp | 2 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/device_id.hpp | 1 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/epid_allocator.hpp | 4 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/graph.hpp | 12 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp | 3 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/node_accessor.hpp | 3 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp | 87 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp | 13 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/rpc_block_ctrl.hpp | 10 |
15 files changed, 148 insertions, 134 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/async_msg.hpp b/host/lib/include/uhdlib/rfnoc/async_msg.hpp index 8abdb27b8..988801dc3 100644 --- a/host/lib/include/uhdlib/rfnoc/async_msg.hpp +++ b/host/lib/include/uhdlib/rfnoc/async_msg.hpp @@ -8,78 +8,80 @@ #define INCLUDED_UHD_RFNOC_ASYNC_MSG_HPP #include <uhd/config.hpp> -#include <uhd/types/time_spec.hpp> #include <uhd/types/sid.hpp> +#include <uhd/types/time_spec.hpp> #include <vector> namespace uhd { namespace rfnoc { - /*! - * Async message. - */ - struct async_msg_t - { - //! Has time? - bool has_time_spec; - - //! When the async event occurred. - time_spec_t time_spec; +/*! + * Async message. + */ +struct async_msg_t +{ + //! Has time? + bool has_time_spec; - /*! - * The type of event for a receive async message call. - */ - enum event_code_t { - //! Nothing happened. - EVENT_CODE_NONE = 0x00, - //! A burst was successfully transmitted. - EVENT_CODE_BURST_ACK = 0x1, - //! An internal send buffer has emptied. - EVENT_CODE_UNDERFLOW = 0x2, - //! Same. We use the terms 'underrun' and 'underflow' interchangeably. - EVENT_CODE_UNDERRUN = EVENT_CODE_UNDERFLOW, - //! Packet loss or reordering between source and destination, - // at start of burst (i.e. the first packet after an EOB packet - // had the wrong sequence number). - EVENT_CODE_SEQ_ERROR = 0x4, - //! Like EVENT_CODE_SEQ_ERROR, but within a burst (i.e., any packet - // other than the first packet had an error) - EVENT_CODE_SEQ_ERROR_IN_BURST = 0x20, - //! Data packet had time that was late. - EVENT_CODE_LATE_DATA_ERROR = 0x8, - //! Command packet had time that was late. - EVENT_CODE_LATE_CMD_ERROR = 0x8, - //! Packet is carrying arbitrary payload - EVENT_CODE_USER_PAYLOAD = 0x40, + //! When the async event occurred. + time_spec_t time_spec; - // TODO: For now, we combine legacy TX and RX messages. - EVENT_CODE_OVERFLOW = 0x8, - EVENT_CODE_OVERRUN = EVENT_CODE_OVERFLOW, - //! Multi-channel alignment failed. - EVENT_CODE_ALIGNMENT = 0xc, - //! The packet could not be parsed. - EVENT_CODE_BAD_PACKET = 0xf - } event_code; + /*! + * The type of event for a receive async message call. + */ + enum event_code_t { + //! Nothing happened. + EVENT_CODE_NONE = 0x00, + //! A burst was successfully transmitted. + EVENT_CODE_BURST_ACK = 0x1, + //! An internal send buffer has emptied. + EVENT_CODE_UNDERFLOW = 0x2, + //! Same. We use the terms 'underrun' and 'underflow' interchangeably. + EVENT_CODE_UNDERRUN = EVENT_CODE_UNDERFLOW, + //! Packet loss or reordering between source and destination, + // at start of burst (i.e. the first packet after an EOB packet + // had the wrong sequence number). + EVENT_CODE_SEQ_ERROR = 0x4, + //! Like EVENT_CODE_SEQ_ERROR, but within a burst (i.e., any packet + // other than the first packet had an error) + EVENT_CODE_SEQ_ERROR_IN_BURST = 0x20, + //! Data packet had time that was late. + EVENT_CODE_LATE_DATA_ERROR = 0x8, + //! Command packet had time that was late. + EVENT_CODE_LATE_CMD_ERROR = 0x8, + //! Packet is carrying arbitrary payload + EVENT_CODE_USER_PAYLOAD = 0x40, - /*! - * A special payload populated by custom FPGA fabric. - */ - std::vector<uint32_t> payload; + // TODO: For now, we combine legacy TX and RX messages. + EVENT_CODE_OVERFLOW = 0x8, + EVENT_CODE_OVERRUN = EVENT_CODE_OVERFLOW, + //! Multi-channel alignment failed. + EVENT_CODE_ALIGNMENT = 0xc, + //! The packet could not be parsed. + EVENT_CODE_BAD_PACKET = 0xf + } event_code; - //! The SID on the async message packet - uint32_t sid; + /*! + * A special payload populated by custom FPGA fabric. + */ + std::vector<uint32_t> payload; - async_msg_t(const size_t payload_size=4) : - has_time_spec(false), - time_spec(0.0), - event_code(EVENT_CODE_NONE), - payload(payload_size, 0), - sid(0) - {} - //! Return the the id of src block that throw eror - uint32_t get_error_src() const { return sid_t(sid).get_src_endpoint(); } - }; + //! The SID on the async message packet + uint32_t sid; + async_msg_t(const size_t payload_size = 4) + : has_time_spec(false) + , time_spec(0.0) + , event_code(EVENT_CODE_NONE) + , payload(payload_size, 0) + , sid(0) + { } -} -#endif /* INCLUDED_UHD_RFNOC_ASYNC_MSG_HPP */ + //! Return the the id of src block that throw eror + uint32_t get_error_src() const + { + return sid_t(sid).get_src_endpoint(); + } +}; +}} // namespace uhd::rfnoc +#endif /* INCLUDED_UHD_RFNOC_ASYNC_MSG_HPP */ diff --git a/host/lib/include/uhdlib/rfnoc/block_container.hpp b/host/lib/include/uhdlib/rfnoc/block_container.hpp index 3c75892a4..800902d06 100644 --- a/host/lib/include/uhdlib/rfnoc/block_container.hpp +++ b/host/lib/include/uhdlib/rfnoc/block_container.hpp @@ -7,10 +7,10 @@ #ifndef INCLUDED_LIBUHD_BLOCK_CONTAINER_HPP #define INCLUDED_LIBUHD_BLOCK_CONTAINER_HPP -#include <uhd/rfnoc/noc_block_base.hpp> #include <uhd/rfnoc/block_id.hpp> -#include <boost/units/detail/utility.hpp> +#include <uhd/rfnoc/noc_block_base.hpp> #include <unordered_set> +#include <boost/units/detail/utility.hpp> #include <mutex> #include <vector> @@ -64,4 +64,3 @@ private: }}} /* namespace uhd::rfnoc::detail */ #endif /* INCLUDED_LIBUHD_BLOCK_CONTAINER_HPP */ - diff --git a/host/lib/include/uhdlib/rfnoc/chdr_ctrl_xport.hpp b/host/lib/include/uhdlib/rfnoc/chdr_ctrl_xport.hpp index d4564e935..d32ab7222 100644 --- a/host/lib/include/uhdlib/rfnoc/chdr_ctrl_xport.hpp +++ b/host/lib/include/uhdlib/rfnoc/chdr_ctrl_xport.hpp @@ -136,8 +136,8 @@ public: private: chdr_ctrl_xport(const chdr_ctrl_xport&) = delete; - void _release_cb(uhd::transport::frame_buff::uptr buff, - uhd::transport::recv_link_if* recv_link); + void _release_cb( + uhd::transport::frame_buff::uptr buff, uhd::transport::recv_link_if* recv_link); bool _ctrl_recv_cb(uhd::transport::frame_buff::uptr& buff); diff --git a/host/lib/include/uhdlib/rfnoc/chdr_packet.hpp b/host/lib/include/uhdlib/rfnoc/chdr_packet.hpp index cc729de6c..355c15da2 100644 --- a/host/lib/include/uhdlib/rfnoc/chdr_packet.hpp +++ b/host/lib/include/uhdlib/rfnoc/chdr_packet.hpp @@ -120,8 +120,8 @@ public: * \param num_mdata The number of metadata words for calculation * \return The offset of the payload in a packet with the given params */ - virtual size_t calculate_payload_offset(const packet_type_t pkt_type, - const uint8_t num_mdata = 0) const = 0; + virtual size_t calculate_payload_offset( + const packet_type_t pkt_type, const uint8_t num_mdata = 0) const = 0; //! Shortcut to return the const metadata pointer cast as a specific type template <typename data_t> diff --git a/host/lib/include/uhdlib/rfnoc/chdr_types.hpp b/host/lib/include/uhdlib/rfnoc/chdr_types.hpp index 393996c6b..25a7c8905 100644 --- a/host/lib/include/uhdlib/rfnoc/chdr_types.hpp +++ b/host/lib/include/uhdlib/rfnoc/chdr_types.hpp @@ -209,8 +209,10 @@ private: } template <typename field_t> - static inline uint64_t set_field( - const uint64_t old_val, const field_t field, const size_t offset, const size_t width) + static inline uint64_t set_field(const uint64_t old_val, + const field_t field, + const size_t offset, + const size_t width) { return (old_val & ~(mask(width) << offset)) | ((static_cast<uint64_t>(field) & mask(width)) << offset); diff --git a/host/lib/include/uhdlib/rfnoc/clock_iface.hpp b/host/lib/include/uhdlib/rfnoc/clock_iface.hpp index 06e54e67c..1a9f18bd5 100644 --- a/host/lib/include/uhdlib/rfnoc/clock_iface.hpp +++ b/host/lib/include/uhdlib/rfnoc/clock_iface.hpp @@ -11,8 +11,8 @@ #include <uhd/exception.hpp> #include <uhd/utils/log.hpp> #include <atomic> -#include <string> #include <memory> +#include <string> namespace uhd { namespace rfnoc { diff --git a/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp b/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp index 8f54932e5..11c456775 100644 --- a/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp +++ b/host/lib/include/uhdlib/rfnoc/ctrlport_endpoint.hpp @@ -8,8 +8,8 @@ #define INCLUDED_LIBUHD_RFNOC_CTRLPORT_ENDPOINT_HPP #include <uhd/rfnoc/register_iface.hpp> -#include <uhdlib/rfnoc/clock_iface.hpp> #include <uhdlib/rfnoc/chdr_types.hpp> +#include <uhdlib/rfnoc/clock_iface.hpp> #include <memory> namespace uhd { namespace rfnoc { diff --git a/host/lib/include/uhdlib/rfnoc/device_id.hpp b/host/lib/include/uhdlib/rfnoc/device_id.hpp index d4cecc840..c86dd04df 100644 --- a/host/lib/include/uhdlib/rfnoc/device_id.hpp +++ b/host/lib/include/uhdlib/rfnoc/device_id.hpp @@ -19,4 +19,3 @@ device_id_t allocate_device_id(); }} /* namespace uhd::rfnoc */ #endif /* INCLUDED_LIBUHD_DEVICE_ID_HPP */ - diff --git a/host/lib/include/uhdlib/rfnoc/epid_allocator.hpp b/host/lib/include/uhdlib/rfnoc/epid_allocator.hpp index 8306b98a4..482cb1dac 100644 --- a/host/lib/include/uhdlib/rfnoc/epid_allocator.hpp +++ b/host/lib/include/uhdlib/rfnoc/epid_allocator.hpp @@ -43,8 +43,8 @@ public: * \param chdr_ctrl_xport The ctrl xport to use for initializing the SEP/EPID * \return The allocated EPID */ - sep_id_t allocate_epid(const sep_addr_t& addr, mgmt::mgmt_portal& mgmt_portal, - chdr_ctrl_xport& xport); + sep_id_t allocate_epid( + const sep_addr_t& addr, mgmt::mgmt_portal& mgmt_portal, chdr_ctrl_xport& xport); /*! \brief Get a pre-allocated EPID. Throws an exception is not allocated * diff --git a/host/lib/include/uhdlib/rfnoc/graph.hpp b/host/lib/include/uhdlib/rfnoc/graph.hpp index c7b06d636..e54c2fe7e 100644 --- a/host/lib/include/uhdlib/rfnoc/graph.hpp +++ b/host/lib/include/uhdlib/rfnoc/graph.hpp @@ -40,11 +40,11 @@ public: */ void connect(node_ref_t src_node, node_ref_t dst_node, graph_edge_t edge_info); - //void disconnect(node_ref_t src_node, - //node_ref_t dst_node, - //const size_t src_port, - //const size_t dst_port); - // + // void disconnect(node_ref_t src_node, + // node_ref_t dst_node, + // const size_t src_port, + // const size_t dst_port); + // /*! Commit graph and run initial checks * @@ -138,7 +138,7 @@ private: }; using ForwardEdgePredicate = ForwardBackwardEdgePredicate<true>; - using BackEdgePredicate = ForwardBackwardEdgePredicate<false>; + using BackEdgePredicate = ForwardBackwardEdgePredicate<false>; //! Vertex predicate, only selects nodes with dirty props struct DirtyNodePredicate; diff --git a/host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp b/host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp index 9251634bd..ecb90e4e9 100644 --- a/host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp +++ b/host/lib/include/uhdlib/rfnoc/mgmt_portal.hpp @@ -72,8 +72,7 @@ public: // \param addr The physical address of the stream endpoint // \param epid The endpoint ID to assign to this endpoint // - virtual void register_endpoint( - const sep_addr_t& addr, const sep_id_t& epid) = 0; + virtual void register_endpoint(const sep_addr_t& addr, const sep_id_t& epid) = 0; //! Get information about a discovered (reachable) stream endpoint // diff --git a/host/lib/include/uhdlib/rfnoc/node_accessor.hpp b/host/lib/include/uhdlib/rfnoc/node_accessor.hpp index 517d2b517..bd4af96f4 100644 --- a/host/lib/include/uhdlib/rfnoc/node_accessor.hpp +++ b/host/lib/include/uhdlib/rfnoc/node_accessor.hpp @@ -93,7 +93,8 @@ public: * * This will call node_t::receive_action() (see that for details). */ - void send_action(node_t* node, const res_source_info& port_info, action_info::sptr action) + void send_action( + node_t* node, const res_source_info& port_info, action_info::sptr action) { node->receive_action(port_info, action); } diff --git a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp index 4864707e1..1a78d7cab 100644 --- a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp +++ b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp @@ -52,16 +52,18 @@ public: * 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 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_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 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); @@ -118,8 +120,7 @@ public: 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 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( @@ -147,9 +148,8 @@ public: * 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 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); /************************************************************************** @@ -185,16 +185,20 @@ public: * * See rfnoc_block_radio_regs.vh for details */ - struct regmap { - static const uint32_t REG_COMPAT_NUM = 0x00; // Compatibility number register offset - static const uint32_t REG_RADIO_WIDTH = 0x1000 + 0x04; // Upper 16 bits is sample width, lower 16 bits is NSPC + struct regmap + { + static const uint32_t REG_COMPAT_NUM = + 0x00; // Compatibility number register offset + static const uint32_t REG_RADIO_WIDTH = + 0x1000 + 0x04; // Upper 16 bits is sample width, lower 16 bits is NSPC static const uint32_t RADIO_BASE_ADDR = 0x1000; static const uint32_t REG_CHAN_OFFSET = 128; - static const uint32_t RADIO_ADDR_W = 7; // Address space size per radio + static const uint32_t RADIO_ADDR_W = 7; // Address space size per radio // General Radio Registers - static const uint32_t REG_LOOPBACK_EN = 0x00; // Loopback enable (connect Tx output to Rx input) + static const uint32_t REG_LOOPBACK_EN = + 0x00; // Loopback enable (connect Tx output to Rx input) // Note on the RX and TX Control Registers: These are per-channel, // which means the values here are offsets. The base address per @@ -202,35 +206,48 @@ public: // channel index. // RX Control Registers - static const uint32_t REG_RX_STATUS = 0x10; // Status of Rx radio - static const uint32_t REG_RX_CMD = 0x14; // The next radio command to execute - static const uint32_t REG_RX_CMD_NUM_WORDS_LO = 0x18; // Number of radio words for the next command (low word) - static const uint32_t REG_RX_CMD_NUM_WORDS_HI = 0x1C; // Number of radio words for the next command (high word) - static const uint32_t REG_RX_CMD_TIME_LO = 0x20; // Time for the next command (low word) - static const uint32_t REG_RX_CMD_TIME_HI = 0x24; // Time for the next command (high word) - static const uint32_t REG_RX_MAX_WORDS_PER_PKT = 0x28; // Maximum packet length to build from Rx data - static const uint32_t REG_RX_ERR_PORT = 0x2C; // Port ID for error reporting - static const uint32_t REG_RX_ERR_REM_PORT = 0x30; // Remote port ID for error reporting - static const uint32_t REG_RX_ERR_REM_EPID = 0x34; // Remote EPID (endpoint ID) for error reporting - static const uint32_t REG_RX_ERR_ADDR = 0x38; // Offset to which to write error code (ADDR+0) and time (ADDR+8) - static const uint32_t REG_RX_DATA = 0x3C; - static const uint32_t REG_RX_HAS_TIME = 0x70; // Set to one if radio output packets should have timestamps + static const uint32_t REG_RX_STATUS = 0x10; // Status of Rx radio + static const uint32_t REG_RX_CMD = 0x14; // The next radio command to execute + static const uint32_t REG_RX_CMD_NUM_WORDS_LO = + 0x18; // Number of radio words for the next command (low word) + static const uint32_t REG_RX_CMD_NUM_WORDS_HI = + 0x1C; // Number of radio words for the next command (high word) + static const uint32_t REG_RX_CMD_TIME_LO = + 0x20; // Time for the next command (low word) + static const uint32_t REG_RX_CMD_TIME_HI = + 0x24; // Time for the next command (high word) + static const uint32_t REG_RX_MAX_WORDS_PER_PKT = + 0x28; // Maximum packet length to build from Rx data + static const uint32_t REG_RX_ERR_PORT = 0x2C; // Port ID for error reporting + static const uint32_t REG_RX_ERR_REM_PORT = + 0x30; // Remote port ID for error reporting + static const uint32_t REG_RX_ERR_REM_EPID = + 0x34; // Remote EPID (endpoint ID) for error reporting + static const uint32_t REG_RX_ERR_ADDR = + 0x38; // Offset to which to write error code (ADDR+0) and time (ADDR+8) + static const uint32_t REG_RX_DATA = 0x3C; + static const uint32_t REG_RX_HAS_TIME = + 0x70; // Set to one if radio output packets should have timestamps // TX Control Registers - static const uint32_t REG_TX_IDLE_VALUE = 0x40; // Value to output when transmitter is idle + static const uint32_t REG_TX_IDLE_VALUE = + 0x40; // Value to output when transmitter is idle static const uint32_t REG_TX_ERROR_POLICY = 0x44; // Tx error policy static const uint32_t REG_TX_ERR_PORT = 0x48; // Port ID for error reporting - static const uint32_t REG_TX_ERR_REM_PORT = 0x4C; // Remote port ID for error reporting - static const uint32_t REG_TX_ERR_REM_EPID = 0x50; // Remote EPID (endpoint ID) for error reporting - static const uint32_t REG_TX_ERR_ADDR = 0x54; // Offset to which to write error code (ADDR+0) and time (ADDR+8) - - static const uint32_t RX_CMD_STOP = 0; // Stop acquiring at end of next packet - static const uint32_t RX_CMD_FINITE = 1; // Acquire NUM_SAMPS then stop + static const uint32_t REG_TX_ERR_REM_PORT = + 0x4C; // Remote port ID for error reporting + static const uint32_t REG_TX_ERR_REM_EPID = + 0x50; // Remote EPID (endpoint ID) for error reporting + static const uint32_t REG_TX_ERR_ADDR = + 0x54; // Offset to which to write error code (ADDR+0) and time (ADDR+8) + + static const uint32_t RX_CMD_STOP = 0; // Stop acquiring at end of next packet + static const uint32_t RX_CMD_FINITE = 1; // Acquire NUM_SAMPS then stop static const uint32_t RX_CMD_CONTINUOUS = 2; // Acquire until stopped static const uint32_t RX_CMD_TIMED_POS = 31; - static const uint32_t PERIPH_BASE = 0x80000; + static const uint32_t PERIPH_BASE = 0x80000; static const uint32_t PERIPH_REG_OFFSET = 8; static const uint32_t SWREG_TX_ERR = 0x0000; diff --git a/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp b/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp index 9a5dd39f4..f0eb78be4 100644 --- a/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp +++ b/host/lib/include/uhdlib/rfnoc/reg_iface_adapter.hpp @@ -13,12 +13,11 @@ #include <memory> //! Convenience macro to generate a reg_iface_adapter from within an RFNoC block -#define RFNOC_MAKE_WB_IFACE(BASE_OFFSET, CHAN) \ - std::make_shared<reg_iface_adapter>( \ - [this]() -> register_iface& { return regs(); }, \ - [this, chan = CHAN]() { return get_command_time(chan); }, \ - [this, chan = CHAN]( \ - const uhd::time_spec_t& time) { set_command_time(time, chan); }, \ +#define RFNOC_MAKE_WB_IFACE(BASE_OFFSET, CHAN) \ + std::make_shared<reg_iface_adapter>([this]() -> register_iface& { return regs(); }, \ + [this, chan = CHAN]() { return get_command_time(chan); }, \ + [this, chan = CHAN]( \ + const uhd::time_spec_t& time) { set_command_time(time, chan); }, \ BASE_OFFSET) namespace uhd { namespace rfnoc { @@ -39,7 +38,7 @@ class UHD_API reg_iface_adapter : public uhd::timed_wb_iface public: using regs_accessor_t = std::function<register_iface&(void)>; using time_accessor_t = std::function<uhd::time_spec_t(void)>; - using time_setter_t = std::function<void(const uhd::time_spec_t&)>; + using time_setter_t = std::function<void(const uhd::time_spec_t&)>; /*! * \param regs_accessor Function object to retrieve the register_iface diff --git a/host/lib/include/uhdlib/rfnoc/rpc_block_ctrl.hpp b/host/lib/include/uhdlib/rfnoc/rpc_block_ctrl.hpp index 91091d8c2..5125aef84 100644 --- a/host/lib/include/uhdlib/rfnoc/rpc_block_ctrl.hpp +++ b/host/lib/include/uhdlib/rfnoc/rpc_block_ctrl.hpp @@ -10,8 +10,7 @@ #include <uhd/types/device_addr.hpp> #include <uhdlib/utils/rpc.hpp> -namespace uhd { - namespace rfnoc { +namespace uhd { namespace rfnoc { /*! Abstraction for RPC client * @@ -30,12 +29,9 @@ public: * \param block_args Additional block arguments */ virtual void set_rpc_client( - uhd::rpc_client::sptr rpcc, - const uhd::device_addr_t &block_args - ) = 0; - + uhd::rpc_client::sptr rpcc, const uhd::device_addr_t& block_args) = 0; }; -}} +}} // namespace uhd::rfnoc #endif /* INCLUDED_LIBUHD_RFNOC_RPC_BLOCK_CTRL_HPP */ |