11-07-2008 09:59 AM
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.
Solved! Go to Solution.
11-07-2008 10:53 AM
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
11-07-2008 01:20 PM
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:
11-07-2008 02:06 PM
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...
11-07-2008 02:19 PM
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.
11-07-2008 02:20 PM
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