diff options
Diffstat (limited to 'host/lib/include/uhdlib')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/clock_iface.hpp | 3 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/factory.hpp | 13 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/mb_iface.hpp | 5 |
3 files changed, 18 insertions, 3 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/clock_iface.hpp b/host/lib/include/uhdlib/rfnoc/clock_iface.hpp index ae61a645e..06e54e67c 100644 --- a/host/lib/include/uhdlib/rfnoc/clock_iface.hpp +++ b/host/lib/include/uhdlib/rfnoc/clock_iface.hpp @@ -12,12 +12,15 @@ #include <uhd/utils/log.hpp> #include <atomic> #include <string> +#include <memory> namespace uhd { namespace rfnoc { class clock_iface { public: + using sptr = std::shared_ptr<clock_iface>; + clock_iface(const std::string& name) : _name(name), _is_mutable(true) { _is_running = false; diff --git a/host/lib/include/uhdlib/rfnoc/factory.hpp b/host/lib/include/uhdlib/rfnoc/factory.hpp index 8d1fb27a0..be42a57e5 100644 --- a/host/lib/include/uhdlib/rfnoc/factory.hpp +++ b/host/lib/include/uhdlib/rfnoc/factory.hpp @@ -12,6 +12,14 @@ namespace uhd { namespace rfnoc { +struct block_factory_info_t +{ + std::string block_name; + std::string timebase_clk; + std::string ctrlport_clk; + registry::factory_t factory_fn; +}; + /*! Container for factory functionality */ class factory @@ -19,11 +27,10 @@ class factory public: /*! Return a factory function for an RFNoC block based on the Noc-ID * - * \returns a pair: factory function, and block name + * \returns a block_factory_info_t object * \throws uhd::lookup_error if no block is found */ - static std::pair<registry::factory_t, std::string> - get_block_factory(noc_block_base::noc_id_t noc_id); + static block_factory_info_t get_block_factory(noc_block_base::noc_id_t noc_id); /*! Check if this block has requested access to the motherboard controller */ diff --git a/host/lib/include/uhdlib/rfnoc/mb_iface.hpp b/host/lib/include/uhdlib/rfnoc/mb_iface.hpp index cca8dcab8..0a2790a34 100644 --- a/host/lib/include/uhdlib/rfnoc/mb_iface.hpp +++ b/host/lib/include/uhdlib/rfnoc/mb_iface.hpp @@ -9,6 +9,7 @@ #include <uhdlib/rfnoc/chdr_ctrl_xport.hpp> #include <uhdlib/rfnoc/rfnoc_common.hpp> +#include <uhdlib/rfnoc/clock_iface.hpp> #include <memory> namespace uhd { namespace rfnoc { @@ -67,6 +68,10 @@ public: */ virtual void reset_network() = 0; + /*! Return a reference to a clock iface + */ + virtual std::shared_ptr<clock_iface> get_clock_iface(const std::string& clock_name) = 0; + /*! Create a control transport * * This is usually called once per motherboard, since there is only one |