From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

compiling an fpga vi

Margarette,

 

I was able to pinpoint why your code will not compile. The problem resides in how you're creating your arrays within the pie symbols fpga VI and the pie encoder fpga VI. My question for you is, is there a particular reason why you're creating these VIs in the FPGA code instead of the host code? Are you trying to simulate inputs from your device or do you plan to actually use this array for data manipulation?

 

Regards,

 

Larry H.

Applications Engineer
National Instruments
0 Kudos
Message 11 of 14
(1,346 Views)

Margarette,

 

I've been looking into this issue of yours all day and I think I found the basis for a solution. The compilation problem that you were experiencing was because of the way you were building our third away using subVIs. Trying to initialize multiple arrays and then concatenate them together was not agreeing with the compiler. If you're trying to initialize arrays, it's better to do that on the host VI and then transfer the elements to the FPGA. I wrote an example project that will do this for you. The one caveat is, the biggest size that you can successfully compile is 2048 elements. Since you're working with 7160 elements, you'll need to create 4 of these arrays to handle all of your elements.

 

It may be more effecient to convert your elements into U32 so that one element of the array will hold 32 elements. This way you would only need an array that is 224 elements and should compile just fine. Those are just some suggest thoughts of mine on how you can work around this limit since you're dealing with so many elements. Attached is the project I mentioned of creating the arrays on the host VI and transfering the elements to your FPGA VI.

Applications Engineer
National Instruments
Message 12 of 14
(1,343 Views)

Hello. Sorry for the late repy. And thank you very much for responding to my questions. Sad to say but I was tasked to do this in FPGA. I intend to use the array as a waveform which I will upconvert in the host VI. I've considered doing you're suggestion that I convert my elements into U32. But, once I have arrays that have U32 elements, how can I convert it to an array with just 1 or 0 as the element? Thank you.

 

Another thing is I also considered using a lookup table. But it would take very long for me to map all the elements of the waveform. Do you have any suggestions? Thank you very much. 🙂

0 Kudos
Message 13 of 14
(1,332 Views)

Margarette,

 

I created a subVI for you to use on your host to convert your U32 elements to binary form. You can convert your elements to binary form and then concatenate them together to piece your waveform into one long array on the host side. The subVI can be found here: https://decibel.ni.com/content/docs/DOC-20472

 

Regards,

Larry H.

Applications Engineer
National Instruments
0 Kudos
Message 14 of 14
(1,320 Views)