NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Host Memory Buffer for CompactRIO

This thread is intended to foster discussion about the Host Memory Buffer for CompactRIO release. Please post your questions, comments, suggestions and bug reports here.    

The host memory buffer is a new data transfer mechanism intended for applications with extremely low latency requirements for communication between RT and FPGA. T
he goal of this release on NI Labs is to provide early access for applications which require this functionality and to gather use cases for this transfer mechanism.    

To download the API, or to read more about it, please go to the download page.

 

Update: http://www.ni.com/white-paper/53881/en/

0 Kudos
Message 1 of 19
(11,822 Views)

This sounds very interesting.  I'm assuming this is using an AXI Memory map?  Unfortunately we have neither the C experience nor the hardware nor the time to be honest to rig up a benchmark ourselves.

But we ARE running into limits of DMA trnasfers for tight loops running at moderate to high speeds (20kHz on PXIe 8115 with PXIe 7965 FPGA card).

Are there any rough figures ragarding performance?  How long does an array of 64 U32s take within this method compared to DMA?

While the CPU performance would certainly not be comparable to our current system, the much lower latency compensates a lot (approximately 40% of our current loop time is spect shovelling data to and from the FPGA card via DMA).

0 Kudos
Message 2 of 19
(7,417 Views)

Hey Intaris,

I'm uncertain if I can share the specific implementation details but its accurate to say the FPGA masters the communication and directly accesses a block of RT memory. For this reason some kind of synchronization is needed. In the example code a front panel control is used, but for maximum performance one of the data elements can be used as a counter -- rt can busy wait for that value to change.

That is what we did in our benchmark. In that benchmark we transferred 60 U64 values. The technology transfers 31 values at a time (you can see this on the block diagram of the FPGA code) and so this constitutes two data packets.

For LV2014 with a standard install (nothing special to eliminate services), we saw the following values:

mean (range) [usec]

Read

9068 1 (1-25)

9031 0 (0-12)

Write

9068 2 (1-30)

9031 1 (0-12)

This was run for 5 hours, so the jitter should be reasonably accurate. Its also pretty reasonable given what I know about average jitter on linux rt.

Unfortunately I am unable to share the code directly due to some customer-specific content, but it should be easy to reproduce this starting with the example.

Thanks,

Daniel

0 Kudos
Message 3 of 19
(7,417 Views)

Hello,

I am trying to install the Host Memory Buffer in the system on module target sbRIO-9607, but I got stuck at the following error.

consola.png

I am following the documentation included in the .zip (Host Buffer Set-Up)

I would appreciate any help, and I would be gratefull to report back the results obtained.

Sincerely,

Diego

0 Kudos
Message 4 of 19
(7,417 Views)

I have delimited the problem to the following part of the script install.sh where some preliminary checks are made.

for (( i=0; i<(${#FILES[@]});i++)); do

                              if [ ! -e "$FOLDER/${FILES[${i}]}" ]

                              then

                                        echo "$FOLDER/${FILES[${i}]} does not exist"

                                        FAILED="BAD"

                              fi

done

but still don't know what it is wrong.

I would appreciate any help or indications.

Sincerely,

Diego

PS: All the files needed for the installation are copied in the specified default location.

0 Kudos
Message 5 of 19
(7,417 Views)

Another problem found:

The sbRIO-9607 only works with the most recent version of LabVIEW: " LabVIEW 2015 FPGA Xilinx Compilation Tools"

However, the "NI FPGA Interface C API Generator" only works with an older version of LAbVIEW

error.png

Please, I would be interested in having this mechanism available for new Zinq platforms, and I would be willing to cooperate in order to develop and test it.

Sincerely,

Diego

0 Kudos
Message 6 of 19
(7,417 Views)

Hi Diego,

The NI FPGA Interface C API should be supported with LabVIEW 2015.  Perhaps you need to update to the latest version.  The 2015 version is available for download below:

http://www.ni.com/download/fpga-interface-c-api-15.0/5601/en/

Regards,

spex

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 7 of 19
(7,417 Views)

Good point! thanks for helping.

However, I continued with the set-up process, and I came across with another problem. When I try to build the sample project of the HostBuffer template, I get several errors.

I suspect the selected ones might be the root cause.

eclipse.png

IMHO there might be a problem with the eclipse environment. I am using the 2014 version because I didn't find a more recent (2015) version.

Any indications or advice on how to solve the problem would be appreciated, and thanks for helping.

Sincerely,

Diego

0 Kudos
Message 8 of 19
(7,417 Views)

This error doesn't look like its specific to the Host Memory Buffer at this point. I believe the Eclipse environment includes a tutorial for building a simple 'Hello World' application. Were you able to get that application to build properly?

0 Kudos
Message 9 of 19
(7,417 Views)

Hi Diego,

Sorry, I was travelling on Thursday and Friday, so I didn't get a chance to look into this.

I'm not the expert on Host Memory Buffer, but I was able to confirm that the C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition 2014 version you have is the latest, and it does support the sbRIO-9607.  That can be verified in the table in the expanded Description section at the bottom of this download page: http://www.ni.com/download/labview-real-time-module-2014/4846/en/

In addition, the tutorial that Burt has referenced is available here: http://www.ni.com/tutorial/14625/en/

This tutorial walks through the setup of the Eclipse environment and compiler in detail.  The errors in your screenshot appear to point to the cross compiler prefix and path variables.  You will want to use the ARM-based, 2014-stack version of the values demonstrated in the tutorial.

Regards,

spex

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 10 of 19
(7,417 Views)