Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to download a compiled FPGA bitfile without LabVIEW?

Is there a way I can download a compiled FPGA bitfile to the flash memory on Compact RIO without using LabVIEW?

The hardware is being used in the field where there is no LabVIEW. I would like to be able to make changes to FPGA program, re-compile and download the bitfile to the remote cRIO. Is this possible?

Same question is previously posted on these forums but the system says I am not authorized to view the answer. Please help.
0 Kudos
Message 1 of 8
(6,489 Views)
Hi Anmol,
 
Yes, you can download a compiled FPGA bitfile without LabVIEW. You will need to download and install the NI-RIO driver on the non-development PC.  Then you can use the RIO Device Setup utility under Start»Programs»National Instruments»NI-RIO»RIO Device Setup to download the bitfile.
 
This utility is rather intuitive, but the NI-RIO driver also installs a RIO Device Setup Help at the same location for your reference if needed.  This will enable you to download your pre-compiled bitfile without having to install the LabVIEW development environment, LabVIEW Real-Time, or the LabVIEW FPGA module. For more information about this, there is a great KnowledgeBase article that discuss this procedure in more detail. I hope this helps!
 
Carla
National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(6,473 Views)

What is the best way to secure a bitfile so that it is not possible to reverse engineer?  I assume the flash that holds the bitfile cannot be read?  Does any of the VIs also contain the bitfile embedded?

Does anyone have any experience of creating an app to automatically download the bitfile (e.g. from an automated installer).  Trying to make upgrades as smooth for the customer as possible...

Rob
0 Kudos
Message 3 of 8
(6,241 Views)
Hi Rob,

The bitfile stored on the cRIO's flash memory cannot be read back to the controller or PC.  Also, no VI will include an "embedded" bitfile. A bitfile can be copied to a controller or stored on a PC, then referenced for download to the FPGA, but there will not be a bitfile included within a VI.

As for reverse engineering a bitfile:  The LabVIEW FPGA module uses a compiler supplied by Xilinx.  If you are looking to reverse engineer a bitfile, I would search for that topic from the Xilinx side of things.

Finally, you could create an executable from a VI that would force a download to the cRIO.

I hope this helps!
Brian A.
National Instruments
Applications Engineer
Message 4 of 8
(6,221 Views)
Thanks, Brian.
 
What I really meant to ask about reverse engineering the bit file was how I can keep it on the flash without it being possible to extract it back to a file.  But it sounds like this is (fortunately) not possible.
 


Message Edited by robdevyogi on 07-28-2008 11:48 AM
Rob
0 Kudos
Message 5 of 8
(6,216 Views)

When running as a target (not with dev environment running), is it still posible for the bitfile to be loaded to the FPGA from a place other than the flash?  Normally, the flash will hold the bitfile that is needed, but is it the case that it is also stored in the rtstartup.exe? If so, can this option be turned on/off? 

When I later updated the flash with a new, recompiled bitfile (using RIO Device Setup tool) it seems the previous version of the bitfile was enabled again (rtstartup.exe was not copied over to the target after the recompile).  The rtstartup.exe is 151 kB larger than the bitfile, so this seems plausible.

Applies to LV 8.5

Rob
0 Kudos
Message 6 of 8
(6,123 Views)
Things behave a bit differently when using an executable as opposed to just running a VI on the Real-Time controller.  This Knowledge Base article addresses waht you are asking about.
Brian A.
National Instruments
Applications Engineer
0 Kudos
Message 7 of 8
(6,097 Views)

Hi,

 

This is an old thread but in case anyone else wanted to know.

 

We are using a win dll cretaed in labview 2010 as the go between for PC (dotnet 4.0)  and the RT/FPGA.

There are prebuilt vi's to upload and download bitfiles. We made and exported two commands in the dll (vi's with a filename as a param) to call these prebuilt these vi's and can upload or download new bitfiles at will, all you need to do after that is a restart.

 

Hope this helps

0 Kudos
Message 8 of 8
(4,815 Views)