Loading...
Searching...
No Matches
uhd::rfnoc::ddc_block_control Class Referenceabstract
RFNoC » RFNoC Blocks

`#include <uhd/rfnoc/ddc_block_control.hpp>`

Inheritance diagram for uhd::rfnoc::ddc_block_control:
[legend]
Collaboration diagram for uhd::rfnoc::ddc_block_control:
[legend]

## Public Member Functions

virtual double | set_freq (const double freq, const size_t chan, const boost::optional< uhd::time_spec_t > time=boost::none)=0
virtual double | get_freq (const size_t chan) const =0
virtual uhd::freq_range_t | get_frequency_range (const size_t chan) const =0
virtual double | get_input_rate (const size_t chan) const =0
virtual void | set_input_rate (const double rate, const size_t chan)=0
virtual double | get_output_rate (const size_t chan) const =0
virtual uhd::meta_range_t | get_output_rates (const size_t chan) const =0
virtual double | set_output_rate (const double rate, const size_t chan)=0
virtual void | issue_stream_cmd (const uhd::stream_cmd_t &stream_cmd, const size_t port)=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.
size_t | get_num_input_ports () const override
size_t | get_num_output_ports () const override
noc_id_t | get_noc_id () const
const block_id_t & | get_block_id () const
double | get_tick_rate () const
size_t | get_mtu (const res_source_info &edge)
size_t | get_chdr_hdr_len (const bool account_for_ts=true) const
size_t | get_max_payload_size (const res_source_info &edge, const bool account_for_ts=true)
uhd::device_addr_t | get_block_args () const
uhd::property_tree::sptr & | get_tree () const
| Return a reference to this block's subtree.
uhd::property_tree::sptr & | get_tree ()
| Return a reference to this block's subtree (non-const version).
std::shared_ptr< mb_controller > | get_mb_controller ()
Public Member Functions inherited from uhd::rfnoc::node_t
| node_t ()
virtual | ~node_t ()
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_iface & | regs ()

## Static Public Attributes

static const uint16_t | MAJOR_COMPAT
static const uint16_t | MINOR_COMPAT
static const uint32_t | RB_COMPAT_NUM
static const uint32_t | RB_NUM_HB
static const uint32_t | RB_CIC_MAX_DECIM
static const uint32_t | SR_N_ADDR
static const uint32_t | SR_M_ADDR
static const uint32_t | SR_CONFIG_ADDR
static const uint32_t | SR_FREQ_ADDR
static const uint32_t | SR_SCALE_IQ_ADDR
static const uint32_t | SR_DECIM_ADDR
static const uint32_t | SR_MUX_ADDR
static const uint32_t | SR_COEFFS_ADDR
static const uint32_t | SR_TIME_INCR_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.
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 | graph_mutex_callback_t = std::function<std::recursive_mutex&(void)>
using | action_handler_t
using | forwarding_map_t
Protected Types inherited from uhd::rfnoc::node_t
using | prop_ptrs_t = std::vector<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)
void | set_num_output_ports (const size_t num_ports)
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_t * | get_mtu_prop_ref (const res_source_info &edge)
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)
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.

## Detailed Description

DDC Block Control Class

The DDC Block is a multi-channel digital downconverter (DDC) with built-in frequency shift. The number of channels as well as the maximum decimation is configurable in the FPGA, the block controller will read out registers to identify the capabilities of this block.

This block has two user properties per channel:

- freq: The frequency shift at the input. Note: A convenience method set_freq() is provided to set this property. It also takes care of the command time, which set_property() does not, and thus should be preferred.
- decim: The decimation value

## Member Function Documentation

## get_freq()

virtual double uhd::rfnoc::ddc_block_control::get_freq | ( | const size_t | chan | ) | const

pure virtual

Return the current DDS frequency

Returns
  The current frequency of the DDS

## get_frequency_range()

virtual uhd::freq_range_t uhd::rfnoc::ddc_block_control::get_frequency_range | ( | const size_t | chan | ) | const

pure virtual

Return the range of frequencies that `chan` can be set to.

The frequency shifter is the first component in the DDC, and thus can shift frequencies (digitally) between -get_input_rate()/2 and +get_input_rate()/2.

The returned values are in Hz (not normalized frequencies) and are valid inputs for set_freq().

Returns
  The range of frequencies that the DDC can shift the input by

## get_input_rate()

virtual double uhd::rfnoc::ddc_block_control::get_input_rate | ( | const size_t | chan | ) | const

pure virtual

Return the sampling rate at this block's input

Parameters

  chan | The channel for which the rate is being queried

Returns
  the sampling rate at this block's input

## get_output_rate()

virtual double uhd::rfnoc::ddc_block_control::get_output_rate | ( | const size_t | chan | ) | const

pure virtual

Return the sampling rate at this block's output

This is equivalent to calling get_input_rate() divided by the decimation.

Parameters

  chan | The channel for which the rate is being queried

Returns
  the sampling rate at this block's input

## get_output_rates()

virtual uhd::meta_range_t uhd::rfnoc::ddc_block_control::get_output_rates | ( | const size_t | chan | ) | const

pure virtual

Return a range of valid output rates, based on the current input rate

Note the return value is only valid as long as the input rate does not change.

## issue_stream_cmd()

virtual void uhd::rfnoc::ddc_block_control::issue_stream_cmd | ( | const uhd::stream_cmd_t & | stream_cmd,
|  | const size_t | port )

pure virtual

Issue stream command: Instruct the RX part of the radio to send samples

Parameters

  stream_cmd | The actual stream command to execute
  port | The port for which the stream command is meant

## set_freq()

virtual double uhd::rfnoc::ddc_block_control::set_freq | ( | const double | freq,
|  | const size_t | chan,
|  | const boost::optional< uhd::time_spec_t > | time = boost::none )

pure virtual

Set the DDS frequency

This block will shift the signal at the input by this frequency before decimation. The frequency is given in Hz, it is not a relative frequency to the input sampling rate.

Note: When the rate is modified, the frequency is kept constant. Because the FPGA internally uses a relative phase increment, changing the input sampling rate will trigger a property propagation to recalculate the phase increment based off of this value.

This function will coerce the frequency to a valid value, and return the coerced value.

Parameters

  freq | The frequency shift in Hz
  chan | The channel to which this change shall be applied
  time | When to apply the new frequency

Returns
  The coerced, actual current frequency of the DDS

## set_input_rate()

virtual void uhd::rfnoc::ddc_block_control::set_input_rate | ( | const double | rate,
|  | const size_t | chan )

pure virtual

Manually set the sampling rate at this block's input

Parameters

  rate | The requested rate
  chan | The channel for which the rate is being set

## set_output_rate()

virtual double uhd::rfnoc::ddc_block_control::set_output_rate | ( | const double | rate,
|  | const size_t | chan )

pure virtual

Attempt to set the output rate of this block

This will set the decimation such that the input rate is untouched, and that the input rate divided by the new decimation is as close as possible to the requested `rate`.

Parameters

  rate | The requested rate
  chan | The channel for which the rate is being queried

Returns
  the coerced sampling rate at this block's output

## Member Data Documentation

## MAJOR_COMPAT

const uint16_t uhd::rfnoc::ddc_block_control::MAJOR_COMPAT

static

## MINOR_COMPAT

const uint16_t uhd::rfnoc::ddc_block_control::MINOR_COMPAT

static

## RB_CIC_MAX_DECIM

const uint32_t uhd::rfnoc::ddc_block_control::RB_CIC_MAX_DECIM

static

## RB_COMPAT_NUM

const uint32_t uhd::rfnoc::ddc_block_control::RB_COMPAT_NUM

static

## RB_NUM_HB

const uint32_t uhd::rfnoc::ddc_block_control::RB_NUM_HB

static

## SR_COEFFS_ADDR

const uint32_t uhd::rfnoc::ddc_block_control::SR_COEFFS_ADDR

static

## SR_CONFIG_ADDR

const uint32_t uhd::rfnoc::ddc_block_control::SR_CONFIG_ADDR

static

## SR_DECIM_ADDR

const uint32_t uhd::rfnoc::ddc_block_control::SR_DECIM_ADDR

static

## SR_FREQ_ADDR

const uint32_t uhd::rfnoc::ddc_block_control::SR_FREQ_ADDR

static

## SR_M_ADDR

const uint32_t uhd::rfnoc::ddc_block_control::SR_M_ADDR

static

## SR_MUX_ADDR

const uint32_t uhd::rfnoc::ddc_block_control::SR_MUX_ADDR

static

## SR_N_ADDR

const uint32_t uhd::rfnoc::ddc_block_control::SR_N_ADDR

static

## SR_SCALE_IQ_ADDR

const uint32_t uhd::rfnoc::ddc_block_control::SR_SCALE_IQ_ADDR

static

## SR_TIME_INCR_ADDR

const uint32_t uhd::rfnoc::ddc_block_control::SR_TIME_INCR_ADDR

static

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

- ddc_block_control.hpp