Loading...
Searching...
No Matches
fft_block_control.hpp
Go to the documentation of this file.
//
// Copyright 2024 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <uhd/rfnoc/noc_block_base.hpp>
namespace uhd { namespace rfnoc {
enum class fft_shift { NORMAL, REVERSE, NATURAL, BIT_REVERSE };
enum class fft_direction { REVERSE, FORWARD };
enum class fft_magnitude { COMPLEX, MAGNITUDE, MAGNITUDE_SQUARED };
// Custom property keys
static const std::string PROP_KEY_MAGNITUDE = "magnitude";
static const std::string PROP_KEY_DIRECTION = "direction";
static const std::string PROP_KEY_LENGTH = "length";
static const std::string PROP_KEY_FFT_SCALING = "fft_scaling";
static const std::string PROP_KEY_FFT_SCALING_FACTOR = "fft_scaling_factor";
static const std::string PROP_KEY_SHIFT_CONFIG = "shift_config";
static const std::string PROP_KEY_BYPASS_MODE = "bypass_mode";
static const std::string PROP_KEY_CP_INSERTION_LIST = "cp_insertion_list";
static const std::string PROP_KEY_CP_REMOVAL_LIST = "cp_removal_list";
static const std::string PROP_KEY_NIPC = "nipc";
static const std::string PROP_KEY_MAX_LENGTH = "max_length";
static const std::string PROP_KEY_MAX_CP_LENGTH = "max_cp_length";
static const std::string PROP_KEY_MAX_CP_INSERTION_LIST_LENGTH =
"max_cp_insertion_list_length";
static const std::string PROP_KEY_MAX_CP_REMOVAL_LIST_LENGTH =
"max_cp_removal_list_length";
class UHD_API fft_block_control : public uhd::rfnoc::noc_block_base
{
public:
RFNOC_DECLARE_BLOCK(fft_block_control)
static const uint32_t REG_COMPAT_ADDR;
static const uint32_t REG_PORT_CONFIG_ADDR;
static const uint32_t REG_CAPABILITIES_ADDR;
static const uint32_t REG_CAPABILITIES2_ADDR;
static const uint32_t REG_RESET_ADDR;
static const uint32_t REG_LENGTH_LOG2_ADDR;
static const uint32_t REG_SCALING_ADDR;
static const uint32_t REG_DIRECTION_ADDR;
static const uint32_t REG_CP_INS_LEN_ADDR;
static const uint32_t REG_CP_INS_LIST_LOAD_ADDR;
static const uint32_t REG_CP_INS_LIST_CLR_ADDR;
static const uint32_t REG_CP_INS_LIST_OCC_ADDR;
static const uint32_t REG_CP_REM_LEN_ADDR;
static const uint32_t REG_CP_REM_LIST_LOAD_ADDR;
static const uint32_t REG_CP_REM_LIST_CLR_ADDR;
static const uint32_t REG_CP_REM_LIST_OCC_ADDR;
static const uint32_t REG_OVERFLOW_ADDR;
static const uint32_t REG_BYPASS_ADDR;
static const uint32_t REG_ORDER_ADDR;
static const uint32_t REG_MAGNITUDE_ADDR;
static const uint32_t REG_RESET_ADDR_V1;
static const uint32_t REG_LENGTH_LOG2_ADDR_V1;
static const uint32_t REG_MAGNITUDE_ADDR_V1;
static const uint32_t REG_DIRECTION_ADDR_V1;
static const uint32_t REG_SCALING_ADDR_V1;
static const uint32_t REG_ORDER_ADDR_V1;
virtual void set_direction(const fft_direction direction) = 0;
virtual fft_direction get_direction() const = 0;
virtual void set_magnitude(const fft_magnitude magnitude) = 0;
virtual fft_magnitude get_magnitude() const = 0;
virtual void set_shift_config(const fft_shift shift) = 0;
virtual fft_shift get_shift_config() const = 0;
virtual void set_scaling_factor(const double factor) = 0;
virtual void set_scaling(const uint32_t scaling) = 0;
virtual uint32_t get_scaling() const = 0;
virtual void set_length(const uint32_t length) = 0;
virtual uint32_t get_length() const = 0;
virtual void set_bypass_mode(const bool bypass) = 0;
virtual bool get_bypass_mode() const = 0;
virtual uint32_t get_nipc() const = 0;
virtual uint32_t get_max_length() const = 0;
virtual uint32_t get_max_cp_length() const = 0;
virtual uint32_t get_max_cp_removal_list_length() const = 0;
virtual uint32_t get_max_cp_insertion_list_length() const = 0;
virtual void set_cp_insertion_list(const std::vector<uint32_t> cp_lengths) = 0;
virtual std::vector<uint32_t> get_cp_insertion_list() const = 0;
virtual void set_cp_removal_list(const std::vector<uint32_t> cp_lengths) = 0;
virtual std::vector<uint32_t> get_cp_removal_list() const = 0;
};
}} // namespace uhd::rfnoc
uhd::rfnoc::fft_block_control
Definition fft_block_control.hpp:59
uhd::rfnoc::fft_block_control::REG_SCALING_ADDR_V1
static const uint32_t REG_SCALING_ADDR_V1
Definition fft_block_control.hpp:90
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:75
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:91
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:73
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:80
uhd::rfnoc::fft_block_control::REG_COMPAT_ADDR
static const uint32_t REG_COMPAT_ADDR
Register addresses.
Definition fft_block_control.hpp:64
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:78
uhd::rfnoc::fft_block_control::REG_MAGNITUDE_ADDR_V1
static const uint32_t REG_MAGNITUDE_ADDR_V1
Definition fft_block_control.hpp:88
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:89
uhd::rfnoc::fft_block_control::REG_BYPASS_ADDR
static const uint32_t REG_BYPASS_ADDR
Definition fft_block_control.hpp:81
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:70
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:77
uhd::rfnoc::fft_block_control::REG_PORT_CONFIG_ADDR
static const uint32_t REG_PORT_CONFIG_ADDR
Definition fft_block_control.hpp:65
uhd::rfnoc::fft_block_control::REG_LENGTH_LOG2_ADDR_V1
static const uint32_t REG_LENGTH_LOG2_ADDR_V1
Definition fft_block_control.hpp:87
uhd::rfnoc::fft_block_control::REG_CP_REM_LEN_ADDR
static const uint32_t REG_CP_REM_LEN_ADDR
Definition fft_block_control.hpp:76
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:74
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::get_nipc
virtual uint32_t get_nipc() const =0
uhd::rfnoc::fft_block_control::REG_MAGNITUDE_ADDR
static const uint32_t REG_MAGNITUDE_ADDR
Definition fft_block_control.hpp:83
uhd::rfnoc::fft_block_control::REG_CAPABILITIES2_ADDR
static const uint32_t REG_CAPABILITIES2_ADDR
Definition fft_block_control.hpp:67
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:79
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:86
uhd::rfnoc::fft_block_control::REG_CP_INS_LEN_ADDR
static const uint32_t REG_CP_INS_LEN_ADDR
Definition fft_block_control.hpp:72
uhd::rfnoc::fft_block_control::REG_LENGTH_LOG2_ADDR
static const uint32_t REG_LENGTH_LOG2_ADDR
Definition fft_block_control.hpp:69
uhd::rfnoc::fft_block_control::REG_ORDER_ADDR
static const uint32_t REG_ORDER_ADDR
Definition fft_block_control.hpp:82
uhd::rfnoc::fft_block_control::REG_CAPABILITIES_ADDR
static const uint32_t REG_CAPABILITIES_ADDR
Definition fft_block_control.hpp:66
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:68
uhd::rfnoc::fft_block_control::REG_DIRECTION_ADDR
static const uint32_t REG_DIRECTION_ADDR
Definition fft_block_control.hpp:71
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::BIT_REVERSE
@ BIT_REVERSE
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