RFNoC Fast Add-Subtract Block: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(initial creation)
 
No edit summary
 
Line 1: Line 1:
<!-- RFNoC_Fast_Add-Subtract_Block.mediawiki -->
<!-- RFNoC_Fast_Add-Subtract_Block.mediawiki -->
<!-- /dcs/local/share/gnuradio/grc/blocks/uhd_rfnoc_addsub.block.yml -->
<!-- /dcs/local/share/gnuradio/grc/blocks/uhd_rfnoc_addsub.block.yml -->
RFNoC AddSub Block:<br>
 
For two complex input streams x and y, return the sum (x+y) and the difference
For two complex input streams x and y, return the sum (x+y) and the difference
(x-y) of those two input streams.
(x-y) of those two input streams.
Line 7: Line 7:
== 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>
;Block Args
;Block Args
:default: ""
:default: ""
;Device Select
:Viable properties can be found at [https://files.ettus.com/manual/classuhd_1_1rfnoc_1_1addsub__block__control.html RFNoC AddSub control].
:default: -1
 
;Instance 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.
:- 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.


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


== Example Output ==
== Example Output ==
Line 21: Line 34:


; C++ files
; C++ files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio NA]


; Header files
; Header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio NA]


; Public header files
; Public header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio NA]


; Block definition
; Block definition

Latest revision as of 14:59, 12 May 2025


For two complex input streams x and y, return the sum (x+y) and the difference (x-y) of those two input streams.

Parameters

(R): Run-time adjustable

Block Args
default: ""
Viable properties can be found at RFNoC AddSub 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.

Example Flowgraph

You can find this example at rfnoc_addsub.png
RFNoC addsub.png

Example Output

Source Files

C++ files
NA
Header files
NA
Public header files
NA
Block definition
uhd_rfnoc_addsub