How to simple convert a hex or mif file from Altera to Xilinx coe file?

Sep 07, 2007 2 Replies

Hi,



How to simple convert a hex or mif file from Altera to Xilinx coe file?



Do you know any little software?



Regards



Bernard Esteban MAF Agrobotic


I'm not familiar with the Altera hex file format, but the Xilinx .coe format is very simple. Normally if you have your data as a comma- separated list of hex values (no quotes or other prefix/suffix on the values, but whitespace is allowed), you can just insert something like

memory_initialization_radix=16; memory_initialization_vector=

at the beginning of the file, and end with a semicolon after the last hex value, so the whole thing might look like:

memory_initialization_radix=16; memory_initialization_vector=

00000000, 608edb80, 30476dc0, 50c9b640, 9823b6e0, f8ad6d60, a864db20, c8ea00a0, 4c11db70, 2c9f00f0, 7c56b6b0, 1cd86d30, d4326d90, b4bcb610, e4750050, 84fbdbd0, 2608edb8, 46863638, 164f8078, 76c15bf8, be2b5b58, dea580d8, 8e6c3698, eee2ed18, . . . more lines removed here . . . 52568b75, 32d850f5, 6211e6b5, 029f3d35, ca753d95, aafbe615, fa325055, 9abc8bd5, 384fbdbd, 58c1663d, 0808d07d, 68860bfd, a06c0b5d, c0e2d0dd, 902b669d, f0a5bd1d, 745e66cd, 14d0bd4d, 44190b0d, 2497d08d, ec7dd02d, 8cf30bad, dc3abded, bcb4666d;

The actual names for the radix and vector parameters may depend on the core you're generating.

HTH, Gabor

It's the standard Intel HEX format.

MIF is also absolutely trivial - a short ascii-text header and a list of (decimal) addresses and hex values.

Sounds like 10 mins work to whip up a C program to convert between all 3 formats for someone with even basic C skills... when I was using MIF files (I avoid them now) I did a bin2mif app in a handful of lines.

Regards,

Mark McDougall, Engineer Virtual Logic Pty Ltd, 21-25 King St, Rockdale, 2216 Ph: +612-9599-3255 Fax: +612-9599-3266

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required