AR# 14735


9.1i iMPACT/PromGen - What are ".ufp" (c'format) and ".pft" files, and how do I modify a ".pft" file?


What are ".ufp" (c'format) and ".pft" files, and how do I modify a ".pft" file?


A user-formatted PROM file (UFP) is a user-defined PROM file. You can specify the file format by modifying the "$Xilinx/data/default.pft" file. Note that iMPACT will always use the default ".pft" file located in the "$Xilinx/data" directory, and running PROMGen in the command line allows you to specify any ".pft" file.

Example ".pft" file format:

;default PROM File Template for PROMGen User PROM Format

begindata = ""

beginline = ""

endline = ""

endline_last = ""

bytes_per_word = 1

byte_order = 0

items_per_line = 16

item_prefix = ""

item_suffix = ""

item_separator = ""

shift_out_first = "lsb"

format = "hex"

enddata = ""

An explanation for the different fields in the ".pft" file follows:

begindata - Text that appears as a header (e.g., for assembler files, this could be ".segment"; whereas, for C files, it may be "unsigned long lca_data[] = {" . The default is "".)

beginline - Text that appears at the beginning of every data line, (e.g., ".DB" or ".DW". The default is "".)

endline - Line ending. This will appear at the end of every data line, except the last data line--if a special last line ending is specified (e.g., ";" , "," etc. The default is "".).

endline_last - End of last data line. If this is not specified, the end of last data line will be the same as the end of every data line.

bytes_per_word - Number of bytes per word. Valid values are 1, 2, or 4, corresponding to 8-, 16-, and 32-bit words. The default is 1.

byte_order - Byte position for the bytes within a word. For 8-bit words, byte order must be 0 ( default); for 16-bit words, byte order can be 0,1 (the default) or 1,0; for 32-bit words, it should be the required sequence, e.g., 0,1,2,3 (the default) - big endian; 3,2,1,0 - little endian; 1,0,3,2 - any other order.

items_per_line - Number of data items per line of output. This number should be chosen keeping the bytes_per_word in mind to get reasonable line size. The default is 8.

item_prefix - Prefix for data item ("0x", "0", etc.). This will appear as a prefix to every byte/word in the output file. The default is "".

item_suffix - Suffix for data item , e.g., "h". This will appear as a suffix to every byte/word in the output file. The default is "".

item_separator - Separator between two data items on the same line, e.g., "," . This will appear between two bytes/words in the output file. The default is "".

shift_out_first - Shift order. Whether "lsb" or "msb" is shifted out first corresponding to right or left shift. The default is "lsb".

format - The format specifier for the file, e.g., hex, dec, oct. The default is hex.

enddata - End data. Stuff at the end of the output file. The default is "".

NOTE: All the fields in the ".pft" file need not be specified. Only the ones which are different from the default values are required to be specified.

Parameters must be separated from their values by an '=' sign. Non-numeric parameter values must be specified within double-quotes. The special characters which can be used as part of a string value are:

\t - tab

\n - new line

\f - form-feed

\\ - '\' character

The output ".ufp" file contains the configuration data in the specified format. If enough bytes of data are not available in the input file to build the last word in the specified format, "FF"s would be padded at the end of the file. The length count is not changed.

AR# 14735
Date 12/15/2012
Status Active
Type General Article
People Also Viewed