Forum Discussion
Altera_Forum
Honored Contributor
15 years agoI finally figured this out yesterday...
I used Elf2Hex to convert my elf file into the hex file(s). The format of the .hex file was (spaces added by me to separate the fields): :20 aaaa 00 dd..dd cc :20 aaab 00 dd..dd cc Where aaaa == an address, dd..dd is 32 hex bytes of data, and cc is the checksum. aaab is a different address which happens to be 8 more than aaaa. For example, if aaaa was 1230, then aaab would be 1238. There were two key things that helped me figure it out. 1. Really figuring out what the warning said "is too wide to fit in one memory word"... The key phrase was "one memory word". A memory word in my system is 32-bits, which is why when I had 32 hex bytes, it only increased the address by 8 (one for each 4 byte group). 2. Looking at a default memory file created by the sopc system: :04 aaaa 00 dd..dd cc :04 aaab 00 dd..dd cc Where aaab - aaaa is only 1, and dd..dd is only 4 hex bytes. So, the key is that the Quartus tools want to have only one memory word (32-bits or 4 hex bytes in my system) PER LINE of the .hex file. In the elf2hex converter, there is an option called "--record=<length>" where you can set the maximum number of words per line. The default apparently is 20 (for me at least). Changing my makefiles to use --record=4 created a .hex file that had only 4 bytes per line and produced no warnings.