mcs的文件格式

Description

The iMPACT software can be used to generate the followingPROM file formats:

·      IntelMCS-86 Hexadecimal Object (.mcs)

·      Motorola EXORmacs (.exo)

·      Tektronix HEX (.tek)

Hexadecimal files ("'.hex") containing onlydata (without addressing) inASCII format can also begenerated using the iMPACT software.

EXO files will not be support past iMPACT 11.4 andPROMGen will need to be used to change these files into MCS files.

For more PROM File Articles and other ConfigurationRelated Articles, see(Xilinx Answer34104).

Solution

 

PROMGen can be used to change file format from one typeto the another in the following manner.

The following changes an ".mcs" file into a hexfile:

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

PROM FileFormats

INTEL MCS-86HEXADECIMAL OBJECT

File FormatCode 88

 

The Intel Hexadecimal Object record format has a9-character (4 field) prefix前缀 that defines thestart of the record, byte count, load address, and record type, as well as a 2-characterchecksum suffix. 开始记录、字节个数、加载地址、记录类型、2字符的校验和后缀

The 16-bit hexadecimal format allows for a 20-bitsegmented address space, and the 32-bit format allows for the 32-bit linearaddress space. 16 bit形式允许20 bit的分割的地址空间,32 bit形式允许32 bit的线性地址空间。

The six record types are:

00 = Data Record 数据记录
01 = End of File Record (signals the end of the file)
文件结尾记录
02 = Extended Segment Address Record (provides the offset to determine theabsolute destination address)
段地址记录
03 = Start Segment Address Record (is ignored during input and not sent duringoutput by Data I/O translator firmware)
04 = Extended Linear Address Record (provides the offset to determine theabsolute destination address) *
线性地址记录
05 = Start Linear Address Record (provides the execution start address) *
起始线性地址记录

*NOTE: The Extended Linear AddressRecord type and Start Linear Address Record type are supported only in the32-bit format.

10   0010  00   000000E0 0400 0000 0400 0000 0C80 0480   E8

16个字节 地址  数据 

10   0020  00   0020 FCA7 0C80 0180 4010 01C9 0C00 0180    59

10   0030  00   0000 0090 0400 0000 0C00 0380 0000 6000   3D

10   0040  00   0C00 0580 0000 6000 0400 0000 0400 0000   B7

mcs的文件格式

 

:02000004000BEF 020000040001F9

:020000040000FA

(The Start Segment Address record (Type 03) is not usedby Data I/O firmware.)

The checksum is the two's complement补码 of thebinary summation of the preceding bytes in the record (including thebyte count, address, and any data bytes) in hexadecimalnotation.

The extended segment address record (Type 02) definesBits4 to 19 of the 20-bit segment base address. This addresswill be added to subsequent data record addresses to provide the absoluteaddress. (This record can appear randomly in the file, but for thisapplication, it will be the initial record.)

The extended linear address record (Type 04) definesbits 16 to 31 of the 32-bit linear base address. This addresswill be added to subsequent data record addresses to provide the absoluteaddress.

NOTE:Always specify the address offset when using this format, even when the offsetis zero.

The Data I/O firmware will force the record size to 16(decimal) if the record size is specified greater than 16.

MOTOROLAEXORmacs

File FormatCode 87

 

A Motorola data file may begin with a sign-on record, butfor this application it will be ignored. (Data records have an 8- or9-character prefix and a two- character checksum suffix.)

mcs的文件格式

The Byte Count is the number of data bytes in the recordplus 3 (for a four-hexadecimal character address) or plus 4 (for asix-hexadecimal character address) for the checksum and address.

The checksum is a one's complement of binary summation ofpreceding bytes in the record (including byte count, address, and data bytes)in hexadecimal notation.

************************************************************************************************

Tektronix maximum address:..................................................65536(x100000)

Motorola EXORmacs maximumaddress:..........................16777216 (x100000)

16-bit Intel MCS-86 Hexadecimal maximumaddress:..........1048576 (x100000)

32-bit Intel MCS-86 Hexadecimal maximumaddress:....4294967296 (x100000)

************************************************************************************************

TEKTRONIXHEXADECIMAL

File FormatCode 86

 

The Tektronix Hexadecimal format for a data file consistsof a 9-character prefix (start character, address, byte count, and checksum ofthe prefix) followed by data bytes and ended by a 2-character checksum of thedata characters. The end-of-file record consists only of control charactersused to signal the end of the transmission and a byte count and sum-check forverification.

The prefix checksum is the 8-bit sum of the four-bithexadecimal value of the six digits that make up the address and byte count.The data checksum is the 8-bit sum, modulo 256, of the 4-bit hexadecimal valuesof the digits that make up the data bytes.

 

 

 

AR# 34104 Description


The Configuration Design Assistant walks you through the recommended designflow for configuration while debugging commonly encountered issues, such asiMPACT software install and error messages, Cable Support, and FPGA relatedissues.The Design Assistant not only provides useful design and troubleshootinginformation, but breaks down the scope of configuration issues through thisprocess.

NOTE:This answer record is part ofthe Xilinx Configuration Solution Center
(Xilinx Answer34904) Xilinx Configuration Solution Center is available toaddress all questions related to Configuration.