LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga local variable

Solved!
Go to solution

How are LabVIEW local variables implemeted on the FPGA when you create local variables to transfer data?

 

I'm looking at some example code and wondering if it would be better to use the block memory to store some of these values from one loop that is feeding another loop.

 

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 1 of 6
(6,836 Views)

You can use local variables on your FPGA block diagram no problem.  Front panel components take up extra fabric to implement interfaces so there might be a better way to do what you are trying to do by using memory blocks or FIFO's.  If you could show a block diagram of what you are trying to do it might help eval.

-cb

0 Kudos
Message 2 of 6
(6,826 Views)

I know you CAN use local variables.

 

At this point I am looking at the examples from NI for the SoftMotion toolkit and not really working on solving a problem. 

 

I am just curious HOW the local variables translate down onto the actual FPGA chip, whether it takes extra FPGA space.  The example I was looking at that piqued my curioisty is the following snippet of code from NI:

 

Local Variable Example Code from NI SoftMotion Example

 

 

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 3 of 6
(6,809 Views)

To contrast this - the Example Code from StepperGeneration.lvproj does not use locals to send the data to a parallel loop, it does the output in the same single cycle timed loop on the FPGA.  Of course this is now getting away from my original question of how are locals implemented on the FPGA....but I find this solution better...

 

StepperGeneration.lvproj

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 4 of 6
(6,802 Views)
Solution
Accepted by topic author RVallieu

http://zone.ni.com/devzone/cda/tut/p/id/7727

 

Resource Utilization Statistics for FPGA VIs

 

The answer was found when looking around in the above linked items.  Local Variables consume Flip-Flop and LUT real-estate on the FPGA.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 5 of 6
(6,795 Views)

There used to be a document (I can't find it on NI's website now) that listed FPGA resource utilization by vi or data type.  I did find a more extensive document here (http://zone.ni.com/devzone/cda/tut/p/id/7727) that lists Flip Flop and LUT utilization for a variety of programming constructs.  I looked at the PDF pci-7833r_fpgavi_use.pdf in the downloads section for one of the products I use and found utilization stats for local variables.  Perhaps this will help.

-cb

Message 6 of 6
(6,793 Views)