04-13-2008 10:31 PM
Solved! Go to Solution.
04-13-2008 11:24 PM
04-14-2008 07:54 AM - edited 04-14-2008 07:58 AM
Hello,
1-D arrays only using LV FPGA, so 2-D arrays is not supported. Read more about using clusters and arrays here:
http://zone.ni.com/devzone/cda/tut/p/id/4520
04-14-2008 11:52 AM
Hi robdevyogi,
Jimmie is correct that only 1D arrays are supported with LabVIEW FPGA. There is a great page on the LabVIEW help that lists the array functions that are supported by FPGA. I hope this helps!
Carla
04-18-2008 02:18 PM
Thanks, yes, it wasn't obvious to me that 2-D wasn't available for FPGA! I guess those functions would take up a lot of SLICEs...
Since I was working with boolean I was able to work around it by creating an array of U8 or U16 and then converting the number to a boolean array inside the for loop.
Rob
12-16-2008 02:07 AM - edited 12-16-2008 02:09 AM
Hi, I am experiencing a similar problem with my NI PXI 7833 and fpga module. I need to burn a code which inherently contains boolean 2D arrays in it. I am looking for effective ways to express a 2d array as a 1d array... if you have succeded in doing so kindly reply... your help shall be greatly appreciated.
cheers
Sid
12-16-2008 03:08 PM - edited 12-16-2008 03:11 PM
Use the functions for converting a boolean array to a number (e.g. a U16) then store values in an array of U16. When reading, you index the array, you get a U16 value, then convert it to a boolean array and index the individual boolean value if necessary.
12-16-2008 03:48 PM
Hi,
This process is called interleaving, there is a VI in the array palette to do it. The reverse process is called decimating, and there is also a VI to do that.
12-16-2008 05:47 PM
anderson1988 wrote:Hi, I am experiencing a similar problem with my NI PXI 7833 and fpga module. I need to burn a code which inherently contains boolean 2D arrays in it. I am looking for effective ways to express a 2d array as a 1d array... if you have succeded in doing so kindly reply... your help shall be greatly appreciated.
cheers
Sid
If you want to do it mathematically (I did this in the past in BASIC - yes, I've been around that long), then store everything in a one-dimensional array and calculate the index into that array.
Example: if you have two dimensions (X,Y) and the Y dimension is of a maximum size of Z, then the index into the one dimensional array would be X * Z + Y.
This should work well with LabVIEW since it starts all indices at 0.
I hope this helps and that you can get it working.
Rob
08-04-2014 10:40 AM
This is certainly a good option.
However, let us say that you want to support the following operations:
a) Read/Write an entire row in one clock cycle
b) Read/Write an entire column in one clock cycle
-- in this case, the design wouldn't work.