Loading...
Searching...
No Matches
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_direct (std::vector< noc_id_t > noc_ids, 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

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

## Member Function Documentation

## register_block_descriptor()

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() [1/2]

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_id | The 32-bit Noc-ID for this block (e.g. 0xDDC00000).
  device_id | The 16-bit Device-ID for this block (ANY_DEVICE for device agnostic blocks).
  block_name | The name used for the block ID (e.g. "Radio").
  mb_access | Set 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_clock | The 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_clock | The name of the clock that is driving the control port. This is device-dependent. A typical value is "bus_clk".
  factory_fn | A factory function that returns a reference to the block.

## register_block_direct() [2/2]

void uhd::rfnoc::registry::register_block_direct | ( | std::vector< noc_id_t > | noc_ids,
|  | 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

Same as above, but with multiple noc_ids

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

- registry.hpp