Originally posted in cdnusers.org by ashvarma
Tip of the Week:
Here's something that converts Intel srec (ihex) to Verilog memh file.
I provided an example srec file ihex.dat and example output file ram32.dat
This is software for an ARM cpu compiled with a cross gcc for ARM.
Run it like:
% hex2v.pl < ihex.dat > ram32.dat
It has some hardcoded assumptions about the memory width, in this case the
memory is 32-bits wide, so you will probably need some minor changes for other memory configurations.
Credit goes to Jason Rothfuss who first gave me a version of this.