How to Automatically Select Code Based on FPGA Target

Updated Sep 18, 2020



  • LabVIEW FPGA Module

I would like to write example code that can be used on various targets. However, depending on the unique characteristics of the FPGA targets, the code cannot be kept the same. In this case, how do I automatically select the code based on the target?

1. Place a Diagram Disable Structure
2. Right click the selector and click Replace with Conditional Disable Structure.
3. Right click the selector again and click Edit Condition for this Subdiagram...
4. Select Symbol FPGA_TARGET_CLASS, and enter the desired target symbol value. If you want to set the FPGA family as a condition like Virtex5 or Kintex7, choose the FPGA_TARGET_FAMILY symbol.
If you want to check the appropriate symbol values ​​and conditions for each target, please refer to the Configure Condition Dialog Box Help page.

In this way, you can pre-specify the clock, storage settings, etc. for each target so that it is automatically selected according to the target.