| USRP Hardware Driver and USRP Manual Version: 4.8.0.makepkg-0-g308126a4 UHD and USRP Manual |

Loading...
Searching...
No Matches
fft_block_control.hpp
Go to the documentation of this file.
1//
2// Copyright 2024 Ettus Research, a National Instruments Brand
3//
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6
7#pragma once
8
9#include <uhd/config.hpp>
10#include <uhd/rfnoc/noc_block_base.hpp>
11
12 namespace uhd { namespace rfnoc {
13
14 enum class fft_shift { NORMAL, REVERSE, NATURAL };
15 enum class fft_direction { REVERSE, FORWARD };
16 enum class fft_magnitude { COMPLEX, MAGNITUDE, MAGNITUDE_SQUARED };
17
18// Custom property keys
19 static const std::string PROP_KEY_MAGNITUDE = "magnitude";
20 static const std::string PROP_KEY_DIRECTION = "direction";
21 static const std::string PROP_KEY_LENGTH = "length";
22 static const std::string PROP_KEY_FFT_SCALING = "fft_scaling";
23 static const std::string PROP_KEY_FFT_SCALING_FACTOR = "fft_scaling_factor";
24 static const std::string PROP_KEY_SHIFT_CONFIG = "shift_config";
25 static const std::string PROP_KEY_BYPASS_MODE = "bypass_mode";
26 static const std::string PROP_KEY_CP_INSERTION_LIST = "cp_insertion_list";
27 static const std::string PROP_KEY_CP_REMOVAL_LIST = "cp_removal_list";
28 static const std::string PROP_KEY_MAX_LENGTH = "max_length";
29 static const std::string PROP_KEY_MAX_CP_LENGTH = "max_cp_length";
30 static const std::string PROP_KEY_MAX_CP_INSERTION_LIST_LENGTH =
31 "max_cp_insertion_list_length";
32 static const std::string PROP_KEY_MAX_CP_REMOVAL_LIST_LENGTH =
33 "max_cp_removal_list_length";
34
57 class UHD_API fft_block_control : public uhd::rfnoc::noc_block_base
58{
59 public:
60 RFNOC_DECLARE_BLOCK(fft_block_control)
61
62
63 static const uint32_t REG_COMPAT_ADDR;
64 static const uint32_t REG_PORT_CONFIG_ADDR;
65 static const uint32_t REG_CAPABILITIES_ADDR;
66 static const uint32_t REG_CAPABILITIES2_ADDR;
67 static const uint32_t REG_RESET_ADDR;
68 static const uint32_t REG_LENGTH_LOG2_ADDR;
69 static const uint32_t REG_SCALING_ADDR;
70 static const uint32_t REG_DIRECTION_ADDR;
71 static const uint32_t REG_CP_INS_LEN_ADDR;
72 static const uint32_t REG_CP_INS_LIST_LOAD_ADDR;
73 static const uint32_t REG_CP_INS_LIST_CLR_ADDR;
74 static const uint32_t REG_CP_INS_LIST_OCC_ADDR;
75 static const uint32_t REG_CP_REM_LEN_ADDR;
76 static const uint32_t REG_CP_REM_LIST_LOAD_ADDR;
77 static const uint32_t REG_CP_REM_LIST_CLR_ADDR;
78 static const uint32_t REG_CP_REM_LIST_OCC_ADDR;
79 static const uint32_t REG_OVERFLOW_ADDR;
80 static const uint32_t REG_BYPASS_ADDR;
81 static const uint32_t REG_ORDER_ADDR;
82 static const uint32_t REG_MAGNITUDE_ADDR;
83
85 static const uint32_t REG_RESET_ADDR_V1;
86 static const uint32_t REG_LENGTH_LOG2_ADDR_V1;
87 static const uint32_t REG_MAGNITUDE_ADDR_V1;
88 static const uint32_t REG_DIRECTION_ADDR_V1;
89 static const uint32_t REG_SCALING_ADDR_V1;
90 static const uint32_t REG_ORDER_ADDR_V1;
91
99 virtual void set_direction(const fft_direction direction) = 0;
100
107 virtual fft_direction get_direction() const = 0;
108
120 virtual void set_magnitude(const fft_magnitude magnitude) = 0;
121
128 virtual fft_magnitude get_magnitude() const = 0;
129
143 virtual void set_shift_config(const fft_shift shift) = 0;
144
151 virtual fft_shift get_shift_config() const = 0;
152
172 virtual void set_scaling_factor(const double factor) = 0;
173
192 virtual void set_scaling(const uint32_t scaling) = 0;
193
200 virtual uint32_t get_scaling() const = 0;
201
210 virtual void set_length(const uint32_t length) = 0;
211
218 virtual uint32_t get_length() const = 0;
219
229 virtual void set_bypass_mode(const bool bypass) = 0;
230
237 virtual bool get_bypass_mode() const = 0;
238
245 virtual uint32_t get_max_length() const = 0;
246
253 virtual uint32_t get_max_cp_length() const = 0;
254
263 virtual uint32_t get_max_cp_removal_list_length() const = 0;
264
273 virtual uint32_t get_max_cp_insertion_list_length() const = 0;
274
287 virtual void set_cp_insertion_list(const std::vector<uint32_t> cp_lengths) = 0;
288
297 virtual std::vector<uint32_t> get_cp_insertion_list() const = 0;
298
312 virtual void set_cp_removal_list(const std::vector<uint32_t> cp_lengths) = 0;
313
322 virtual std::vector<uint32_t> get_cp_removal_list() const = 0;
323};
324
325}} // namespace uhd::rfnoc
uhd::rfnoc::fft_block_control
Definition fft_block_control.hpp:58
uhd::rfnoc::fft_block_control::REG_SCALING_ADDR_V1
static const uint32_t REG_SCALING_ADDR_V1
Definition fft_block_control.hpp:89
uhd::rfnoc::fft_block_control::set_length
virtual void set_length(const uint32_t length)=0
uhd::rfnoc::fft_block_control::get_max_cp_insertion_list_length
virtual uint32_t get_max_cp_insertion_list_length() const =0
uhd::rfnoc::fft_block_control::REG_CP_INS_LIST_OCC_ADDR
static const uint32_t REG_CP_INS_LIST_OCC_ADDR
Definition fft_block_control.hpp:74
uhd::rfnoc::fft_block_control::set_bypass_mode
virtual void set_bypass_mode(const bool bypass)=0
uhd::rfnoc::fft_block_control::get_direction
virtual fft_direction get_direction() const =0
uhd::rfnoc::fft_block_control::REG_ORDER_ADDR_V1
static const uint32_t REG_ORDER_ADDR_V1
Definition fft_block_control.hpp:90
uhd::rfnoc::fft_block_control::set_cp_insertion_list
virtual void set_cp_insertion_list(const std::vector< uint32_t > cp_lengths)=0
uhd::rfnoc::fft_block_control::REG_CP_INS_LIST_LOAD_ADDR
static const uint32_t REG_CP_INS_LIST_LOAD_ADDR
Definition fft_block_control.hpp:72
uhd::rfnoc::fft_block_control::get_max_cp_removal_list_length
virtual uint32_t get_max_cp_removal_list_length() const =0
uhd::rfnoc::fft_block_control::get_length
virtual uint32_t get_length() const =0
uhd::rfnoc::fft_block_control::REG_OVERFLOW_ADDR
static const uint32_t REG_OVERFLOW_ADDR
Definition fft_block_control.hpp:79
uhd::rfnoc::fft_block_control::REG_COMPAT_ADDR
static const uint32_t REG_COMPAT_ADDR
Register addresses.
Definition fft_block_control.hpp:63
uhd::rfnoc::fft_block_control::REG_CP_REM_LIST_CLR_ADDR
static const uint32_t REG_CP_REM_LIST_CLR_ADDR
Definition fft_block_control.hpp:77
uhd::rfnoc::fft_block_control::REG_MAGNITUDE_ADDR_V1
static const uint32_t REG_MAGNITUDE_ADDR_V1
Definition fft_block_control.hpp:87
uhd::rfnoc::fft_block_control::get_bypass_mode
virtual bool get_bypass_mode() const =0
uhd::rfnoc::fft_block_control::REG_DIRECTION_ADDR_V1
static const uint32_t REG_DIRECTION_ADDR_V1
Definition fft_block_control.hpp:88
uhd::rfnoc::fft_block_control::REG_BYPASS_ADDR
static const uint32_t REG_BYPASS_ADDR
Definition fft_block_control.hpp:80
uhd::rfnoc::fft_block_control::get_shift_config
virtual fft_shift get_shift_config() const =0
uhd::rfnoc::fft_block_control::REG_SCALING_ADDR
static const uint32_t REG_SCALING_ADDR
Definition fft_block_control.hpp:69
uhd::rfnoc::fft_block_control::get_scaling
virtual uint32_t get_scaling() const =0
uhd::rfnoc::fft_block_control::set_shift_config
virtual void set_shift_config(const fft_shift shift)=0
uhd::rfnoc::fft_block_control::REG_CP_REM_LIST_LOAD_ADDR
static const uint32_t REG_CP_REM_LIST_LOAD_ADDR
Definition fft_block_control.hpp:76
uhd::rfnoc::fft_block_control::REG_PORT_CONFIG_ADDR
static const uint32_t REG_PORT_CONFIG_ADDR
Definition fft_block_control.hpp:64
uhd::rfnoc::fft_block_control::REG_LENGTH_LOG2_ADDR_V1
static const uint32_t REG_LENGTH_LOG2_ADDR_V1
Definition fft_block_control.hpp:86
uhd::rfnoc::fft_block_control::REG_CP_REM_LEN_ADDR
static const uint32_t REG_CP_REM_LEN_ADDR
Definition fft_block_control.hpp:75
uhd::rfnoc::fft_block_control::get_max_length
virtual uint32_t get_max_length() const =0
uhd::rfnoc::fft_block_control::get_cp_insertion_list
virtual std::vector< uint32_t > get_cp_insertion_list() const =0
uhd::rfnoc::fft_block_control::REG_CP_INS_LIST_CLR_ADDR
static const uint32_t REG_CP_INS_LIST_CLR_ADDR
Definition fft_block_control.hpp:73
uhd::rfnoc::fft_block_control::set_cp_removal_list
virtual void set_cp_removal_list(const std::vector< uint32_t > cp_lengths)=0
uhd::rfnoc::fft_block_control::REG_MAGNITUDE_ADDR
static const uint32_t REG_MAGNITUDE_ADDR
Definition fft_block_control.hpp:82
uhd::rfnoc::fft_block_control::REG_CAPABILITIES2_ADDR
static const uint32_t REG_CAPABILITIES2_ADDR
Definition fft_block_control.hpp:66
uhd::rfnoc::fft_block_control::REG_CP_REM_LIST_OCC_ADDR
static const uint32_t REG_CP_REM_LIST_OCC_ADDR
Definition fft_block_control.hpp:78
uhd::rfnoc::fft_block_control::REG_RESET_ADDR_V1
static const uint32_t REG_RESET_ADDR_V1
Register addresses of the FFT block version 1.
Definition fft_block_control.hpp:85
uhd::rfnoc::fft_block_control::REG_CP_INS_LEN_ADDR
static const uint32_t REG_CP_INS_LEN_ADDR
Definition fft_block_control.hpp:71
uhd::rfnoc::fft_block_control::REG_LENGTH_LOG2_ADDR
static const uint32_t REG_LENGTH_LOG2_ADDR
Definition fft_block_control.hpp:68
uhd::rfnoc::fft_block_control::REG_ORDER_ADDR
static const uint32_t REG_ORDER_ADDR
Definition fft_block_control.hpp:81
uhd::rfnoc::fft_block_control::REG_CAPABILITIES_ADDR
static const uint32_t REG_CAPABILITIES_ADDR
Definition fft_block_control.hpp:65
uhd::rfnoc::fft_block_control::set_scaling_factor
virtual void set_scaling_factor(const double factor)=0
uhd::rfnoc::fft_block_control::set_scaling
virtual void set_scaling(const uint32_t scaling)=0
uhd::rfnoc::fft_block_control::REG_RESET_ADDR
static const uint32_t REG_RESET_ADDR
Definition fft_block_control.hpp:67
uhd::rfnoc::fft_block_control::REG_DIRECTION_ADDR
static const uint32_t REG_DIRECTION_ADDR
Definition fft_block_control.hpp:70
uhd::rfnoc::fft_block_control::get_magnitude
virtual fft_magnitude get_magnitude() const =0
uhd::rfnoc::fft_block_control::get_max_cp_length
virtual uint32_t get_max_cp_length() const =0
uhd::rfnoc::fft_block_control::get_cp_removal_list
virtual std::vector< uint32_t > get_cp_removal_list() const =0
uhd::rfnoc::fft_block_control::set_direction
virtual void set_direction(const fft_direction direction)=0
uhd::rfnoc::fft_block_control::set_magnitude
virtual void set_magnitude(const fft_magnitude magnitude)=0
uhd::rfnoc::noc_block_base
Definition noc_block_base.hpp:43
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
std
STL namespace.
uhd::rfnoc
Definition actions.hpp:24
uhd::rfnoc::fft_magnitude
fft_magnitude
Definition fft_block_control.hpp:16
uhd::rfnoc::fft_magnitude::MAGNITUDE_SQUARED
@ MAGNITUDE_SQUARED
Definition fft_block_control.hpp:16
uhd::rfnoc::fft_magnitude::COMPLEX
@ COMPLEX
Definition fft_block_control.hpp:16
uhd::rfnoc::fft_magnitude::MAGNITUDE
@ MAGNITUDE
Definition fft_block_control.hpp:16
uhd::rfnoc::fft_shift
fft_shift
Definition fft_block_control.hpp:14
uhd::rfnoc::fft_shift::NORMAL
@ NORMAL
Definition fft_block_control.hpp:14
uhd::rfnoc::fft_shift::NATURAL
@ NATURAL
Definition fft_block_control.hpp:14
uhd::rfnoc::fft_shift::REVERSE
@ REVERSE
Definition fft_block_control.hpp:14
uhd::rfnoc::fft_direction
fft_direction
Definition fft_block_control.hpp:15
uhd::rfnoc::fft_direction::FORWARD
@ FORWARD
Definition fft_block_control.hpp:15
uhd
Definition build_info.hpp:12
noc_block_base.hpp
RFNOC_DECLARE_BLOCK
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition noc_block_base.hpp:22