cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
singletrack
Adventurer
Adventurer
5,852 Views
Registered: ‎04-08-2011

Reading FPGA image version number from .mcs in flash

Hi all,

 

On the boards we are using that have a Virtex-6 mounted, we generate the .bit as normal, create a .mcs file from the .bit, write the .mcs to flash and the FPGA is configured from flash when power is applied.

 

The flash has space for multiple FPGA images and it would be very useful to be able to read some sort of version number /string that is embedded in the image when the .bit is generated.  Ideally, the version number/string would be carried forward from the VHDL all the way to the .bit and forward into the .mcs in flash.

 

Is there any way to achieve this or something similar?  What we don't want is to have to write the version number/string "extra" into the flash beside the .mcs.  This is because when the .mcs is written to flash an extra value has the potential to be wrong since it would have to be entered separately on the command line that launches the write.

 

Many thanks for your time!

 

 

0 Kudos
5 Replies
austin
Scholar
Scholar
5,847 Views
Registered: ‎02-27-2008

s,

 

http://www.google.com/patents/US7519823

 

The idea is to use unused bits in the bitstream.  We patented it, so if you are using our devices, you have a royalty free license to use the techniques described.

 

The patent is not available for licensing for any other FPGA devices not manufactured by Xilinx.

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
barriet
Xilinx Employee
Xilinx Employee
5,834 Views
Registered: ‎08-13-2007

0 Kudos
singletrack
Adventurer
Adventurer
5,817 Views
Registered: ‎04-08-2011

Thanks both for the fast answers!

 

"Bitstream Identification with USR_ACCESS" looks like the best option here and the app note contains details of where to look in the .bit for the data which is great.

 

However, do you also have details on how to extract the same information from a .mcs created from a .bit please?  We would have to read the .mcs from flash and process it somehow to extract the data from the user access register.

 

 

http://www.xilinx.com/support/documentation/application_notes/xapp497_usr_access.pdf (Bitstream Identification with USR_ACCESS)

 

Many thanks!

 

 

0 Kudos
austin
Scholar
Scholar
5,810 Views
Registered: ‎02-27-2008

s,

 

Most people use a binary (hex) editor, and tools like diff (differences between files) to modify the binary files.  But, since that is all unsupported, it is generally a bad idea to do things like that by hand.  Discovering where in teh file items are located is not so tough, but remember that formats may change in a future version of the tools.

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
singletrack
Adventurer
Adventurer
5,807 Views
Registered: ‎04-08-2011

Hi Austin,

 

I was able to find the user access register in the .bit no problem using a hex editor but I need more information on where it ends up in the .mcs.  Is there a link that details the .mcs file format or specifies how to find the user access register in the .mcs file?

 

Many thanks!

 

0 Kudos