AR# 36210

|

PROMGen - How can file formats be changed or have files bitswapped?

描述

PROM file generation requires changing a .bit file to a format to be using in a PROM, typically .mcs or .hex and often includes adding other files into the PROM as well. 
 

 Byte-swapping can also be a requirement of this process and can also be managed by the tools.  

Byte-swapping is the translation of bits in the file from D[7-0] to  D[0-7] format.

This article covers how PROMGen can be used to perform these translations.

 


解决方案

The PROMGen tool can be used to manipulate file formats. 

This tools is included in the iMPACT GUI and can also be used via command line. 

When running file translations the command line is easiest to use. 

 

The following are typical use models and examples of how to use the tools.

 

1 - Transform a .mcs file into a .hex file. 

Here the -r flag is used as a "recursive' input flag into the PROMGen tool.

For example:

promgen -p hex -r input.mcs -o output.hex

 

2 - Byte-swap an existing .mcs file. 

This is a two tier process which will first create a byte-swapped .hex file and then translate this to a .mcs file.

For example:

promgen -p hex -b -r input.mcs -o temp.hex
promgen -p mcs -r temp.hex -o swapped.mcs

 

3 - Add other files into a prom file, this can be done with the -data_file flag. 

This flag will translate .bin files into .hex data when translating to a .mcs file.

Below is an example of creating a .mcs file with a .bit and a binary user data file from a specific address. 

promgen -p mcs -u 0 input.bit -data_file u 80000 user_data.bin -o outfile.mcs

This flag will also translate .hex files into ASCII data in a .mcs file, so when adding a hex file that is intended to be a hex file, first translate the file to a .bin file format using:

promgen -p bin -r input.hex -o outfile.bin

 

 

 

 

链接问答记录

相关答复记录

Answer Number 问答标题 问题版本 已解决问题的版本
34104 Xilinx Configuration Solution Center - Configuration Design Assistant N/A N/A
AR# 36210
日期 01/07/2015
状态 Active
Type 综合文章
Tools More Less
People Also Viewed