LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffered FPGA peer-to-peer streaming

I have a 5160 high speed digitizer (4 channels) mounted together with a FPGA in a PXI 1085 chassis. I want to measure with the 5160 at the top sampling rate (1.25GS/s per channel) and stream the data to the FPGA using peer-to-peer streaming. From what I understand, the maximum peer-to-peer transfer speed from the 5160 is 800MB/s, which is only a fraction of the needed capacity to stream continuously all the data from the 5160. But for my application I only need to acquire data for a few milliseconds at a time. Is there any way to utilize the short acquisition time to squeeze the data into the peer-to-peer bus? Such as acquire all data into a buffer and then stream it over the bus?

If I wanted to stream data to the host computer instead, I would start an acquisition using an external trigger (a digital flank in my application) and acquire a record that contains only the needed number of samples. The record would be stored in the onboard memory of the 5160 and would be fetched to the host afterwards. Is it possible to do something similar with peer-to-peer streaming?

So far I have been unable to get even the triggering on a digital flank to work. With peer-to-peer enabled, the 5160 starts acquiring immediately and the peer-to-peer writer gets an overflow. Triggering seems to work differently with peer-to-peer streaming enabled. Any insights on this? All the examples I have been able to find simply streams all the data all the time to the FPGA and have the triggering logic implemented in the FPGA program, instead of using triggering on the digitizer.

0 Kudos
Message 1 of 6
(2,402 Views)

Hi erikw2,

 

As I have understood you want to store your data from the 5160 card to a buffer and read that data off the buffere during the "off time" of the readings to the FPGA card.

 

Could you please tell me what kind of FPGA card are you using?

And also what is the controller you are using for your PXI 1085 chassis?

 

Kind regards,

Art
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(2,330 Views)

Hello Arturs-g
Thank you for your response.

Yes, that is correct. My timing is something like this:
1) Get a digital flank (that I want to use as a trigger to start the acquisition)
2) Measure data at full speed for ~4ms. I want to store the data somewhere in a buffer.
3) Use the 60-70ms that is available until the next trigger to stream the data to the FPGA module

I'm using a PXIe-7975R FPGA module. There is no controller, but a PXIe-8360 link instead.

0 Kudos
Message 3 of 6
(2,299 Views)

Can you also post the code/example that you started from?

Product Support Engineer
National Instruments
0 Kudos
Message 4 of 6
(2,287 Views)

The PXIe-5160 is able to do buffered P2P, but you need to configure the "Stream Relative To" properly.  Here is a diagram from the Help File (also can be found installed on your system)

 

P2P Streaming Architecture of NI 5160/5162

http://zone.ni.com/reference/en-XX/help/370592W-01/digitizers/5160_p2p/

 

P2P Triggering Modes

http://zone.ni.com/reference/en-XX/help/370592W-01/digitizers/5162_configuring_trigger_with_p2p_stre...

 

From the sound of your experience, you are configuring the NI 5160 to stream relative to Start, which will not use the onboard memory.  It sounds like your application you want to stream in Reference Trigger mode, where the same record that would be fetched by the host would be sent via the P2P stream.  

 

To set up the digitizer in Reference Trigger mode, you just need to use the "niScope Configure Trigger.vi" to use a Digital Reference Trigger.  You will also want to set the "stream relative to" niScope property to "Reference Trigger"

 

http://zone.ni.com/reference/en-XX/help/370592W-01/scopepropref/pniscope_p2pstreamrelativeto/

 

The note in the above link is wrong, any of the settings is valid for the NI 5160/5162.

 

I hope this helps.

Nathan

 

Product Support Engineer
National Instruments
0 Kudos
Message 5 of 6
(2,280 Views)

Hi Nathan

Wow, that was very useful input! I will try again with the "stream relative to" property properly configured (right now I have no access to the lab with the hardware, but I'll get back in a few days with the results). If I'm still unable to get the acquisition to work, I will attach a minimal working example of the code to show you what I am doing (wrong).

Thank you for the assistance!

0 Kudos
Message 6 of 6
(2,237 Views)