How Can I Have My LabVIEW FPGA Code Run at Boot?

Updated Dec 22, 2023

Reported In

Software

  • LabVIEW FPGA Module
  • LabVIEW

Issue Details

I would like to have my standalone LabVIEW FPGA code start running when I power on my device. How can I deploy my FPGA VI to an FPGA target and have it run at boot time?

Solution

To have your LabVIEW FPGA code run when the target boots, you will need to ensure proper set up of your code, configure your target, and download the bitfile to the FPGA flash memory.
  1. Ensure that you have an FPGA VI that is appropriate to run without a host VI. An appropriate VI does not require any input from the host machine through the front panel. Often, the VI will have no front panel objects at all, and will simply take physical inputs and formulate appropriate outputs. There is usually no user interaction with such a VI.
  2. Make sure that the Run when loaded to FPGA property is checked. The location of this property differs depending on the version of LabVIEW you are using:
    • LabVIEW 2010 and later
      1. Create a Compilation in your FPGA project by right-clicking on the Build Specifications item and selecting New»Compilation
      2. Then right-click on the new compilation specification and select Properties. The Run when loaded to FPGA property can be enabled in this properties dialog.
    • LabVIEW 2009 and earlier
      The Run when loaded to FPGA property is located in the properties of the FPGA Target itself. To access this property dialog, right-click on the FPGA Target and select Properties.
  3. After this property is enabled, compile the VI.
  4. Open the RIO Device Setup utility located at Start » All Programs » National Instruments » RIO Device Setup.
  5. In the Device Settings tab, choose either Autoload VI on device powerup or Autoload VI on device reboot and apply the settings.
    • Note: On Linux Real-Time targets, the Device Settings tab is not available. The default behavior of a bitfile stored on flash for these targets is to autoload on both powerup and reboot.
  1. In the RIO Device Setup utility, click the Download Bitfile to Flash tab and select your compiled VI’s bitfile.