From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Global Variable Creation

Solved!
Go to solution

According to https://decibel.ni.com/content/docs/DOC-19962 it is possible to create a global variable in an FPGA. 

 

To do this in the host or in the RT portion of a project it is quite straight forward. For the FPGA area in a project, not so.

 

Am I missing something? Do I need to create the GV  file in the Host or RT section and then move the file under the FPGA section? 

 

I am working in LV 2014.

 

Please Help!

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 1 of 7
(4,500 Views)

Sorry I don't have FPGA installed at the moment, is it not on the palette under structures?

0 Kudos
Message 2 of 7
(4,483 Views)

A Global is just another type of VI. Once you've created it, you can drop it into your FPGA application and use it just like you would on other targets like the Desktop. As far as the file goes, It can be located under any target in the project, or not in the project at all. If it's used in a target and not explicitly under that target it will show up in the dependencies for that target.

 

Note, global variables are "global" within a target. Therefore, you cannot use a global to transfer data between targets such as between an FPGA and the Desktop, or between two FPGAs. 

0 Kudos
Message 3 of 7
(4,481 Views)

Its rare that you will need a global variable in FPGA.  Typically this is done with a register or memory.  But if you really want to use the global, I recommend just making it in another target and drag it to your FPGA section.


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 4 of 7
(4,476 Views)
Solution
Accepted by topic author johnoc

Hi John,

 

I cannot see the problem here!

 

I open a VI in/on the FPGA target and change to its BD, then I open the functions palette and grab a "global variable" from the structures palette.

Ready: I got a new global variable in the FPGA target…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 7
(4,470 Views)

One thing I just noticed is the FPGA project "New" menu is missing the "New ..." option that allows you to create a Global. Perhaps that is where the confusion comes from. Like mentioned earlier, dropping a new Global from the Structures palette or using Quick Drop will hopefully be reasonable workarounds.

 

2016-01-05_10-30-50.png2016-01-05_10-31-45.png

Message 6 of 7
(4,458 Views)

Thanks all!

 

I just had a brain fart.

 

I right clicked on my target in the project and then 'New'. Variable was not an Item as it is in the RT and Host portion of the project.

 

It actually dawned on me after I sumitted the post.

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 7 of 7
(4,410 Views)