RFNoC RX Radio: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(initial creation)
 
(Updated/Completed description for the RX Radio block)
Line 1: Line 1:
<!-- RFNoC_RX_Radio.mediawiki -->
<!-- RFNoC_RX_Radio.mediawiki -->
<!-- /dcs/local/share/gnuradio/grc/blocks/uhd_rfnoc_rx_radio.block.yml -->
<!-- /dcs/local/share/gnuradio/grc/blocks/uhd_rfnoc_rx_radio.block.yml -->
Statement of purpose / function<br>
The RFNoC RX Radio block is used to stream samples from the USRP receiver into the RFNoC module. Its functionality is very similar to the
[https://wiki.gnuradio.org/index.php?title=USRP_Source USRP Source Block], with the distinction that the output can be
instantly processed in the FPGA part of the USRP. Therefore, this block allows for lower latency and real-time
processing, which is beneficial in applications requiring tight integration between the RF front-end and the digital
signal processing chain. This enables more efficient handling of high data rates and computationally intensive tasks
directly within the FPGA.
<br>
== Parameters ==
== Parameters ==
<b>(R):</b> <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls <b>Run-time adjustable</b>]</span><br>
<b>(R):</b> <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls <b>Run-time adjustable</b>]</span><br>
Line 7: Line 13:
;Channel count
;Channel count
:default: 1
:default: 1
:This specifies the number of channels / streams to be used with the block.


;Block Args
;Block Args
:default: ""
:default: ""
:Viable properties can be found at [https://files.ettus.com/manual/classuhd_1_1rfnoc_1_1radio__control.html RFNoC Radio control].


;Device Select
;Device Select / Instance Select
:default: -1
:Default: -1 / Default: -1
 
:These properties specify the device and instance to be used. It is best practice to always explicitly specify both. This is crucial because many USRP setups involve multiple instances of different blocks, and GNU Radio tends to select the first device or instance it finds, which may not be the most suitable choice. Explicit specification helps to prevent errors and ensures the correct setup is used.
;Instance Select
:- Use ''uhd_usrp_probe'' to determine the correct device and instance numbers.
:default: -1
:- Always specify the device and instance explicitly to avoid automatic mismatches by GNU Radio.
:Even with a single device with multiple instances:
:- 0/Radio#0 → Device 0, Instance 0
:- 0/Radio#1 → Device 0, Instance 1
:Specification with multiple devices:
:- 0/Radio#1 → Device 0, Instance 1
:- 1/Radio#1 → Device 1, Instance 1
:By consistently specifying the device and instance, you ensure that the most appropriate settings are applied and avoid potential issues caused by automatic selection.


;Sample Rate (Hz)
;Sample Rate (Hz)
:dtype: real
:dtype: real
:The number of samples per second, which is equal to the bandwidth in Hz we wish to observe. The UHD device driver will try its best to match the requested sample rate. If the requested rate is not possible, the UHD block will print an error at runtime.


;Ch0 Antenna Select
;Ch0 Antenna Select
:options: [TX/RX, RX2, RX1]
:options: [TX/RX, RX2, RX1]
:default: RX2
:default: RX2
:For subdevices with only one antenna, this may be left on default. Otherwise, the user should specify one of the possible antenna choices. See the daughter-board application notes for the possible antenna choices.


;Ch0 Center Frequency (Hz)
;Ch0 Center Frequency (Hz)
:default: 1e9
:default: 1e9
:Specifies the center frequency used for downconversion. This frequency is the focal point around which the incoming signal is shifted to a lower frequency for further processing, ensuring accurate capture of the target frequency band.


;Ch0 Gain
;Ch0 Gain
:default: 0
:default: 0
 
:Value used for gain, which is either between 0 and the max gain for the USRP (usually around 70 to 90), when using the default "Absolute" Gain Type.
;Ch0 Bandwidth (Hz)
;Ch0 Bandwidth (Hz)
:default: 0
:default: 0
:The bandwidth used by the USRP's anti-aliasing filter. To use the default bandwidth filter setting, this should be zero. Only certain subdevices have configurable bandwidth filters. See the daughterboard application notes for possible configurations.


;Ch0 DC Offset Correction
;Ch0 DC Offset Correction
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'False'
:default: 'False'
:Attempts to remove the DC offset, i.e. the average value of a signal, which is something that will be very visible in the Frequency domain.


;Ch0 IQ Balance
;Ch0 IQ Balance
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'False'
:default: 'False'
:Attempts to correct any IQ imbalance, which is when there is a mismatch between the I and Q signal paths, typically causing a stretching effect to a constellation.


;Ch0 Enable Timestamps
;Ch0 Enable Timestamps
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'True'
:default: 'True'
:Controls whether or not a channel has timestamps


;Ch1 Antenna Select
;Ch1 Antenna Select
:options: [TX/RX, RX2, RX1]
:options: [TX/RX, RX2, RX1]
:default: RX2
:default: RX2
:For subdevices with only one antenna, this may be left on default. Otherwise, the user should specify one of the possible antenna choices. See the daughter-board application notes for the possible antenna choices.


;Ch1 Center Frequency (Hz)
;Ch1 Center Frequency (Hz)
:default: 1e9
:default: 1e9
:Specifies the center frequency used for downconversion. This frequency is the focal point around which the incoming signal is shifted to a lower frequency for further processing, ensuring accurate capture of the target frequency band.


;Ch1 Gain
;Ch1 Gain
:default: 0
:default: 0
:Value used for gain, which is either between 0 and the max gain for the USRP (usually around 70 to 90), when using the default "Absolute" Gain Type.


;Ch1 Bandwidth (Hz)
;Ch1 Bandwidth (Hz)
:default: 0
:default: 0
:The bandwidth used by the USRP's anti-aliasing filter. To use the default bandwidth filter setting, this should be zero. Only certain subdevices have configurable bandwidth filters. See the daughterboard application notes for possible configurations.


;Ch1 DC Offset Correction
;Ch1 DC Offset Correction
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'False'
:default: 'False'
:Attempts to remove the DC offset, i.e. the average value of a signal, which is something that will be very visible in the Frequency domain.


;Ch1 IQ Balance
;Ch1 IQ Balance
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'False'
:default: 'False'
:Attempts to correct any IQ imbalance, which is when there is a mismatch between the I and Q signal paths, typically causing a stretching effect to a constellation.


;Ch1 Enable Timestamps
;Ch1 Enable Timestamps
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'True'
:default: 'True'
:Controls whether or not a channel has timestamps


;Ch2 Antenna Select
;Ch2 ;Ch0 Antenna Select
:options: [TX/RX, RX2, RX1]
:options: [TX/RX, RX2, RX1]
:default: RX2
:default: RX2
:For subdevices with only one antenna, this may be left on default. Otherwise, the user should specify one of the possible antenna choices. See the daughter-board application notes for the possible antenna choices.


;Ch2 Center Frequency (Hz)
;Ch2 Center Frequency (Hz)
:default: 1e9
:default: 1e9
:Specifies the center frequency used for downconversion. This frequency is the focal point around which the incoming signal is shifted to a lower frequency for further processing, ensuring accurate capture of the target frequency band.


;Ch2 Gain
;Ch2 Gain
:default: 0
:default: 0
 
:Value used for gain, which is either between 0 and the max gain for the USRP (usually around 70 to 90), when using the default "Absolute" Gain Type.
;Ch2 Bandwidth (Hz)
;Ch2 Bandwidth (Hz)
:default: 0
:default: 0
:The bandwidth used by the USRP's anti-aliasing filter. To use the default bandwidth filter setting, this should be zero. Only certain subdevices have configurable bandwidth filters. See the daughterboard application notes for possible configurations.


;Ch2 DC Offset Correction
;Ch2 DC Offset Correction
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'False'
:default: 'False'
:Attempts to remove the DC offset, i.e. the average value of a signal, which is something that will be very visible in the Frequency domain.


;Ch2 IQ Balance
;Ch2 IQ Balance
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'False'
:default: 'False'
:Attempts to correct any IQ imbalance, which is when there is a mismatch between the I and Q signal paths, typically causing a stretching effect to a constellation.


;Ch2 Enable Timestamps
;Ch2 Enable Timestamps
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'True'
:default: 'True'
:Controls whether or not a channel has timestamps


;Ch3 Antenna Select
;Ch3 ;Ch0 Antenna Select
:options: [TX/RX, RX2, RX1]
:options: [TX/RX, RX2, RX1]
:default: RX2
:default: RX2
:For subdevices with only one antenna, this may be left on default. Otherwise, the user should specify one of the possible antenna choices. See the daughter-board application notes for the possible antenna choices.


;Ch3 Center Frequency (Hz)
;Ch3 Center Frequency (Hz)
:default: 1e9
:default: 1e9
:Specifies the center frequency used for downconversion. This frequency is the focal point around which the incoming signal is shifted to a lower frequency for further processing, ensuring accurate capture of the target frequency band.


;Ch3 Gain
;Ch3 Gain
:default: 0
:default: 0
 
:Value used for gain, which is either between 0 and the max gain for the USRP (usually around 70 to 90), when using the default "Absolute" Gain Type.
;Ch3 Bandwidth (Hz)
;Ch3 Bandwidth (Hz)
:default: 0
:default: 0
:The bandwidth used by the USRP's anti-aliasing filter. To use the default bandwidth filter setting, this should be zero. Only certain subdevices have configurable bandwidth filters. See the daughterboard application notes for possible configurations.


;Ch3 DC Offset Correction
;Ch3 DC Offset Correction
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'False'
:default: 'False'
:Attempts to remove the DC offset, i.e. the average value of a signal, which is something that will be very visible in the Frequency domain.


;Ch3 IQ Balance
;Ch3 IQ Balance
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'False'
:default: 'False'
:Attempts to correct any IQ imbalance, which is when there is a mismatch between the I and Q signal paths, typically causing a stretching effect to a constellation.


;Ch3 Enable Timestamps
;Ch3 Enable Timestamps
:options: ['True', 'False']
:options: ['True', 'False']
:default: 'True'
:default: 'True'
:Controls whether or not a channel has timestamps


== Example Flowgraph ==
== Example Flowgraph ==
You can find this example at [https://github.com/gnuradio/gnuradio/blob/main/gr-uhd/examples/grc/rfnoc_radio_loopback.grc rfnoc_radio_loopback.grc] <br>
[[File:Rfnoc radio loopback.png]]


== Example Output ==
== Example Output ==
Line 127: Line 173:


; C++ files
; C++ files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/main/gr-uhd/lib/rfnoc_rx_radio_impl.cc rfnoc_rx_radio_impl.cc]


; Header files
; Header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/main/gr-uhd/lib/rfnoc_rx_radio_impl.h rfnoc_rx_radio_impl.h]


; Public header files
; Public header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/main/gr-uhd/include/gnuradio/uhd/rfnoc_rx_radio.h rfnoc_rx_radio.h]


; Block definition
; Block definition

Revision as of 15:07, 12 May 2025

The RFNoC RX Radio block is used to stream samples from the USRP receiver into the RFNoC module. Its functionality is very similar to the USRP Source Block, with the distinction that the output can be instantly processed in the FPGA part of the USRP. Therefore, this block allows for lower latency and real-time processing, which is beneficial in applications requiring tight integration between the RF front-end and the digital signal processing chain. This enables more efficient handling of high data rates and computationally intensive tasks directly within the FPGA.

Parameters

(R): Run-time adjustable

Channel count
default: 1
This specifies the number of channels / streams to be used with the block.
Block Args
default: ""
Viable properties can be found at RFNoC Radio control.
Device Select / Instance Select
Default: -1 / Default: -1
These properties specify the device and instance to be used. It is best practice to always explicitly specify both. This is crucial because many USRP setups involve multiple instances of different blocks, and GNU Radio tends to select the first device or instance it finds, which may not be the most suitable choice. Explicit specification helps to prevent errors and ensures the correct setup is used.
- Use uhd_usrp_probe to determine the correct device and instance numbers.
- Always specify the device and instance explicitly to avoid automatic mismatches by GNU Radio.
Even with a single device with multiple instances:
- 0/Radio#0 → Device 0, Instance 0
- 0/Radio#1 → Device 0, Instance 1
Specification with multiple devices:
- 0/Radio#1 → Device 0, Instance 1
- 1/Radio#1 → Device 1, Instance 1
By consistently specifying the device and instance, you ensure that the most appropriate settings are applied and avoid potential issues caused by automatic selection.
Sample Rate (Hz)
dtype: real
The number of samples per second, which is equal to the bandwidth in Hz we wish to observe. The UHD device driver will try its best to match the requested sample rate. If the requested rate is not possible, the UHD block will print an error at runtime.
Ch0 Antenna Select
options: [TX/RX, RX2, RX1]
default: RX2
For subdevices with only one antenna, this may be left on default. Otherwise, the user should specify one of the possible antenna choices. See the daughter-board application notes for the possible antenna choices.
Ch0 Center Frequency (Hz)
default: 1e9
Specifies the center frequency used for downconversion. This frequency is the focal point around which the incoming signal is shifted to a lower frequency for further processing, ensuring accurate capture of the target frequency band.
Ch0 Gain
default: 0
Value used for gain, which is either between 0 and the max gain for the USRP (usually around 70 to 90), when using the default "Absolute" Gain Type.
Ch0 Bandwidth (Hz)
default: 0
The bandwidth used by the USRP's anti-aliasing filter. To use the default bandwidth filter setting, this should be zero. Only certain subdevices have configurable bandwidth filters. See the daughterboard application notes for possible configurations.
Ch0 DC Offset Correction
options: ['True', 'False']
default: 'False'
Attempts to remove the DC offset, i.e. the average value of a signal, which is something that will be very visible in the Frequency domain.
Ch0 IQ Balance
options: ['True', 'False']
default: 'False'
Attempts to correct any IQ imbalance, which is when there is a mismatch between the I and Q signal paths, typically causing a stretching effect to a constellation.
Ch0 Enable Timestamps
options: ['True', 'False']
default: 'True'
Controls whether or not a channel has timestamps
Ch1 Antenna Select
options: [TX/RX, RX2, RX1]
default: RX2
For subdevices with only one antenna, this may be left on default. Otherwise, the user should specify one of the possible antenna choices. See the daughter-board application notes for the possible antenna choices.
Ch1 Center Frequency (Hz)
default: 1e9
Specifies the center frequency used for downconversion. This frequency is the focal point around which the incoming signal is shifted to a lower frequency for further processing, ensuring accurate capture of the target frequency band.
Ch1 Gain
default: 0
Value used for gain, which is either between 0 and the max gain for the USRP (usually around 70 to 90), when using the default "Absolute" Gain Type.
Ch1 Bandwidth (Hz)
default: 0
The bandwidth used by the USRP's anti-aliasing filter. To use the default bandwidth filter setting, this should be zero. Only certain subdevices have configurable bandwidth filters. See the daughterboard application notes for possible configurations.
Ch1 DC Offset Correction
options: ['True', 'False']
default: 'False'
Attempts to remove the DC offset, i.e. the average value of a signal, which is something that will be very visible in the Frequency domain.
Ch1 IQ Balance
options: ['True', 'False']
default: 'False'
Attempts to correct any IQ imbalance, which is when there is a mismatch between the I and Q signal paths, typically causing a stretching effect to a constellation.
Ch1 Enable Timestamps
options: ['True', 'False']
default: 'True'
Controls whether or not a channel has timestamps
Ch2 ;Ch0 Antenna Select
options: [TX/RX, RX2, RX1]
default: RX2
For subdevices with only one antenna, this may be left on default. Otherwise, the user should specify one of the possible antenna choices. See the daughter-board application notes for the possible antenna choices.
Ch2 Center Frequency (Hz)
default: 1e9
Specifies the center frequency used for downconversion. This frequency is the focal point around which the incoming signal is shifted to a lower frequency for further processing, ensuring accurate capture of the target frequency band.
Ch2 Gain
default: 0
Value used for gain, which is either between 0 and the max gain for the USRP (usually around 70 to 90), when using the default "Absolute" Gain Type.
Ch2 Bandwidth (Hz)
default: 0
The bandwidth used by the USRP's anti-aliasing filter. To use the default bandwidth filter setting, this should be zero. Only certain subdevices have configurable bandwidth filters. See the daughterboard application notes for possible configurations.
Ch2 DC Offset Correction
options: ['True', 'False']
default: 'False'
Attempts to remove the DC offset, i.e. the average value of a signal, which is something that will be very visible in the Frequency domain.
Ch2 IQ Balance
options: ['True', 'False']
default: 'False'
Attempts to correct any IQ imbalance, which is when there is a mismatch between the I and Q signal paths, typically causing a stretching effect to a constellation.
Ch2 Enable Timestamps
options: ['True', 'False']
default: 'True'
Controls whether or not a channel has timestamps
Ch3 ;Ch0 Antenna Select
options: [TX/RX, RX2, RX1]
default: RX2
For subdevices with only one antenna, this may be left on default. Otherwise, the user should specify one of the possible antenna choices. See the daughter-board application notes for the possible antenna choices.
Ch3 Center Frequency (Hz)
default: 1e9
Specifies the center frequency used for downconversion. This frequency is the focal point around which the incoming signal is shifted to a lower frequency for further processing, ensuring accurate capture of the target frequency band.
Ch3 Gain
default: 0
Value used for gain, which is either between 0 and the max gain for the USRP (usually around 70 to 90), when using the default "Absolute" Gain Type.
Ch3 Bandwidth (Hz)
default: 0
The bandwidth used by the USRP's anti-aliasing filter. To use the default bandwidth filter setting, this should be zero. Only certain subdevices have configurable bandwidth filters. See the daughterboard application notes for possible configurations.
Ch3 DC Offset Correction
options: ['True', 'False']
default: 'False'
Attempts to remove the DC offset, i.e. the average value of a signal, which is something that will be very visible in the Frequency domain.
Ch3 IQ Balance
options: ['True', 'False']
default: 'False'
Attempts to correct any IQ imbalance, which is when there is a mismatch between the I and Q signal paths, typically causing a stretching effect to a constellation.
Ch3 Enable Timestamps
options: ['True', 'False']
default: 'True'
Controls whether or not a channel has timestamps

Example Flowgraph

You can find this example at rfnoc_radio_loopback.grc
Rfnoc radio loopback.png

Example Output

Source Files

C++ files
rfnoc_rx_radio_impl.cc
Header files
rfnoc_rx_radio_impl.h
Public header files
rfnoc_rx_radio.h
Block definition
uhd_rfnoc_rx_radio.block.yml