Main Content

programFPGA

Program FPGA on NI USRP radio device with custom bitstream

Since R2024a

Add-On Required: This feature requires the Wireless Testbench™ Support Package for NI™ USRP™ Radios add-on.

Description

programFPGA(device,bitstreamFile,deviceTreeFile) programs the FPGA on your NI™ USRP™ radio device device with a custom bitstream file bitstreamFile and device tree file deviceTreeFile.

example

programFPGA(device,bitstreamFile) programs the FPGA on your NI USRP X310 radio device device with a custom bitstream file bitstreamFile.

Examples

collapse all

Create a usrp System object, specifying a radio setup configuration previously saved in the Radio Setup wizard.

device = usrp("MyRadio")
device = 
  usrp with properties:

          TransmitRadioGain: 10
    TransmitCenterFrequency: 2.4000e+09
           ReceiveRadioGain: 10
     ReceiveCenterFrequency: 2.4000e+09
           DUTInputAntennas: []
          DUTOutputAntennas: []
                  BypassDUT: 0
          BypassPLDDRBuffer: 0
               LoopbackMode: "Disabled"
                 SampleRate: []
            CaptureAntennas: []
           TransmitAntennas: []
       CaptureDDRAllocation: 10000000
      TransmitDDRAllocation: 10000000

Configure your radio with the DUT interfaces described by the hand-off information file and initialize the sample rate on the radio and any DUT input or output antennas. The model this file describes has one data streaming input from the radio to the FPGA, so requires one DUT input antenna.

programFPGA(device,"myBitstream.bit","myDeviceTree.dts"); 
Loading bitstream to FPGA...
Loading bitstream to FPGA is now complete.

Input Arguments

collapse all

NI USRP radio device, specified as a usrp System object™.

Path to the bitstream file, specified as a string scalar or character vector. The file is the .bit file that programs the FPGA. You generate this file in Generate Bitstream and Program FPGA of the targeting workflow.

Example: "<projectFolder>/build_N320_HG/build-N320_HG/n3xx.bit"

Path to the device tree file, specified as a string scalar or character vector. The file is the .dts file that you generate in Generate Bitstream and Program FPGA of the targeting workflow.

If your radio is NI USRP X310, you do not require this file.

Example: "<projectFolder>/build_N320_HG/build-N320_HG/n3xx.bit"

Version History

Introduced in R2024a