Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20761 Discussions

Converting from COE to MIF or HEX

Altera_Forum
Honored Contributor II
3,245 Views

Does anybody knows if there is a piece of software that converts Xilinx`s memory initialization file format - COE, to Altera`s MIF or at least HEX! 

 

Thanks!
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
2,215 Views

.coe and .mif files are ascii, this means that you can open both using any text editor and find the data organization and headers in order to write a simple program or matlab script that makes the conversion. 

 

 

However, these .exe files with their .c source codes could help you. 

 

https://www.alteraforum.com/forum/attachment.php?attachmentid=747
0 Kudos
Altera_Forum
Honored Contributor II
2,215 Views

Thanks, I already found the program you attached to your post, but I need one that converts in oposite direction, i.e from coe to mif or at least to HEX, so it seems that I will have to resort to programming!

0 Kudos
Altera_Forum
Honored Contributor II
2,215 Views

I found one very simple solution for this problem,  

1. Open New Memory Initialization File in Quartus II 

2. Set the memory radix to be same as it is in coe file 

3, Copy the actual contents of the memory from the coe file 

4. Paste it from the begining of the newly opened mif file 

5. Save the file`
Mathiazhagan
Novice
1,794 Views

Hi 

I have done the same way what you have mentioned but am not able to copy and paste am getting a error as "Memory value must be of  radix hexadecimal" Could u please help me out how to resolve this issue 

 

Thanks in Advance 

0 Kudos
Reply