LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Version Retrieval

Hi All

 

I am using LabVIEW 2012 SP1 upon a cRIO-9074.

 

I notice that when creating an FPGA Build Specification, there is a version number (under category Information) which I can set, and assume this is somehow embedded into the then built bitfile (.lvbitx).

 

I also notice that I can right-click the FPGA icon of my FPGA project, and use the "RIO Device Setup... > Download Bitfile" feature, I can set any bitfile I like as the startup upon my cRIO.

 

Once deployed in this way, how can I determine the version of the .lvbitx deployed?

 

We want to be able to configuration control the FPGA in operation upon a cRIO.

 

Thanks.

 

 

0 Kudos
Message 1 of 5
(2,980 Views)

If your application needs to establish a connection to the FPGA, then the bitfile should be included in the application and should load it into the FPGA when the application starts. This guarantees that the correct bitfile for the application is loaded into the FPGA. The option to load a bitfile on the FPGA is useful if the FPGA runs independently from any other application on the cRIO. See http://www.ni.com/white-paper/9640/en/#toc3

 

(Edited for clarity)

0 Kudos
Message 2 of 5
(2,965 Views)

This is the case. My FPGA project runs independently of any real-time code. In fact, there is no real time code. It is pure FPGA.

 

But what I want to know is whether there is a way to directly determine the version number of the FPGA project running on my cRIO target. I do not want a solution that infers the version number. I want to know what the version number IS that the bitfile was built with. And any other information that may be available (such as name, description, etc). I do not expect there to be much but something is better than nothing.

 

This is basic software configuration control. Without it I cannot confirm anything about the version of code executing on the FPGA.

 

If the solution is to program a real-time app to pull off this information, then any pointers to information that will help would be useful.

 

Thanks.

0 Kudos
Message 3 of 5
(2,944 Views)

As far as I know, there is no way to retrieve any information about the bitfile stored in flash on a cRIO unless you code it yourself. I also do not know if there's any way to retrieve that information from a bitfile embedded in an application, but at least in that situation you can easily write code your own solution (although you may need to remember to change the version number yourself on each build). If you need to force the FPGA to load a particular bitfile, use the replication tools mentioned in the article linked in my previous post.

0 Kudos
Message 4 of 5
(2,930 Views)

I don't know what was in 2013, as I started LabVIEW programming in 2019, using LabVIEW version 2018.0 - it might change during these years.

 

The LabVIEW 2018.0 produces a .lvbitx file which has an XML format and contains some information on the bit image that is loaded into the FPGA - especially, it contains a checksum (MD5 of the bitstream), and interface specification (like controls/indicators, DMA channels). The checksum can be: read from the file (as contents of BitstreamMD5 field), read from FPGA, computed from the Bitstream data. This allows a verification that the data isn't damaged, and that some .lvbitx file is loaded into the FPGA. A program that loads bitstream into the FPGA uses the checksum to avoid unnecessary loading.

 

The checksum cannot be used to verify that a program was compiled from some known sources: each compilation produces a different bitstream which has a different checksum. However, a name of some indicator can be used as source identifier, if it is modified with each source version (but the name cannot be read from FPGA - the .lvbitx file must be read to get the name - a data from the indicator can be read, providing its "Offset" is known).

0 Kudos
Message 5 of 5
(283 Views)