From 12:00 PM - 4:00 PM CST on Thursday, October 18, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Table Of Contents

Execution of FPGA Code

Last Modified: January 11, 2018

You can run FPGA code on the FPGA directly or you can run the code on the host computer to simulate running it on the FPGA.

Execution on an FPGA

To create code that executes on the FPGA target, you need to compile and download a bitfile (.lvbitx) to the FPGA.

You create an Application document associated with an FPGA VI to build a bitfile. The bitfile contains binary data that describes how to configure the FPGA circuit so that it performs the same function as the code in the FPGA VI. You then download this bitfile to the FPGA, and when the application runs, the bitfile reconfigures the FPGA circuit of the FPGA target. Use the FPGA Host Interface nodes to download, run, and communicate with the FPGA VI on the FPGA.

Compiling FPGA code into a bitfile can take a significant amount of time and varies depending on the size of the VI, the processor speed, and the amount of memory in the computer on which you are compiling.

Simulation on the Host Computer

FPGA code that executes on a host computer, in simulation, does not require compilation of the build and makes it easier and less time consuming to repeat tests until you're ready to compile and deploy to an FPGA.

spd-note-note
Note  

You cannot run an FPGA VI in simulation on a real-time host.

You can run an FPGA VI in simulation on the host to test and debug the code. When you click the Run button from the panel or diagram of an FPGA VI, your code runs on the host computer rather than on the FPGA. Because the bitfile is not created and downloaded to the FPGA, you can test and debug the logic of your FPGA code more quickly. You also have access to debugging tools, such as breakpoints and probes, that you don't have access to when the code runs on an FPGA.

In addition to testing that the code in the FPGA VI works as you expect it to while you develop it, you also need to test how the FPGA code works in relation to the rest of your application. For example, you use a host VI to pass data to the FPGA VI to process. To make sure the host VI communicates as expected with the FPGA VI before you compile it, you can use the FPGA Host Interface nodes to run and communicate with the FPGA VI in simulation.


Recently Viewed Topics