LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA: 2-D arrays supported?

Solved!
Go to solution
I'm getting an error in an FPGA VI when editing the VI (broken run button): "Maximum number of array dimensions exceeded for target"  The array is 8x16 boolean.  Doesn't the target support 2-D arrays?  My target is cRIO-9102.  I tried to make the control smaller, too, but without success.
 
Thanks,
 
Rob
 
Rob
0 Kudos
Message 1 of 10
(7,317 Views)
I meant to include this image of the VI too
Rob
0 Kudos
Message 2 of 10
(7,308 Views)
Solution
Accepted by topic author robdevyogi

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



Message Edited by Jimmie A. on 04-14-2008 07:58 AM
Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 3 of 10
(7,285 Views)

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

National Instruments
Applications Engineer
0 Kudos
Message 4 of 10
(7,257 Views)

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

Rob
0 Kudos
Message 5 of 10
(7,214 Views)

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

Message Edited by anderson1988 on 12-16-2008 02:09 AM
0 Kudos
Message 6 of 10
(6,997 Views)

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.

Message Edited by robdevyogi on 12-16-2008 01:11 PM
Rob
Message 7 of 10
(6,974 Views)

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.

Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 8 of 10
(6,969 Views)

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

Message 9 of 10
(6,958 Views)

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.

0 Kudos
Message 10 of 10
(5,340 Views)