Example Code

FlexRIO Disk Transfer Speed Benchmark

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

  • PXI FlexRIO Coprocessor Module
  • PXI FlexRIO Digitizer
  • PXI FlexRIO IF Transceiver
  • PXI FlexRIO Signal Generator
  • RAID Array

    Software

  • LabVIEW
  • LabVIEW FPGA Module

    Driver

  • FlexRIO Driver DVD

    Operating System

  • Windows

Code and Documents

Attachment

Description

This is an example application which can be used for measuring data transfer speeds between FlexRIO modules and RAID modules installed in an NI PXI system. The purpose of this example is to help to get a general understanding about optimal hardware configurations (standard levels of RAID), and to form a more concrete picture on the realizable data transfer speeds available.

 

The application uses zero-copy data transfer (DMA) between Host and FPGA Target. Streaming between RAID modules and Host RAM is done by using TDMS Advanced Read/Write functions.

 

photo.jpg

Figure 1. Data transfer block diagram

 

The example has support for multiple FlexRIO and RAID devices / disks. FPGA Targets are readily available in the LabVIEW project for multiple type of devices (7975/6R, 7915R, 5774R, 5785R). Measured values are Average Transfer Rate per Device [B/s] and Total Average Transfer Rate [B/s].

 

Measurement results are available as a pdf attachment ("RAID Disk Data Transfer Speed Measurements.pdf").

 

 

How to Use

Download an extract the zip file from this page.

The example LabVIEW project consists of two examples, for the streaming directions: Stream to Disk Zero-Copy.vi and Stream from Disk Zero-Copy.vi. Open the “Stream to Disk” example and read the short manual on the “About” tab page.

 

photo.jpg

Figure 2. Example program help

 

By default, the VI accepts the following devices: PXIe-5774 with RIO resource name “5774_a” or “5774_b”, or PXIe-5785 device with resource name “5785”. There is a guide on the commented block diagram on how to change this configuration. Same applies for the “Stream from Disk” application. It is recommended to create files for streaming from disk using the “Stream to Disk” VI. Bitfiles must be compiled to run the example VIs.

 

On the “Configuration” panel, FPGA Target “Resource Names” and “Destination Files” paths must be defined. The theoretical transfer rate of the FPGA code is 12 GB/s for the “Stream to Disk” example, and 16 GB/s for the “Stream from Disk” example. This is without bottlenecks, such as the maximum data rate of 7 GB/s of PCIe Gen3 x8 lines. The “Desired Transfer Rate” control does not take this into consideration. The “Actual Transfer Rate” indicator will show the maximum transfer speed available, calculated from the FPGA main loop rate.

 

The “Elements to Acquire (i16)” control requires input on how many samples should be transmitted and written into file during transmission. Bear in mind, the application works with FPGA generated, dummy, i16 data. The resulting file therefore will have the size of twice the input entered here (i16 = 2 Bytes).

 

If the “Screenshot?” option is selected, the application will create two screenshots on the VI’s path into a folder named “Screenshots”: one from the “Configuration” tab, and one from the “Measurement” tab. 

 

The “Stream from Disk” VI has the same controls listed above, with the difference that user must select source files to transmit to the FPGA, which were previously generated by “Stream to Disk” VI.

 

photo.jpg

Figure 3. Stream to Disk example in operation

 

Hardware Requirements

  • PXI chassis
  • PXI controller
  • FlexRIO module (FPGA module, coprocessor, transceiver, digitizer, or oscilloscope)
  • PXI RAID module (optionally disk space of Host or other data storage)

 

Software requirements

The LabVIEW project was tested in the following software environment:

  • Windows 10, 64-bit OS
  • LabVIEW 2020 SP1 64-bit
  • LabVIEW FPGA Module 64-bit
  • FlexRIO driver

 

 

 

 

 

 

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

Contributors