LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Host to FPGA Target Communication for large data sets

Solved!
Go to solution

I would like to send a custom waveform signal generated in windows LabVIEW and would like to generate the signal from one of 9269 AO card that is controlled with FPGA running in my CRIO-9039. I generate the signal and have an variable sized array of single precision float and dt. What is the best way to transfer it to FPGA?

I was thinking to use a timed loop set to run in dt time frame in FPGA and iterate each value of my array within the loop in continues mode. Here is what I have tried/will try so far:

-Using FPGA memory where I write in host and read in FPGA did not work.

-Tag communication only allows around 65000 bits size array that makes it around fixed sized 2000 SGL elements array which does not satisfy the array size requirement.

My array that I would like to transfer could have millions of elements within it.

-DMA FIFO is another option I am compiling to test right now.  I set the size of the requested number of elements in my FIFO to the highest allowable value,262149 elements. I am thinkning to edit with the depth parameter of the FIFO to increase the host size buffer to transfer my array. 

I do not mind the determinism and fast DMA FIFO transfer and just like to be able to generate the waveform.

Is there anything wrong with my approach or any other way of transfering huge data sets to FIFO?

Thanks for help!

Thanks & Regards ,

0 Kudos
Message 1 of 2
(2,963 Views)
Solution
Accepted by topic author sez

The FIFO does not need to be big enough to fit all the data. The data will be push one element at the time. DMA will read those pushed elements under the hood, and as long as you read it from your code before it's full, there is no problem.

 

So you'll have a buffer on the FPGA, one on the host's DMA, and you read the buffer from the code.

 

Writing memory on the FPGA, and reading it from a second loop also works. The second loop simply has a pointer control, and a value indicator. You can iterate over all the memory items from the host. But you need to take care about asynchronous access to the memory. If you want to read from it while writing, the memory needs to be configured as async access. You can even read while writing and use the memory circularly (start at 0 when the end is reached), but you need pointer management and you still need to read as fast as you write.

Message 2 of 2
(2,918 Views)