Main Content

programFPGA

Program the FPGA on an NI USRP radio device with a custom bitstream

Since R2024a

Description

example

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.

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 with the handoff information file and initialise the sample rate on the radio and any DUT input or output antennas. The model this 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. This is the .bit file used to program the FPGA. You generate this file in Step 5. Generate Bitstream and Program FPGA in 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. This is the .dts file you generate in Step 5. Generate Bitstream and Program FPGA in the targeting workflow.

This file is not created if your radio is NI USRP X310.

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

Version History

Introduced in R2024a