usrp
Description
The usrp
System object™ streams samples from the radio front end of an NI™
USRP™ radio device with a custom FPGA image created using the Target NI USRP Radios Workflow.
To stream samples from the radio front end:
Create the
usrp
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
The diagram shows an overview of the internal architecture of an NI
USRP radio. The usrp
System object enables the following:
Configure the radio front end by setting the object Properties.
Stream samples from the radio front end by calling the object as if it were a function:
device()
Transmit a test waveform over the air using the
transmit
function. This enables you to test the receive path on your DUT.Retrieve captured data from the PL DDR buffer using the
capture
function. This enables you to test the transmit path on your DUT.
For details on how to use the usrp
System object with object functions to connect to, configure and control your NI
USRP radio device, see the call sequence in Object Functions.
Creation
Description
device
= usrp(radio)
sets properties using one
or more name-value arguments. For example,
device
= usrp(radio
,Name=Value
)TransmitCenterFrequency
=2.4e9
specifies a center
frequency of 2.4 GHz on all DUT output and transmit antennas.
Input Arguments
Properties
Usage
Description
device(
streams
numSamples
)numSamples
samples from the radio front end.
Input Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Use these functions to connect to, configure and control your NI
USRP radio device. The call sequence is shown in the diagram. first create a
usrp
System object. Use the programFPGA
and
describeFPGA
functions with the bitstream and hand-off information files generated in Step 5. Generate Bitstream and Program FPGA of the targeting workflow. The
diagram shows the sequence.
First, create the usrp
System object with a radio setup configuration specified by the radio
input. Set Properties that you use to configure the
radio front end settings in a later step.
Use the programFPGA
and
describeFPGA
functions to program the FPGA on the radio with your custom bitstream and describe the DUT
interfaces with the hand-off information file. These files are generated in Step 5. Generate Bitstream and Program FPGA in the targeting
workflow.
Call setup
to connect
to the radio, apply the radio front end Properties, and validate that the block
ID in the bitstream file matches the hand-off information file. You now have a live connection
to your radio. You can update tunable properties and connect to your DUT using the fpga
object. You can
read or write registers on the DUT using the readPort
and
writePort
function.
This enables you to start streaming samples into your radio with the DUT ports in a known
state.
Call the System object as a function or call the step
function on the System object to start the radio front end. This will call setup
if you did
not do this previously, then start requesting streaming samples from the radio front end into
the FPGA. Specify the numSamples
argument
to request a specific number of samples, or stream samples continuously by specifying no input
arguments.
Call the reset
function to stop the radio front end and
restore the radio back to the initialized state, before you called setup
. This stops
any ongoing transmit or write operation and flushes the receive buffers. Any streaming
connections between the DUT and the radio front end may not be flushed.
Call the release
function to release the hardware
resources. This stops any ongoing transmit or write operation and flushes the receive buffers.
Any streaming connections between the DUT and the radio front end may not be flushed.
Examples
Version History
Introduced in R2024a