From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Programmatically Deploy a FPGA Bitfile to Multiple RIO Devices

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • CompactRIO|SingleBoardRIO

    Software

  • LabVIEW

    Driver

  • NI RIO
  • Other

Code and Documents

Attachment

Overview

The example demonstrates how to use the NI System Configuration API to deploy a FPGA bitfile to multiple remote targets.

 

Description

Before using a FPGA with LabVIEW there has to be a bitfile deployed to the FPGA. There are two main courses of action for that:

  1. Deploy the FPGA bitfile dynamically with the Open FPGA VI Reference Function, so the FPGA bitfile is deployed only when the FPGA reference is opened
  2. Save the FPGA bitfile to the FPGA's flash, so the FPGA bitfile is automatically deployed during power-up.

The knowledgebase article How Can I Have My FPGA VI Run At Boot? describes how to achieve option (2) manually. The example however demonstrates a programmatic approach to option (2) that can be used to flash a FPGA bitfile to multiple targets at once and therefore saving time if multiple FPGAs have to be flashed.

 

Requirements

 Software

  • LabVIEW 2012 Base Development System (or compatible)
  • NI-RIO 15.0 (or compatible)
  • NI System Configuration API 15.0 (or compatible)

 Hardware

  • Any LabVIEW FPGA Module compatible hardware

 

Steps to Implement or Execute Code

  1. Open the attached file
  2. Select the FPGA bitfile that will be deployed to the selected targets
  3. Select the targets to deploy the FPGA bitfiles to
  4. Run the VI 

 

Additional Information or References

RT Deploy to multiple using System Configuration API  - Front Panel.png

 

RT Deploy to multiple using System Configuration API  - Block Diagram.png

 

Knowledgebase: How Can I Have My FPGA VI Run At Boot?
http://digital.ni.com/public.nsf/allkb/BC513C2A0DC29C89862574BF0002B0B9

 

Knowledgebase: How Do I Download a Bitfile to My Target Without LabVIEW FPGA?
http://digital.ni.com/public.nsf/allkb/BAAA6D86CDDD583C8625729E00572C8B

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text 'NIVerified'. Read here for more information about the new Example Guidelines and Community Platform.**

Michael Bilyk
Former NI Software Engineer (IT)

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
LV_COder
Member
Member
on

Hello Everyone,

Using VST 5644R.

Can i use this method for VST 5644R.

1. Is it possible to burn the bitfile (Bitfile path, programmatically) not using open FPGA VI reference).

2. In the Open FPGA VI reference we are entering the bitfile path in the dialog box(manually), but i wanna burn the bitfile programmatically not manually.

3. I have tried the system configuration API called Update Firmware, got error

Error -2147467263 occurred at nisyscfg.lvlib:Upgrade Firmware (File).vi:4770001

Possible reason(s):

LabVIEW: (Hex 0x80004001) Not implemented.
=========================
NI System Configuration: (Hex 0x80004001) This operation is not implemented for this target or resource.


Complete call chain:
nisyscfg.lvlib:Upgrade Firmware (File).vi:4770001
RT Deploy using System Configuration API.vi

But not able to resolve the issue.

Can anybody please help me regarding this issue.

Thanks in advance.

AgentAstronaut
Active Participant
Active Participant
on

Hi LV_COder,

I'm fairly certain that the system configuration API will not work for the VST. As the error implies, the operation of updating the firmware (which is the operation that downloads and installs the new bitfile) is not supported on the VST.

Cheers

Michael Bilyk
Former NI Software Engineer (IT)
LV_COder
Member
Member
on

Thanks AgentAstronaut,

Yes this API does not support by the VST.

I have got the VI ford  dynamic loading of bitfile and its being worked fine.

Open dynamic bitfile reference function.

Warm Regards

Hemant