Example Code

NI USRP RIO Full Ethernet Support Reference Architecture

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • RF|Wireless

    Software

  • LabVIEW
  • LabVIEW FPGA Module

    Driver

  • NI RF Device Drivers

    Operating System

  • Windows

    Programming Language

  • LabVIEW G

    Other

  • USRP RIO, NI USRP Driver

Code and Documents

Attachment

Description

This document explains how to install, configure, and test the National Instruments universal software radio peripheral (USRP) 294xR or 295xR(*) device with the new Ethernet based Reference Architecture. This Reference Architecture configures the USRP RIO and passes TX/RX data all through the Ethernet Port and while having a customized FPGA code pre-deployed. Using this architecture, the USRP RIO device doesn't have to be connected with an MXI Link to be used with the LabVIEW envrionment execpt when flashing a custom FPGA bitfile based on the source FPGA provided in this project.

 

(*) TwinRX USRPs are not yet supported by this architecture.

 

 

 

How to Use

To use the NI-USRP instrument driver, your system must meet certain requirements. Refer to the product readme, which is available on the driver software media or online at ni.com/manuals, for more information about minimum system requirements, recommended system, and supported application development environments (ADEs).

Required Hardware

  • NI 294xR or NI 295xR – NI-2945& NI 2955 TwinRX USRPs are not supported
  • AC/DC Power Supply and Power Cable
  • 10 Gbit SFP+ Ethernet Cable
  • Computer with available 10 Gbit Ethernet interface*
  • NI PCIe-MXI Express interface kit for USRP RIO**

Installing the Software

You must be an administrator to install NI Software on your computer.

 

  1. Install LabVIEW 2019 or later and the corresponding LabVIEW FPGA version.
  2. Download the NI USRP driver software corresponding to your LabVIEW Version or above.
  3. Install the driver by following the instructions in the installation wizard.
  4. When the installer completes, restart your computer.
  5. Extract the folders from the zipped file named Drivers Support which you got with the Reference Architecture material
  6. Backup the folder lib in the LabVIEW install folder in case you need to revert back to the stock USRP Driver files.
  7. Copy-Paste the extracted lib folder in the LabVIEW install folder: C:\Program Files (x86)\National Instruments\LabVIEW 201x
  8. When prompted, choose to replace all, this will replace the older version of the Library.
  9. Copy-Paste the Ethernet USRP RIO folder, provided to you with the Reference Architecture material, to the Desktop.

(*)          You can find the recommended 10Gbit Ethernet card in this link for the PCIe version. For the PXIe version, you can find the recommended card in this link.

(**)        This PCIe-MXI interface kit will only be used to deploy the bitfile to the Flash of the USRP RIO the first time

Installing the Hardware

Install all the software that you plan to use before you install the hardware.

Setup needed to deploy the FPGA bitfile:

  1. Power off the computer and the USRP device.
  2. Plug-in the MXI Express Interface Kit to connect the USRP device to the computer.
  3. Connect the MXI device to the USRP device using the included cable.
  4. Power on the USRP device then power on your computer.

Setup needed to run the Reference Architecture:

  1. Power off the computer
  2. Plug-in the 10Gbit Ethernet Card into an appropriate PCIe slot in your computer
  3. Connect the SFP 0 port of the USRP RIO* to the 10Gbit Ethernet card using the SFP+ cable
  4. Power on the computer and the USRP RIO

Setting Up the Network

You must configure your 10Gbit Ethernet Card to accept large packets:

 

  1. Right-click My Computer and select Manage
  2. Select Device Manager
  3. Under your Network Adapters, double click the port that you’ll be using
  4. Go to the Advanced tab and select the Jumbo Packet
  5. In Value select the 9014 Bytes
  6. Press OK and close the Device Manager

(*)          The USRP RIO that you will be using should already have on its flash the bitfile shipped with the Reference Architecture

 

 The default IP address for the SFP 0 Port of the NI 294x or NI 295x is 192.168.30.2.

 

  1. Ensure the host computer uses a static IP address. You may need to modify the network settings for the local area connection using the Control Panel on the host computer. Specify the static IP address in the Properties page for Internet Protocol Version 4 (TCP/IPv4).
  1. Configure the host Ethernet interface with a static IP address on the same subnet as the connected device to enable communication, as shown in the following table.

Component

Address

Host Ethernet interface static IP address

192.168.30.1

Host Ethernet interface subnet mask

255.255.255.0

Default SFP 0 port device IP address of the USRP

192.168.30.2

 

You can change the IP address of the SFP 0 port of the USRP by the following steps:

NOTE: Make sure that the default personality is the one deployed on the FPGA

 

  1. Connect the SFP 1 Port to the 10Gbit Ethernet card using the SFP+ cable
  2. Set the IP of your 10Gbit Ethernet card port to 168.40.1*
  3. Verify that your device is on
  4. Select Start>>All Programs>>National Instruments>>NI-USRP Configuration Utility
  5. Select the Devices tab of the utility. Your device should appear in the list on the left side of the tab.
  1. In the list, select the device. The IP address of the selected device displays in the Selected IP Address
  2. Enter the new IP address in the New IP Address textbox
  3. Select from the Select Port drop-down menu the Port 0 (10G) to indicate that the new IP will be for the SFP 0 port with 10Gbit interface
  4. Click the Change IP Address button to change the IP address
  5. The utility prompt you to confirm your selection. Click OK to proceed
  6. The utility displays a confirmation to indicate the process is complete. Click OK
  7. Power cycle the device to apply the changes

(*)          The default IP Address of the SFP 1 port of the NI USRP RIO is 192.168.40.2

Deploying a Customized Bitfile on the Flash

This reference architecture comes with an open source LabVIEW FPGA code which allows you to add your customization to the FPGA code while keeping the 10Gbit Ethernet support. You can either directly flash the provided bitfile ‘Ethernet Full Support Xcvr.lvbitx’ in the FPGA bitfiles application folder which supports 10Gbit Ethernet or build from the source FPGA. After compiling your FPGA code, you can deploy its bitfile to the Flash of your device by the following steps:

 

  1. Refer to the Installing the Hardware section and make sure you follow the instructions of the setup needed to deploy the FPGA bitfile
  2. Launch the NI Measurement and Automation Explorer
  3. Under My System, expand the Devices and Interfaces and select the RIO target representing your USRP RIO
  4. On the Settings tab, Select Autoload on reboot option from the Firmware Autoload Setting drop-down menu
  5. Click the Update Firmware button
  6. Find and select the bitfile that you’d like to load on the Flash. Click Open
  7. Click the Begin Update button and wait for the upload to finish
  8. Turn off your computer
  9. Turn off your USRP RIO
  10. Disconnect the MXI cable
  11. Turn on your USRP RIO
  12. Turn on your Computer

The new bitfile is loaded now on the FPGA of your device.

Running the Reference Architecture

You can run the Reference Architecture by following the below steps:

 

  1. Make sure you have deployed the bitfile shipped with the reference architecture
  2. Make sure that the IP of the 10Gbit Ethernet card and the IP of the SFP 0 of your device are on the same subnet. If the SFP 0 still has its default IP: 192.168.30.2, you can have your computer IP set to 192.168.30.1
  3. Open the Ethernet USRP RIO>>USRP RIO Full Ethernet.lvproj and run one of the host VIs.
  4. The first time opening of the project will require you to fix certain dependencies due to the replacement of some of the USRP drivers.
    1. Click on the Resolve Conflicts button in the LabVIEW Project
    2. Choose the right file for each conflict.
    3. Once it is done for all the VIs, save the project by clicking on File then Save All.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors