09-23-2019 04:34 PM
Curious and couldn't find this information when browsing:
In my LabVIEW FPGA VI, I have a multiplication of two constants that are used elsewhere. (Why you ask? Those two values are used in other other operations separately, so it made sense to simply multiply them in this block of code instead of hardcoding their multiplied value). My question is, is LabVIEW optimization smart enough to precompute this value before synthesis since they are readily available or not?
(Any other information in regards of syntehsis itself is welcomed).
09-24-2019 01:35 AM
09-24-2019 04:00 AM
Yes, as long as you don't use Xilinx IP to do it.....
A standard LV multiplier should not prevent these being constant folded.
09-24-2019 01:10 PM
Thank you @GerdW and @Intaris! I didn't know that this is even called constant folding. I appreciate the insight!
09-24-2019 11:33 PM - last edited on 01-06-2025 03:50 PM by Content Cleaner
Some detailed description of the LabVIEW compiler can be found here: NI LabVIEW Compiler: Under the Hood
A section copied from that document reads:
For example, an implementation of a constant folding optimization that runs on a DFIR graph can be written once and applied to desktop, real-time, FPGA, and embedded targets.
It describes the way in which by using various levels of representation, some optimizations can be run before a specific target is 'targeted'.