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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop over Large Array in FPGA?

Solved!
Go to solution

Hello (I hope this is the right subforum to post in),

 

I am having trouble sending a large array (300 U8's or so, so only 'large' by FPGA memory standards) to my FPGA (PCIe-7852R) in a way that allows it to repeatedly loop over the array contents.

 

This is for a fast RF control system, where each U8 corresponds to a frequency output (a word to write to the freq controller) - it iterates between elements about once every 5 microseconds. The array is calculated in advance and sent to the FPGA program by a master VI, and the FPGA loops through this array while gathering data and pushing to a target-host DMA FIFO.

 

I have had success with a smaller array using a front-panel variable, but a variable of the size I require simply doesn't fit in the resources available. I can't use a lookup table as the array is arbitrary for each experiment and computationally difficult to calculate. I have tried using a host-target DMA FIFO to pass the data in but can't seem to retain the data so that I can iterate over it again - a shift register of the data is simply too large to fit.

 

 

Does anyone know of any way to pass a loopable array of this size to an FPGA subroutine?

 

Thanks 🙂

0 Kudos
Message 1 of 3
(2,295 Views)
Solution
Accepted by topic author toranilor

Sending the data via DMA to your FPGA code is correct, but you need to store the data in block ram.

 

Please look HERE to see how using Block RAM can help your design.  You'll need to modify your sending of data to incorporate an index for your data so that your FPGA code knows what to do with it.

 

In addition, make sure to look at the aspect of latency when reading from Block RAM.

Message 2 of 3
(2,284 Views)

Thank you!

0 Kudos
Message 3 of 3
(2,272 Views)