USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
fft_block_control.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2019 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>
11 
12 namespace uhd { namespace rfnoc {
13 
14 enum class fft_shift { NORMAL, REVERSE, NATURAL };
15 enum class fft_direction { REVERSE, FORWARD };
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_SHIFT_CONFIG = "shift_config";
24 
42 {
43 public:
45 
46  static const uint32_t REG_RESET_ADDR;
47  static const uint32_t REG_LENGTH_LOG2_ADDR;
48  static const uint32_t REG_MAGNITUDE_OUT_ADDR;
49  static const uint32_t REG_DIRECTION_ADDR;
50  static const uint32_t REG_SCALING_ADDR;
51  static const uint32_t REG_SHIFT_CONFIG_ADDR;
52 
60  virtual void set_direction(const fft_direction direction) = 0;
61 
68  virtual fft_direction get_direction() const = 0;
69 
81  virtual void set_magnitude(const fft_magnitude magnitude) = 0;
82 
89  virtual fft_magnitude get_magnitude() const = 0;
90 
104  virtual void set_shift_config(const fft_shift shift) = 0;
105 
112  virtual fft_shift get_shift_config() const = 0;
113 
124  virtual void set_scaling(const uint16_t scaling) = 0;
125 
132  virtual uint16_t get_scaling() const = 0;
133 
142  virtual void set_length(const size_t length) = 0;
143 
150  virtual size_t get_length() const = 0;
151 };
152 
153 }} // namespace uhd::rfnoc
uhd::soft_reg_field::shift
UHD_INLINE size_t shift(const soft_reg_field_t field)
Definition: soft_register.hpp:80
uhd::rfnoc::fft_magnitude::MAGNITUDE
@ MAGNITUDE
uhd::rfnoc::fft_block_control
Definition: fft_block_control.hpp:41
uhd::rfnoc::fft_direction::FORWARD
@ FORWARD
config.hpp
uhd::rfnoc::noc_block_base
Definition: noc_block_base.hpp:42
uhd::rfnoc::fft_shift
fft_shift
Definition: fft_block_control.hpp:14
uhd::rfnoc::fft_direction::REVERSE
@ REVERSE
uhd::rfnoc::fft_magnitude::COMPLEX
@ COMPLEX
UHD_API
#define UHD_API
Definition: config.h:87
uhd::rfnoc::fft_magnitude
fft_magnitude
Definition: fft_block_control.hpp:16
uhd::rfnoc::fft_shift::NATURAL
@ NATURAL
uhd
Definition: build_info.hpp:12
uhd::rfnoc::fft_shift::NORMAL
@ NORMAL
noc_block_base.hpp
uhd::rfnoc::fft_magnitude::MAGNITUDE_SQUARED
@ MAGNITUDE_SQUARED
uhd::rfnoc::fft_shift::REVERSE
@ REVERSE
RFNOC_DECLARE_BLOCK
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition: noc_block_base.hpp:22
uhd::rfnoc::fft_direction
fft_direction
Definition: fft_block_control.hpp:15