From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI RT read from FPGA DMA FIFO Speeds

I'm currently using a PXIe-8133 in a 1062 to read from a PXI-7842 RIO card.  I currently have a large FIFO set up with the 'FPGA-to-Host DMA' configuration.  When I add this into my core loop on my RT system, I notice it increases the average execution time of the loop by around 8uS.  I'm curious now, if I want to read only 6 digital inputs from the FPGA into this data aquisition loop, what's the quickest way to do it?  Am I better off using the digital inputs of say a PXIe-6363?

0 Kudos
Message 1 of 12
(5,803 Views)

Hi KavehV,

 

Are you reading digital waveforms?  Or are you just trying to get the fastest update rate?  How fast do you need to update the digital values?

 

Best,

Jeff S.
National Instruments
0 Kudos
Message 2 of 12
(5,786 Views)

I need to get the fastest update rate.  I'm just trying to read digital inputs and/or integer values out of the FPGA without adding more than 2-3uS of execution time on the RT box.

0 Kudos
Message 3 of 12
(5,778 Views)

Are you worried about missing data points?  Or are you just interested in the most recent value?  If you are only interested in the most recent value, you could try putting your acquisition in a parallel loop so that it doesn't slow the rest of your code down.  If you are worried about missing data points, you should add a buffer to your acquisition.

 

I think FIFO's are a good way for you to go, and I don't think switching to the PXIe-6363 will help.  Why do you need updates this fast?  Perhaps there is another way we could work around this problem?

 

Best,

Jeff S.
National Instruments
0 Kudos
Message 4 of 12
(5,768 Views)

I need the current value at the time of the read.  My loop rate on the RT system is my effective sample rate.  My only concern is the execution time of the call to read from the FPGA.  I'm trying to get my loop rate to around 100kHz, and at that level every micro-second counts.

0 Kudos
Message 5 of 12
(5,766 Views)

Hi KavehV,

 

Could you tell me a little more about your application?  Why do you need this fast of a loop rate on the RT side?  Could you try moving some of your code down to the FPGA? Also, how did you benchmark the digital read?

 

Best,

Jeff S.
National Instruments
0 Kudos
Message 6 of 12
(5,759 Views)

I have one or more models running on the RT side that I don't want to convert to fixed point math at this time.  Plus there are other items parallel to the FPGA that need to stay in sync with it, all done via the RT loop.  I'm not looking for a solution here that involves moving complexity into the FPGA; I'd simply like to optimize the FPGA digital I/O as much as possible to minimize their execution time as much as possible.

 

I'm benchmarking my digital reads by taking timestamps before and after the operation and comparing them after execution has completed.

0 Kudos
Message 7 of 12
(5,754 Views)

Hi KavehV,

 

I'm sorry, but I don't think there is anything we can do here to speed up digital I/O read.  You can of course achieve much higher read rates if you use hardware timed acquisition, but that doesn't sound like it would work with your application.

 

Good luck on your project!

Jeff S.
National Instruments
0 Kudos
Message 8 of 12
(5,744 Views)

I'm using hardware timed acquisition with my other DAQ cards.  Is it possible to do so with the FPGA card as well?

0 Kudos
Message 9 of 12
(5,740 Views)

Hi KavehV,

 

You can, but it is a little different.  You have to program the buffer yourself on the FPGA using a buffered FIFO.  You then read chunks of data at a time on the RT side.  This will allow you to collect more data than you could if you were just reading a single point at a time in the RT program.

 

Best of luck on your project,

Jeff S.
National Instruments
0 Kudos
Message 10 of 12
(5,723 Views)