USRP Hardware Driver and USRP Manual Version: 4.1.0.3
UHD and USRP Manual
uhd::rfnoc::fft_block_control Class Referenceabstract

#include <uhd/rfnoc/fft_block_control.hpp>

Inheritance diagram for uhd::rfnoc::fft_block_control:
uhd::rfnoc::noc_block_base uhd::rfnoc::node_t uhd::rfnoc::register_iface_holder

Public Member Functions

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 (const uint16_t scaling)=0
 
virtual uint16_t get_scaling () const =0
 
virtual void set_length (const size_t length)=0
 
virtual size_t get_length () const =0
 
- Public Member Functions inherited from uhd::rfnoc::noc_block_base
 ~noc_block_base () override
 
std::string get_unique_id () const override
 Unique ID for an RFNoC block is its block ID. More...
 
size_t get_num_input_ports () const override
 Number of input ports. Note: This gets passed into this block from the. More...
 
size_t get_num_output_ports () const override
 Number of output ports. Note: This gets passed outto this block from the. More...
 
noc_id_t get_noc_id () const
 
const block_id_tget_block_id () const
 
double get_tick_rate () const
 
size_t get_mtu (const res_source_info &edge)
 
uhd::device_addr_t get_block_args () const
 
uhd::property_tree::sptrget_tree () const
 Return a reference to this block's subtree. More...
 
uhd::property_tree::sptrget_tree ()
 Return a reference to this block's subtree (non-const version) More...
 
- Public Member Functions inherited from uhd::rfnoc::node_t
 node_t ()
 
virtual ~node_t ()
 
virtual std::string get_unique_id () const
 Return a unique identifier string for this node. In every RFNoC graph,. More...
 
virtual size_t get_num_input_ports () const =0
 
virtual size_t get_num_output_ports () const =0
 
std::vector< std::string > get_property_ids () const
 
template<typename prop_data_t >
void set_property (const std::string &id, const prop_data_t &val, const size_t instance=0)
 
void set_properties (const uhd::device_addr_t &props, const size_t instance=0)
 
template<typename prop_data_t >
const prop_data_t & get_property (const std::string &id, const size_t instance=0)
 
virtual void set_command_time (uhd::time_spec_t time, const size_t instance)
 
virtual uhd::time_spec_t get_command_time (const size_t instance) const
 
virtual void clear_command_time (const size_t instance)
 
- Public Member Functions inherited from uhd::rfnoc::register_iface_holder
 register_iface_holder (register_iface::sptr reg)
 
virtual ~register_iface_holder ()=default
 
register_ifaceregs ()
 

Static Public Attributes

static const uint32_t REG_RESET_ADDR
 
static const uint32_t REG_LENGTH_LOG2_ADDR
 
static const uint32_t REG_MAGNITUDE_OUT_ADDR
 
static const uint32_t REG_DIRECTION_ADDR
 
static const uint32_t REG_SCALING_ADDR
 
static const uint32_t REG_SHIFT_CONFIG_ADDR
 
- Static Public Attributes inherited from uhd::rfnoc::node_t
static const size_t ANY_PORT = size_t(~0)
 

Additional Inherited Members

- Public Types inherited from uhd::rfnoc::noc_block_base
using sptr = std::shared_ptr< noc_block_base >
 
using make_args_ptr = std::unique_ptr< make_args_t >
 Opaque pointer to the constructor arguments. More...
 
- Public Types inherited from uhd::rfnoc::node_t
enum class  forwarding_policy_t {
  ONE_TO_ONE , ONE_TO_FAN , ONE_TO_ALL_IN , ONE_TO_ALL_OUT ,
  ONE_TO_ALL , DROP , USE_MAP
}
 Types of property/action forwarding for those not defined by the block itself. More...
 
using resolver_fn_t = std::function< void(void)>
 
using resolve_callback_t = std::function< void(void)>
 
using action_handler_t = std::function< void(const res_source_info &, action_info::sptr)>
 
using forwarding_map_t = std::unordered_map< res_source_info, std::vector< res_source_info > >
 
- Protected Types inherited from uhd::rfnoc::node_t
using prop_ptrs_t = std::unordered_set< property_base_t * >
 
- Protected Member Functions inherited from uhd::rfnoc::noc_block_base
 noc_block_base (make_args_ptr make_args)
 
void set_num_input_ports (const size_t num_ports)
 Update number of input ports. More...
 
void set_num_output_ports (const size_t num_ports)
 Update number of output ports. More...
 
void set_tick_rate (const double tick_rate)
 
void set_mtu_forwarding_policy (const forwarding_policy_t policy)
 
void set_mtu (const res_source_info &edge, const size_t new_mtu)
 
property_base_tget_mtu_prop_ref (const res_source_info &edge)
 
std::shared_ptr< mb_controllerget_mb_controller ()
 
virtual void deinit ()
 
- Protected Member Functions inherited from uhd::rfnoc::node_t
void register_property (property_base_t *prop, resolve_callback_t &&clean_callback=nullptr)
 
void add_property_resolver (prop_ptrs_t &&inputs, prop_ptrs_t &&outputs, resolver_fn_t &&resolver_fn)
 
void set_prop_forwarding_policy (forwarding_policy_t policy, const std::string &prop_id="")
 
void set_prop_forwarding_map (const forwarding_map_t &map)
 
template<typename prop_data_t >
void set_property (const std::string &id, const prop_data_t &val, const res_source_info &src_info)
 
template<typename prop_data_t >
const prop_data_t & get_property (const std::string &id, const res_source_info &src_info)
 
void register_action_handler (const std::string &id, action_handler_t &&handler)
 
void set_action_forwarding_policy (forwarding_policy_t policy, const std::string &action_key="")
 
void set_action_forwarding_map (const forwarding_map_t &map)
 
void post_action (const res_source_info &edge_info, action_info::sptr action)
 
virtual bool check_topology (const std::vector< size_t > &connected_inputs, const std::vector< size_t > &connected_outputs)
 
virtual void shutdown ()
 
- Protected Member Functions inherited from uhd::rfnoc::register_iface_holder
void update_reg_iface (register_iface::sptr new_iface=nullptr)
 
- Static Protected Attributes inherited from uhd::rfnoc::node_t
static dirtifier_t ALWAYS_DIRTY
 A dirtifyer object, useful for properties that always need updating. More...
 

Detailed Description

FFT Block Control Class

The FFT block is an RFNoC block that accepts signed complex 16-bit data at its input and computes the forward or reverse FFT of the input data, outputting signed complex 16-bit data at its output. The output data may be configured as complex, magnitude, or mag-squared values, its spectrum shifted and/or reversed, and scaled by a scaled factor.

The FFT length is configured via the length parameter, up to a maximum of 2048 samples. The FFT IP requires a power-of-two number of samples; the length will be coerced to the closest power of two which is smaller than length. The block will output packets of the same length in the desired format as configured via the API.

Member Function Documentation

◆ get_direction()

virtual fft_direction uhd::rfnoc::fft_block_control::get_direction ( ) const
pure virtual

Get the FFT direction

Returns the current direction of the FFT.

Returns
FFT direction

◆ get_length()

virtual size_t uhd::rfnoc::fft_block_control::get_length ( ) const
pure virtual

Get the length of the FFT

Returns the current length of the FFT.

Returns
Current FFT length

◆ get_magnitude()

virtual fft_magnitude uhd::rfnoc::fft_block_control::get_magnitude ( ) const
pure virtual

Get the format of the returned FFT output data

Returns the current output format of the FFT data.

Returns
Format of the returned FFT output data

◆ get_scaling()

virtual uint16_t uhd::rfnoc::fft_block_control::get_scaling ( ) const
pure virtual

Get the scaling schedule for the FFT block

Returns the current scaling schedule for the FFT block.

Returns
Scaling schedule for the FFT block

◆ get_shift_config()

virtual fft_shift uhd::rfnoc::fft_block_control::get_shift_config ( ) const
pure virtual

Get the shift configuration of the output FFT data

Returns the current shift configuration of the output FFT data.

Returns
Shift configuration of the output FFT data

◆ set_direction()

virtual void uhd::rfnoc::fft_block_control::set_direction ( const fft_direction  direction)
pure virtual

Set the FFT direction

Sets the direction of the FFT, either forward (FORWARD) or inverse (REVERSE).

Parameters
directionFFT direction

◆ set_length()

virtual void uhd::rfnoc::fft_block_control::set_length ( const size_t  length)
pure virtual

Set the length of the FFT

Sets the length of the FFT in number of samples. Note that the FFT IP requires a power-of-two number of samples; the incoming value will be coerced to the closest smaller power of two.

Parameters
lengthDesired FFT length

◆ set_magnitude()

virtual void uhd::rfnoc::fft_block_control::set_magnitude ( const fft_magnitude  magnitude)
pure virtual

Set the format of the returned FFT output data

Sets the format in which the FFT output data is returned. The following formats are supported:

* amplitude/phase data (COMPLEX)
* magnitude data (MAGNITUDE)
* mag-squared data (MAGNITUDE_SQUARED)
Parameters
magnitudeFormat of the returned FFT output data

◆ set_scaling()

virtual void uhd::rfnoc::fft_block_control::set_scaling ( const uint16_t  scaling)
pure virtual

Set the scaling schedule for the FFT block

Sets the scaling for each stage of the FFT. This value maps directly to the scale schedule field in the configuration channel data that is passed to the Xilinx AXI FFT IP. For more information on the format of this data, see Xilinx document PG109, Fast Fourier Transform LogiCORE IP Product Guide.

Parameters
scalingScaling schedule for the FFT block

◆ set_shift_config()

virtual void uhd::rfnoc::fft_block_control::set_shift_config ( const fft_shift  shift)
pure virtual

Set the shift configuration of the output FFT data

Sets how the FFT output data is shifted (to get the zero frequency bin to the center of the output data). The following output data shift configurations are supported:

* Negative frequencies first, then positive frequencies (NORMAL)
* Positive frequencies first, then negative frequencies (REVERSE)
* Bypass the shift altogether, leaving the zero frequency bin
  returned first (NATURAL).
Parameters
shiftConfiguration for shifting FFT output data

Member Data Documentation

◆ REG_DIRECTION_ADDR

const uint32_t uhd::rfnoc::fft_block_control::REG_DIRECTION_ADDR
static

◆ REG_LENGTH_LOG2_ADDR

const uint32_t uhd::rfnoc::fft_block_control::REG_LENGTH_LOG2_ADDR
static

◆ REG_MAGNITUDE_OUT_ADDR

const uint32_t uhd::rfnoc::fft_block_control::REG_MAGNITUDE_OUT_ADDR
static

◆ REG_RESET_ADDR

const uint32_t uhd::rfnoc::fft_block_control::REG_RESET_ADDR
static

◆ REG_SCALING_ADDR

const uint32_t uhd::rfnoc::fft_block_control::REG_SCALING_ADDR
static

◆ REG_SHIFT_CONFIG_ADDR

const uint32_t uhd::rfnoc::fft_block_control::REG_SHIFT_CONFIG_ADDR
static

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