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

Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
uhd::rfnoc::siggen_block_control Class Referenceabstract
RFNoC » RFNoC Blocks

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

Inheritance diagram for uhd::rfnoc::siggen_block_control:

## Public Member Functions
| RFNOC_DECLARE_BLOCK (siggen_block_control)
virtual void | set_enable (const bool enable, const size_t port)=0
virtual bool | get_enable (const size_t port) const =0
virtual void | set_waveform (const siggen_waveform type, const size_t port)=0
virtual siggen_waveform | get_waveform (const size_t port) const =0
virtual void | set_amplitude (const double amplitude, const size_t port)=0
virtual double | get_amplitude (const size_t port) const =0
virtual void | set_constant (const std::complex< double > constant, const size_t port)=0
virtual std::complex< double > | get_constant (const size_t port) const =0
virtual void | set_sine_phase_increment (const double phase_inc, const size_t port)=0
virtual double | get_sine_phase_increment (const size_t port) const =0
virtual void | set_samples_per_packet (const size_t spp, const size_t port)=0
virtual size_t | get_samples_per_packet (const size_t port) const =0
void | set_sine_frequency (const double frequency, const double sample_rate, const size_t port)
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 uint32_t | REG_BLOCK_SIZE
static const uint32_t | REG_ENABLE_OFFSET
static const uint32_t | REG_SPP_OFFSET
static const uint32_t | REG_WAVEFORM_OFFSET
static const uint32_t | REG_GAIN_OFFSET
static const uint32_t | REG_CONSTANT_OFFSET
static const uint32_t | REG_PHASE_INC_OFFSET
static const uint32_t | REG_CARTESIAN_OFFSET
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

Siggen Control Class

The Siggen Block is an RFNoC block that acts as a simple function generating source block. The block supports three functions: generating a constant value, generating a sinusoidal wave with a configurable amplitude and phase increment between samples (but with a random initial phase offset), and a noise source.

## Member Function Documentation

## ◆ get_amplitude()

virtual double uhd::rfnoc::siggen_block_control::get_amplitude | ( | const size_t | port | ) | const
| pure virtual

Get the amplitude value for noise and sine wave data

Returns the current maximum amplitude of the data generated by the given port on the block. The value only applies to the noise and sine wave functions. Calling this function when in constant mode will return 1.0.

Parameters

  port | The port on the block whose amplitude value to return

Returns
  Amplitude value

## ◆ get_constant()

virtual std::complex< double > uhd::rfnoc::siggen_block_control::get_constant | ( | const size_t | port | ) | const
| pure virtual

Get the constant value to generate in constant mode

Returns the current constant value to be generated by the function generator on the given block when the block is configured in constant mode.

Parameters

  port | The port on the block whose constant value to return

Returns
  Constant value to generate

## ◆ get_enable()

virtual bool uhd::rfnoc::siggen_block_control::get_enable | ( | const size_t | port | ) | const
| pure virtual

Get the function generator stream enable flag

Returns the current enable flag for function generator stream data from the given port on the block.

Parameters

  port | The port on the block to get the flag from

Returns
  Function generator stream data enable/disable flag

## ◆ get_samples_per_packet()

virtual size_t uhd::rfnoc::siggen_block_control::get_samples_per_packet | ( | const size_t | port | ) | const
| pure virtual

Get the number of samples per packet to generate

Returns the current number of samples per packet generated by the function generator on the given block.

Parameters

  port | The port on the block whose samples per packet value to get

Returns
  Number of samples per packet to generate

## ◆ get_sine_phase_increment()

virtual double uhd::rfnoc::siggen_block_control::get_sine_phase_increment | ( | const size_t | port | ) | const
| pure virtual

Get the phase increment between samples in sine wave mode

Returns the current phase increment between successive samples generated by the function generator on the given block when the block is configured in sine wave mode.

Parameters

  port | The port on the block whose phase increment to return

Returns
  Phase increment between samples

## ◆ get_waveform()

virtual siggen_waveform uhd::rfnoc::siggen_block_control::get_waveform | ( | const size_t | port | ) | const
| pure virtual

Get the function generator waveform type

Returns the current waveform type for the given port on the block.

Parameters

  port | The port on the block whose waveform type to return

Returns
  Waveform type

## ◆ RFNOC_DECLARE_BLOCK()

uhd::rfnoc::siggen_block_control::RFNOC_DECLARE_BLOCK | ( | siggen_block_control |  | ) |

## ◆ set_amplitude()

virtual void uhd::rfnoc::siggen_block_control::set_amplitude | ( | const double | amplitude,
|  | const size_t | port )
| pure virtual

Set the amplitude value for noise and sine wave data

Sets the maximum amplitude of the data generated by the given port on the block. The hardware can generate function data with an amplitude between -1.0 and (2^15-1)/(2^15), or approximately 0.99997, so the provided value must reside within this range. However, for convenience, clients may pass 1.0 to get the maximum amplitude that can be generated.

Setting the amplitude applies only to the noise and to the sine wave functions. The value generated when in constant mode is the value that is configured via the set_constant() function. Calling this function when in constant mode will range check the amplitude value, but will otherwise have no impact on the generated signal.

Parameters

  amplitude | Amplitude of sine wave and noise data
  port | The port on the block whose amplitude value to set

## ◆ set_constant()

virtual void uhd::rfnoc::siggen_block_control::set_constant | ( | const std::complex< double > | constant,
|  | const size_t | port )
| pure virtual

Set the constant value to generate in constant mode

Sets the value that should be generated by the function generator on the given block when the block is configured in constant mode. The hardware can output a complex value where the real and imaginary components can be between -1.0 and (2^15-1)/(2^15), or approximately 0.99997, so the provided value must reside within this range. However, for convenience, clients may pass 1.0 for either component to get the maximum positive value that can be generated.

Parameters

  constant | The constant value to generate
  port | The port on the block whose constant value to set

## ◆ set_enable()

virtual void uhd::rfnoc::siggen_block_control::set_enable | ( | const bool | enable,
|  | const size_t | port )
| pure virtual

Set the function generator stream enable flag

Enables or disables the stream of function generator data from the given port on the block.

Parameters

  enable | Stream enable/disable flag
  port | The port on the block to enable or disable

## ◆ set_samples_per_packet()

virtual void uhd::rfnoc::siggen_block_control::set_samples_per_packet | ( | const size_t | spp,
|  | const size_t | port )
| pure virtual

Set the number of samples per packet to generate

Sets the number of samples per packet to be generated by the function generator on the given block. The value will be coerced such that outgoing packets will not exceed the graph MTU.

Parameters

  spp | Number of samples per packet to generate
  port | The port on the block whose samples per packet to set

## ◆ set_sine_frequency()

void uhd::rfnoc::siggen_block_control::set_sine_frequency | ( | const double | frequency,
|  | const double | sample_rate,
|  | const size_t | port )
| inline

Configure the sinusoidal waveform generator given frequency and rate

Convenience function to configure the current phase increment between successive samples generated by the sinusoidal function generator given the desired frequency and assumed sample rate.

Parameters

  frequency | The desired frequency of the sinusoid
  sample_rate | The assumed sample rate
  port | The port on the block whose phase increment to set

## ◆ set_sine_phase_increment()

virtual void uhd::rfnoc::siggen_block_control::set_sine_phase_increment | ( | const double | phase_inc,
|  | const size_t | port )
| pure virtual

Set the phase increment between samples in sine wave mode

Sets the phase increment between successive samples generated by the function generator on the given block when the block is configured in sine wave mode. The value must be in the range [-pi, pi].

Parameters

  phase_inc | The phase increment between samples
  port | The port on the block whose phase increment to set

## ◆ set_waveform()

virtual void uhd::rfnoc::siggen_block_control::set_waveform | ( | const siggen_waveform | type,
|  | const size_t | port )
| pure virtual

Set the function generator waveform type

Sets the waveform type that the given port on the block should generate when enabled.

Parameters

  type | Function generator waveform type
  port | The port on the block whose waveform type to set

## Member Data Documentation

## ◆ REG_BLOCK_SIZE

const uint32_t uhd::rfnoc::siggen_block_control::REG_BLOCK_SIZE
| static

## ◆ REG_CARTESIAN_OFFSET

const uint32_t uhd::rfnoc::siggen_block_control::REG_CARTESIAN_OFFSET
| static

## ◆ REG_CONSTANT_OFFSET

const uint32_t uhd::rfnoc::siggen_block_control::REG_CONSTANT_OFFSET
| static

## ◆ REG_ENABLE_OFFSET

const uint32_t uhd::rfnoc::siggen_block_control::REG_ENABLE_OFFSET
| static

## ◆ REG_GAIN_OFFSET

const uint32_t uhd::rfnoc::siggen_block_control::REG_GAIN_OFFSET
| static

## ◆ REG_PHASE_INC_OFFSET

const uint32_t uhd::rfnoc::siggen_block_control::REG_PHASE_INC_OFFSET
| static

## ◆ REG_SPP_OFFSET

const uint32_t uhd::rfnoc::siggen_block_control::REG_SPP_OFFSET
| static

## ◆ REG_WAVEFORM_OFFSET

const uint32_t uhd::rfnoc::siggen_block_control::REG_WAVEFORM_OFFSET
| static

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

- siggen_block_control.hpp