USRP Hardware Driver and USRP Manual Version: 4.1.0.1
UHD and USRP Manual
uhd::rfnoc::registry Class Reference

#include <uhd/rfnoc/registry.hpp>

Public Types

using factory_t = std::function< noc_block_base::sptr(noc_block_base::make_args_ptr)>
 

Static Public Member Functions

static void register_block_direct (noc_id_t noc_id, device_type_t device_id, const std::string &block_name, bool mb_access, const std::string &timebase_clock, const std::string &ctrlport_clock, factory_t factory_fn)
 
static void register_block_descriptor (const std::string &block_key, factory_t factory_fn)
 

Detailed Description

RFNoC Block Registry

A container for various functions to register blocks

Member Typedef Documentation

◆ factory_t

Member Function Documentation

◆ register_block_descriptor()

static void uhd::rfnoc::registry::register_block_descriptor ( const std::string &  block_key,
factory_t  factory_fn 
)
static

Register a block that does use a block descriptor file

Use this registry function for blocks that also have a textual description (block descriptor file).

For these blocks, the framework will first look up the Noc-ID from the blocks on the FPGA, and then find the corresponding block key by searching all the availble block descriptor files. When such a key is found, it will be used to find a block that was previously registered here.

◆ register_block_direct()

static void uhd::rfnoc::registry::register_block_direct ( noc_id_t  noc_id,
device_type_t  device_id,
const std::string &  block_name,
bool  mb_access,
const std::string &  timebase_clock,
const std::string &  ctrlport_clock,
factory_t  factory_fn 
)
static

Register a block that does not use a block descriptor file

Note: It is highly recommended to use the UHD_RFNOC_BLOCK_REGISTER_DIRECT() macro instead of calling this function.

Use this registry function for blocks that do not read from a textual description (block descriptor file).

If the Noc-ID is already registered, it will print an error to stderr and ignore the new block.

Parameters
noc_idThe 32-bit Noc-ID for this block (e.g. 0xDDC00000).
device_idThe 16-bit Device-ID for this block (ANY_DEVICE for device agnostic blocks).
block_nameThe name used for the block ID (e.g. "Radio").
mb_accessSet this to true to request full access to the motherboard in the block controller. Radio blocks, for example, require this. If set, UHD may grant access to the underlying motherboard controller to the block. See also uhd::rfnoc::noc_block_base::get_mb_controller().
timebase_clockThe name of the clock that is used for time reference on timed commands. Blocks that derive time from the graph (e.g. DDC, DUC blocks) should set this to uhd::rfnoc::CLOCK_KEY_GRAPH.
ctrlport_clockThe name of the clock that is driving the control port. This is device-dependent. A typical value is "bus_clk".
factory_fnA factory function that returns a reference to the block.

The documentation for this class was generated from the following file: