LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

choose specific array elements from FIXED size array on FPGA

running vi on FPGA , the task is to choose specific array elements from FIXED size array on FPGA as follow:

FIXED Array A Size = 1000
FIXED Array B Size = 10
Loop thru Array A , select elements to Sub Array B based on SubArray Index and SubArray Length values,when compiling the code
Error Msg "Array does not resolve to fixed size"

Please advice how to solve this error?any work around ?attached code and screen shot.
Best Regards

Download All
Message 1 of 11
(3,727 Views)

Hi MyKat,

 

simple workaround:

Replace ArraySubset by IndexArray with 10 outputs. Then use BuildArray to Build an array from those 10 outputs. The FPGA compiler will optimize this code part…

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 11
(3,709 Views)

Hello GerdW

Thanks for support

Ok , Please advice , in my application design , the array is fixed size (7000) element , 8 Bit Hex (AAAAAAAA,11111111,FFFFFFFF,... etc) , the task is to loop every 10 elements and return the 10 sub array elements , also the compiler was able to store array (7000) 8 bit hex elements successfully.

 

Q1-using IndexArray with 10 outputs. Then use BuildArray for above array is optimum design  using cRio-9082 chassis FPGA ?

Best Regards

MyKat

0 Kudos
Message 3 of 11
(3,697 Views)

Hi MyKat,

 

Please advice , in my application design , the array is fixed size (7000) element , 8 Bit Hex (AAAAAAAA,11111111,FFFFFFFF,... etc) ,

"AAAAAAAA" look like 32 bits to me. How is this "8 bit HEX"???

 

the task is to loop every 10 elements and return the 10 sub array elements ,

I already have given a snippet above!

 

also the compiler was able to store array (7000) 8 bit hex elements successfully.

How is this related to your question?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(3,695 Views)

Hi GerdW

 

Correct 32 bit , sorry

-Array Fixed size (7000 element) each element is (AAAAAAAA,11111111,...etc) Hex,32 bit

-snippet code is running inside For Loop with 700 loop iteration

-Sub Array is made with snippet code to extract 10 elements from Array for each loop iteration

is above considered optimum design?

Best Regards

MyKat

0 Kudos
Message 5 of 11
(3,690 Views)

Hi MyKat,

 

is above considered optimum design?

Well, atleast I would say it is "working code".

"Optimum design" surely is something different…

 

Why do you use an array of 7000 elements? Why not use a Memory block on FPGA?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(3,687 Views)

@MyKat wrote:

the task is to loop every 10 elements and return the 10 sub array elements


Just use Reshape Array to make a 2D array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 11
(3,676 Views)

Hi crossrulz,

 

does the FPGA now support 2D arrays?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(3,673 Views)

Hi GerdW

 

Memory Blocks to store 7000 elements sounds better than array , never used it before , any

code example as guide ?

Best Regards

MyKat

0 Kudos
Message 9 of 11
(3,671 Views)

Hi GerdW

I went quickly reviewing Memory Blocks , it has Read and Write to process the data , HOWEVER , still need to have the 7000 elemets fixed array stored on the FPGA since this

is STATIC data array with constant elements , i think Memory Block for processing the array elements , my concern is on best technique to store the 7000 elemets array on FPGA?

Best Regards

MyKat

0 Kudos
Message 10 of 11
(3,667 Views)