Jump to content

Recommended Posts

In FPGA module, arrays have an option to "Set Dimension Size..." when you right-click on them in the front panel.

post-319-1161265470.jpg?width=400

This brings up a "Set the size of this data item" dialog box. Here you can select fixed or bounded array size and elements.

post-319-1161265496.jpg?width=400

I decide to copy this array and place it into a regular Labview VI to see if it would work, which it did. Then, I wanted to see what would happen if I tried to insert 1 element into a fixed array [16]. The output wire of the insert into array became a bounded-size array [17]. The connected indicator was still a fixed array [16] which was automatically coerced back to a fixed size of 16 with a coersion dot. Attached is the 8.2 VI I've been playing with. I have no idea what will happen if you open this VI and you do not have the FPGA module installed.

Download File:post-319-1161266721.vi

Link to comment
In FPGA module, arrays have an option to "Set Dimension Size..." when you right-click on them in the front panel.

Hi,

I am not sure what the question is but you probably already noticed that you can select "Adapt to Source Wire" for an indicator. This will allow you to set the dimension size for any control, and the corresponding indicators will automatically adjust.

On another note, be very careful when using arrays in your program on an FPGA target. Typically, every bit in a numeric indicator or control consumes roughly 1 slice on the FPGA target ( due to addressing logic and the registers). However, when the indicator is a numeric array, each bit consumes more than 2 slices on the FPGA target.

For example, lets say that you have 4, U32 indicators on the front panel of an FPGA VI. These 4 indicators will consume half of the real estate on FPGA than an array of 4 U32's.

If you have tons of FPGA space left, then don't worry about changing your VI. However, if you are fighting for more space , I would strongly suggest using the memory on the FPGA or breaking the array into indicators using the index array instead of placing an array indicator on the FPGA diagram.

Good luck!

Mike

Link to comment
I am not sure what the question is but you probably already noticed that you can select "Adapt to Source Wire" for an indicator. This will allow you to set the dimension size for any control, and the corresponding indicators will automatically adjust.

No real question here just that I'm using this fixed array in a VI that has nothing to do with an FPGA target. This is something you to not have access to in array data types in regular Labview. In investigating this hidden feature of arrays, I've been wondering if I can use them in other places, not just FPGA targets.

Link to comment
I've been wonder if I can use them in other places, not just FPGA targets.

As far as I know, you can use them in other places. I believe that LV 7.1 allowed the feature on any VI whether or not is was on FPGA, RT or Windows. However, you needed to have FPGA installed to get this feature because fixed sized arrays are only necessary on FPGA.

Link to comment
But what happens, are the first or the last elements removed?

The last element was removed.

As long as from version 4 (maybe earlier) there is room in the array type descriptor for a fixed size array.

Currently this is set to -1, I wonder what happens when you set this to another negative number :D

I stared to decode the type descriptor. Heres what I found, see attached vi:

Starting at the 4th element in the type descriptor:

FFFF FFFF = variable size array

8000 xxxx = Fixed array where xxxx is the size elements

0000 xxxx = Bounded array where xxxx is the size in elements

Download File:post-319-1161356371.vi

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.