Streaming

Streaming is a way to generate waveforms that are too large to fit in the onboard memory of the signal generator. Streaming can be used in arbitrary waveform, arbitrary sequence, or script output modes.

To stream waveform data, allocate and identify all or a portion of the signal generator onboard memory to act as an onboard waveform for streaming. Before initiating waveform generation, fill that onboard memory with the first part of your waveform. As the waveform is generated, continuously write the remaining waveform data until the waveform is complete.

Note Streaming should not be used if the data to be generated is less than or equal to the size of the streaming waveform.

Average Performance Rates

Average data transfer rates are highly system dependent. The following table is an example of the average sustainable transfer rates using 16-bit (or 2 byte) samples for PXIe-5433.

Note Data transfer rates are limited by the speed of your streaming storage solution.
Table 11. PXIe-5433 Average Performance Rate
Data Source Data Rate (MB/s) Note
From disk, such as a redundant array of independent disks (RAID). > 600 The number is obtained using several file I/O optimizations.

Direct DMA

Direct DMA can be used to transfer waveform data to the signal generator onboard memory at rates well beyond the typical 5 to 30 MB/s range in a standard PC-based architecture. To achieve such high rates, Direct DMA establishes a direct connection between the signal generator onboard memory and a specialized waveform data source. Direct DMA is commonly used to stream waveform data from disk at data rates of greater than 100 MB/s.

In a standard PC-based architecture playback rates to the 5 to 40 MB/s range are limited by the following factors:

  • Shared data paths through the PCI controller, I/O bus, CPU, and memory that divide down bandwidth
  • Latencies introduced by the operating system and application software managing data flow
  • Nondeterministic operating system management of file I/O

For example, in a standard PC-based architecture, downloading a waveform to the onboard memory of your signal generator requires the following process for every 4,096 byte segment of physical memory:

  1. The signal generator retrieves an address identifying the location of the data segment in the host memory.
  2. The signal generator uses the address to request transfer of the data segment in the host memory.
  3. The signal generator downloads the data to the onboard memory of the signal generator.
  4. Steps 1-3 repeat every 4,096 bytes until the waveform data is fully downloaded.

To download a 16 MB waveform (16,777,216 bytes), this process repeats 4,096 times (16,777,216 bytes/4,096 bytes).

The direct connection established by Direct DMA to the data source is able to minimize or eliminate the factors that limit playback rates. To download data to the onboard memory of the signal generator with Direct DMA, the following process occurs only once:

  1. The signal generator retrieves an address identifying the location of the waveform data source. This address generally refers to a large window of physically contiguous memory.
  2. The signal generator uses the address to contact the waveform data source.
  3. The signal generator requests the data segment and size from waveform data source. In this case, the size requested by the signal generator can be fairly large (for example, 16 MB).
  4. The signal generator downloads the data to the onboard memory of the signal generator from the waveform data source in one operation.

The transfer process is much faster and more efficient because an address to the waveform data is requested once (in this case, the address is to the waveform data source).

PXI Express Bandwidth Considerations

NI PXI Express signal generators use PCI Express as the interface to the computer. The physical connection between a PXI Express signal generator and a computer is called a PCI Express link. When a signal generator generates a waveform, it can saturate this link. Saturation occurs when the signal generator is copying data to its onboard memory from computer memory as rapidly as possible, utilizing all of the bandwidth of the PCI Express link.

The theoretical bandwidth of the onboard memory of the signal generator is 3.2 GB/s, and the theoretical bandwidth of the PCIe link is approximately 850 MB/s. This difference in bandwidths means that transferring data to the onboard memory can saturate the PCI Express link. The waveform data download rate is dependent on the system configuration, with a maximum of approximately 600 MB/s.

High-speed transfers that saturate the PCI Express link can affect other instruments when multiple instruments share a single PCI Express link. The bandwidth sharing in this case becomes a problem if other instruments in the application require guaranteed bandwidth to the PCI Express bus.

You can configure the NI PXI Express signal generator to limit its use of the PCI Express bus, leaving bandwidth for other instruments that are more susceptible to short-term bursts of traffic on a shared PCI Express link. You can also improve the performance of your instrument based on your system configuration. The following table lists the properties and attributes that allow you to modify the way that the signal generator uses the PXI Express bus.

LabVIEW Property C/C++ Attribute Purpose
Maximum Bandwidth NIFGEN_ATTR_DATA_TRANSFER_MAXIMUM_BANDWIDTH Allows you to optimize bus bandwidth usage for multi-device streaming applications.
Maximum In-Flight Read Requests NIFGEN_ATTR_DATA_TRANSFER_MAXIMUM_IN_FLIGHT_READ_REQUESTS Allows you to specify, based on the requirements of your application, the maximum number of in-flight read requests for data transfers.
Preferred Packet Size NIFGEN_ATTR_DATA_TRANSFER_PREFERRED_PACKET_SIZE Allows you to configure, based on the requirements of your system, the preferred size of the data field in the PCI Express data transfer packet.