blob: f0eb9db973b6d15de951ea4628c731ab6e64ed5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//
// Copyright 2019 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/rfnoc/defaults.hpp>
#include <uhd/rfnoc/noc_block_base.hpp>
#include <uhd/rfnoc/registry.hpp>
namespace uhd { namespace rfnoc {
struct block_factory_info_t
{
std::string block_name;
bool mb_access;
std::string timebase_clk;
std::string ctrlport_clk;
registry::factory_t factory_fn;
};
/*! Container for factory functionality
*/
class factory
{
public:
/*! Return a factory function for an RFNoC block based on the Noc-ID
*
* \returns a block_factory_info_t object
* \throws uhd::lookup_error if no block is found
*/
static block_factory_info_t get_block_factory(
noc_id_t noc_id, device_type_t device_id);
};
}} /* namespace uhd::rfnoc */
|