Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,083 Views

Hex to Mif file converter for LM32 Hex files

I have ported the LatticeMico32 to an Altera Cyclone. I have a 8K x 32 memory but the hex file I have has 4 words per line and I get the following line while trying to compile in quartus II 13.1 

 

 

Warning (113009): Data at line (1) of memory initialization file "yo.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. 

 

The program used to generate the hex file, lm32-objcopy.exe does not have an option to make less than 4 32-bit words per line.  

Does altera have any tools that could convert the files to the right format or mif file? I tried the elf2mif program but it doesn't seem to be working on cygwin nor my elf files..is it only for NIOS elf files? 

 

Salman
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
169 Views

I haven't used the elf2mif for non Altera's elfs, but I have used a converter srec_cat or SRecord program to do many similar conversions in the past. 

 

http://srecord.sourceforge.net/ 

 

It was originally a srecord conversion tool, but now includes many popular memory formats. 

 

Pete
Altera_Forum
Honored Contributor I
169 Views

Thanks...much better than trying to modify the files by hand and multiple unix utilities... 

 

Salman 

 

 

 

--- Quote Start ---  

I haven't used the elf2mif for non Altera's elfs, but I have used a converter srec_cat or SRecord program to do many similar conversions in the past. 

 

http://srecord.sourceforge.net/ 

 

It was originally a srecord conversion tool, but now includes many popular memory formats. 

 

Pete 

--- Quote End ---  

Reply