Table Of Contents

Optimized FPGA VIs within Case Structures

Last Modified: March 30, 2016

When you compile FPGA code, the compiler moves any Optimized FPGA VIs that are inside of a Case Structure to the outside of the Case Structure. This means that, during development, if you run FPGA code in simulation on the host and Optimized FPGA VIs are inside of a Case Structure, there will be cycle-level differences between running the VI in simulation on the host and the actual timing once you deploy to hardware. If you want the timing to match more closely between simulation and actual hardware implementation, whenever possible place Optimized FPGA VIs outside of a Case Structure to model the compiler action.

Example

The following examples demonstrate the modification the compiler makes when you place an Optimized FPGA VI within a Case Structure.

spd-note-note
Note  

When you call an Optimized FPGA VI from Clock-Driven Logic code, the VI is contained within an Optimized FPGA VI integration node.

The following code displays the True and False cases of a Case Structure with the Optimized FPGA VI inside of it.

The following code displays the True and False cases of a Case Structure with the Optimized FPGA VI outside of it. This implementation results from either automatic optimizations from the compiler or manual placement of the Optimized FPGA VI outside the Case Structure, in the scenario that you want your timing to match more closely between simulation and actual hardware implementation.


Recently Viewed Topics