LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why has arrays to be in a fixed dimension

Hello
I use the FPGA Card 7831R. The application i try to programm should read in the fpga.vi some elements from the FIFO.
These elements should be combined in a second step to a complete array. I realized this till now with a shift register. In the Execution Target "LabView for Windows" it works and there are no problems to run the vi.
But when I change the execution Target to "FPGA Device" to run this program on the FPGA-card I get the error-message that "Arrays must be fixed size in current target". What can I do?
0 Kudos
Message 1 of 4
(3,097 Views)
You must use create array and declare the maximum size that will fit in your FPGA, and what that is appropriate for your application. In your loop, use replace element rather than append array. Generally, this method of array construction is considered better programming practice; read the LabVIEW manual on memory management, but in the case of rio its not really an option.
0 Kudos
Message 2 of 4
(3,090 Views)
Arrays in FPGA must be fixed in size because changing their size would require re-allocating more memory, which is not possible on an FPGA without recompiling the code.

Also keep in mind that arrays take a lot of space, especially on an FPGA. The FPGA programming guide says to try and limit your arrays to 32 elements. You can probably get away with more if you have the 3 million gate FPGA. If you need a larger array, you'll have to send the data back to either RT or LabVIEW to process it.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 3 of 4
(3,078 Views)
You also may want to use the onboard memory on the FPGA for data storage. You may also want to use the memory extension utility in order to be able to use the full amount of memory available on the FPGA that's 192 kB on a 3 M FPGA

Regards,

Jochen Klier
National Instruments Germany
0 Kudos
Message 4 of 4
(3,051 Views)