ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Module Compiler optimization Question

My question below relates to the Labview FPGA module ver 1.1.

Does the Xilinx compiler optimize out static calculations? For example, if I were to have a multiply function that multiplies two hardcoded constants(not controls), say 4 and 2, would the compiler resolve this as a constant 8, or would hardware be built in that actually performs this calculation? (4x2 is trivial, but for more complicated cascading arithmetic operations, I want to include functions to perform these operations in code for easy modification and reference).

Any additional hard-to-find tips about compiler optimizations are welcomed in addition to responses to the above question.

Thanks,
~Dan Price

P.S. I'm new to the board and fairly new to labview, so any help with the above question is greatly appreciated!
0 Kudos
Message 1 of 2
(2,682 Views)
Hello Dan,

As a matter of fact yes. It makes a difference to specify the constants than placing controls. For gate usage, it is better to create constants.

Ricardo S.
National Instruments
0 Kudos
Message 2 of 2
(2,656 Views)