UHD  003.001.002
Namespaces | Classes | Typedefs | Enumerations | Functions
uhd::usrp Namespace Reference

Namespaces

 dsp_type1
 

Classes

class  dboard_base
 
struct  dboard_eeprom_t
 
class  dboard_id_t
 
class  dboard_iface
 
struct  dboard_iface_special_props_t
 Special properties that differentiate this daughterboard slot. More...
 
class  dboard_manager
 
struct  mboard_eeprom_t
 
class  mboard_iface
 
class  multi_usrp
 
class  rx_dboard_base
 
struct  subdev_spec_pair_t
 
class  subdev_spec_t
 
class  tx_dboard_base
 
class  xcvr_dboard_base
 

Typedefs

typedef multi_usrp single_usrp
 Multi-USRP is a superset of Single-USRP. More...
 

Enumerations

enum  codec_prop_t {
  CODEC_PROP_NAME, CODEC_PROP_OTHERS, CODEC_PROP_GAIN_I, CODEC_PROP_GAIN_Q,
  CODEC_PROP_GAIN_RANGE, CODEC_PROP_GAIN_NAMES
}
 
enum  dboard_prop_t {
  DBOARD_PROP_NAME, DBOARD_PROP_SUBDEV, DBOARD_PROP_SUBDEV_NAMES, DBOARD_PROP_DBOARD_EEPROM,
  DBOARD_PROP_GBOARD_EEPROM, DBOARD_PROP_DBOARD_IFACE, DBOARD_PROP_CODEC, DBOARD_PROP_GAIN_GROUP
}
 
enum  device_prop_t { DEVICE_PROP_NAME, DEVICE_PROP_MBOARD, DEVICE_PROP_MBOARD_NAMES }
 
enum  dsp_prop_t {
  DSP_PROP_NAME, DSP_PROP_OTHERS, DSP_PROP_STREAM_CMD, DSP_PROP_FREQ_SHIFT,
  DSP_PROP_CODEC_RATE, DSP_PROP_HOST_RATE
}
 
enum  mboard_prop_t {
  MBOARD_PROP_NAME, MBOARD_PROP_OTHERS, MBOARD_PROP_SENSOR, MBOARD_PROP_SENSOR_NAMES,
  MBOARD_PROP_CLOCK_RATE, MBOARD_PROP_RX_DSP, MBOARD_PROP_RX_DSP_NAMES, MBOARD_PROP_TX_DSP,
  MBOARD_PROP_TX_DSP_NAMES, MBOARD_PROP_RX_DBOARD, MBOARD_PROP_RX_DBOARD_NAMES, MBOARD_PROP_TX_DBOARD,
  MBOARD_PROP_TX_DBOARD_NAMES, MBOARD_PROP_RX_SUBDEV_SPEC, MBOARD_PROP_TX_SUBDEV_SPEC, MBOARD_PROP_CLOCK_CONFIG,
  MBOARD_PROP_TIME_NOW, MBOARD_PROP_TIME_PPS, MBOARD_PROP_EEPROM_MAP, MBOARD_PROP_IFACE
}
 
enum  gain_group_policy_t { GAIN_GROUP_POLICY_RX = 'R', GAIN_GROUP_POLICY_TX = 'T' }
 
enum  subdev_conn_t { SUBDEV_CONN_COMPLEX_IQ = 'C', SUBDEV_CONN_COMPLEX_QI = 'c', SUBDEV_CONN_REAL_I = 'R', SUBDEV_CONN_REAL_Q = 'r' }
 
enum  subdev_prop_t {
  SUBDEV_PROP_NAME, SUBDEV_PROP_OTHERS, SUBDEV_PROP_SENSOR, SUBDEV_PROP_SENSOR_NAMES,
  SUBDEV_PROP_GAIN, SUBDEV_PROP_GAIN_RANGE, SUBDEV_PROP_GAIN_NAMES, SUBDEV_PROP_FREQ,
  SUBDEV_PROP_FREQ_RANGE, SUBDEV_PROP_ANTENNA, SUBDEV_PROP_ANTENNA_NAMES, SUBDEV_PROP_CONNECTION,
  SUBDEV_PROP_ENABLED, SUBDEV_PROP_USE_LO_OFFSET, SUBDEV_PROP_BANDWIDTH
}
 

Functions

UHD_API bool operator== (const dboard_id_t &lhs, const dboard_id_t &rhs)
 
UHD_API gain_group::sptr make_gain_group (const dboard_id_t &dboard_id, wax::obj subdev, wax::obj codec, gain_group_policy_t gain_group_policy)
 
UHD_API void verify_rx_subdev_spec (subdev_spec_t &subdev_spec, wax::obj mboard)
 
UHD_API void verify_tx_subdev_spec (subdev_spec_t &subdev_spec, wax::obj mboard)
 
UHD_API bool operator== (const subdev_spec_pair_t &, const subdev_spec_pair_t &)
 overloaded comparison operator for subdev_spec_pair_t More...
 
UHD_API tune_result_t tune_rx_subdev_and_dsp (wax::obj subdev, wax::obj ddc, const tune_request_t &tune_request)
 
UHD_API double derive_freq_from_rx_subdev_and_dsp (wax::obj subdev, wax::obj ddc)
 
UHD_API tune_result_t tune_tx_subdev_and_dsp (wax::obj subdev, wax::obj duc, const tune_request_t &tune_request)
 
UHD_API double derive_freq_from_tx_subdev_and_dsp (wax::obj subdev, wax::obj duc)
 

Typedef Documentation

◆ single_usrp

Multi-USRP is a superset of Single-USRP.

Enumeration Type Documentation

◆ codec_prop_t

Possible device codec properties: A codec is expected to have a rate and gain elements. Other properties can be discovered through the others prop.

Enumerator
CODEC_PROP_NAME 
CODEC_PROP_OTHERS 
CODEC_PROP_GAIN_I 
CODEC_PROP_GAIN_Q 
CODEC_PROP_GAIN_RANGE 
CODEC_PROP_GAIN_NAMES 

◆ dboard_prop_t

Possible device dboard properties: A dboard has an id, one or more subdevices, and a codec. A dboard is considered to be unidirectional (RX or TX).

Enumerator
DBOARD_PROP_NAME 
DBOARD_PROP_SUBDEV 
DBOARD_PROP_SUBDEV_NAMES 
DBOARD_PROP_DBOARD_EEPROM 
DBOARD_PROP_GBOARD_EEPROM 
DBOARD_PROP_DBOARD_IFACE 
DBOARD_PROP_CODEC 
DBOARD_PROP_GAIN_GROUP 

◆ device_prop_t

Possible device properties: In general, a device will have a single mboard. In certain mimo applications, multiple boards will be present in the interface for configuration.

Enumerator
DEVICE_PROP_NAME 
DEVICE_PROP_MBOARD 
DEVICE_PROP_MBOARD_NAMES 

◆ dsp_prop_t

Possible device dsp properties: A dsp is a black box fpga component found between the over-the-wire data and the codec pins.

The host rate can be modified to control resampling. Resampling can take the form of decimation, interpolation, or more complex fractional resampling techniques. As usual, read back the host rate after setting it to get the actual rate that was set (implementation dependent).

A dsp can also shift the digital stream in frequency. Set the shift property and read it back to get actual shift.

Enumerator
DSP_PROP_NAME 
DSP_PROP_OTHERS 
DSP_PROP_STREAM_CMD 
DSP_PROP_FREQ_SHIFT 
DSP_PROP_CODEC_RATE 
DSP_PROP_HOST_RATE 

◆ gain_group_policy_t

Different policies for gain group prioritization.

Enumerator
GAIN_GROUP_POLICY_RX 
GAIN_GROUP_POLICY_TX 

◆ mboard_prop_t

Possible device mboard properties: The general mboard properties are listed below. Custom properties can be identified with a string and discovered though the others property.

Enumerator
MBOARD_PROP_NAME 
MBOARD_PROP_OTHERS 
MBOARD_PROP_SENSOR 
MBOARD_PROP_SENSOR_NAMES 
MBOARD_PROP_CLOCK_RATE 
MBOARD_PROP_RX_DSP 
MBOARD_PROP_RX_DSP_NAMES 
MBOARD_PROP_TX_DSP 
MBOARD_PROP_TX_DSP_NAMES 
MBOARD_PROP_RX_DBOARD 
MBOARD_PROP_RX_DBOARD_NAMES 
MBOARD_PROP_TX_DBOARD 
MBOARD_PROP_TX_DBOARD_NAMES 
MBOARD_PROP_RX_SUBDEV_SPEC 
MBOARD_PROP_TX_SUBDEV_SPEC 
MBOARD_PROP_CLOCK_CONFIG 
MBOARD_PROP_TIME_NOW 
MBOARD_PROP_TIME_PPS 
MBOARD_PROP_EEPROM_MAP 
MBOARD_PROP_IFACE 

◆ subdev_conn_t

Possible subdev connection types:

A complex subdevice is physically connected to both channels, which may be connected in one of two ways: IQ or QI (swapped).

A real subdevice is only physically connected one channel, either only the I channel or only the Q channel.

Enumerator
SUBDEV_CONN_COMPLEX_IQ 
SUBDEV_CONN_COMPLEX_QI 
SUBDEV_CONN_REAL_I 
SUBDEV_CONN_REAL_Q 

◆ subdev_prop_t

Possible device subdev properties

Enumerator
SUBDEV_PROP_NAME 
SUBDEV_PROP_OTHERS 
SUBDEV_PROP_SENSOR 
SUBDEV_PROP_SENSOR_NAMES 
SUBDEV_PROP_GAIN 
SUBDEV_PROP_GAIN_RANGE 
SUBDEV_PROP_GAIN_NAMES 
SUBDEV_PROP_FREQ 
SUBDEV_PROP_FREQ_RANGE 
SUBDEV_PROP_ANTENNA 
SUBDEV_PROP_ANTENNA_NAMES 
SUBDEV_PROP_CONNECTION 
SUBDEV_PROP_ENABLED 
SUBDEV_PROP_USE_LO_OFFSET 
SUBDEV_PROP_BANDWIDTH 

Function Documentation

◆ derive_freq_from_rx_subdev_and_dsp()

UHD_API double uhd::usrp::derive_freq_from_rx_subdev_and_dsp ( wax::obj  subdev,
wax::obj  ddc 
)

Calculate the overall frequency from the combination of dboard IF and DDC shift.

Parameters
subdevthe dboard subdevice object with properties
ddcthe mboard dsp object with properties
Returns
the overall tune frequency of the system in Hz

◆ derive_freq_from_tx_subdev_and_dsp()

UHD_API double uhd::usrp::derive_freq_from_tx_subdev_and_dsp ( wax::obj  subdev,
wax::obj  duc 
)

Calculate the overall frequency from the combination of dboard IF and DUC shift.

Parameters
subdevthe dboard subdevice object with properties
ducthe mboard dsp object with properties
Returns
the overall tune frequency of the system in Hz

◆ make_gain_group()

UHD_API gain_group::sptr uhd::usrp::make_gain_group ( const dboard_id_t dboard_id,
wax::obj  subdev,
wax::obj  codec,
gain_group_policy_t  gain_group_policy 
)

Create a gain group that represents the subdevice and its codec.

Parameters
dboard_idthe dboard id for this subdevice
subdevthe object with subdevice properties
codecthe object with codec properties
gain_group_policythe policy to use

◆ operator==() [1/2]

UHD_API bool uhd::usrp::operator== ( const subdev_spec_pair_t ,
const subdev_spec_pair_t  
)

overloaded comparison operator for subdev_spec_pair_t

◆ operator==() [2/2]

UHD_API bool uhd::usrp::operator== ( const dboard_id_t lhs,
const dboard_id_t rhs 
)

Comparator operator overloaded for dboard ids. The boost::equality_comparable provides the !=.

Parameters
lhsthe dboard id to the left of the operator
rhsthe dboard id to the right of the operator
Returns
true when the dboard ids are equal

◆ tune_rx_subdev_and_dsp()

UHD_API tune_result_t uhd::usrp::tune_rx_subdev_and_dsp ( wax::obj  subdev,
wax::obj  ddc,
const tune_request_t tune_request 
)

Tune a rx chain to the desired frequency: The IF of the subdevice is set as close as possible to the given target frequency + the LO offset (when applicable). The ddc cordic is setup to bring the IF down to baseband.

Parameters
subdevthe dboard subdevice object with properties
ddcthe mboard dsp object with properties
tune_requesttune request instructions
Returns
a tune result struct

◆ tune_tx_subdev_and_dsp()

UHD_API tune_result_t uhd::usrp::tune_tx_subdev_and_dsp ( wax::obj  subdev,
wax::obj  duc,
const tune_request_t tune_request 
)

Tune a tx chain to the desired frequency: The IF of the subdevice is set as close as possible to the given target frequency + the LO offset (when applicable). The duc cordic is setup to bring the baseband up to IF.

Parameters
subdevthe dboard subdevice object with properties
ducthe mboard dsp object with properties
tune_requesttune request instructions
Returns
a tune result struct

◆ verify_rx_subdev_spec()

UHD_API void uhd::usrp::verify_rx_subdev_spec ( subdev_spec_t subdev_spec,
wax::obj  mboard 
)

Verify the rx subdevice specification. If the subdev spec if empty, automatically fill it.

Parameters
subdev_specthe subdev spec to verify/fill
mboardthe motherboard properties object
Exceptions
exceptionwhen the subdev spec is invalid

◆ verify_tx_subdev_spec()

UHD_API void uhd::usrp::verify_tx_subdev_spec ( subdev_spec_t subdev_spec,
wax::obj  mboard 
)

Verify the tx subdevice specification. If the subdev spec if empty, automatically fill it.

Parameters
subdev_specthe subdev spec to verify/fill
mboardthe motherboard properties object
Exceptions
exceptionwhen the subdev spec is invalid