Altera_Forum
Honored Contributor
21 years agoROM initialisation
Hello,
I created a SOPC-builder module with an on-chip ROM component. This ROM should be instantiated with the content of on_chip_rom.hex, that is in the Quartus directory and contains just 0s. I want another content and wrote the following lines in my c-file (totally 512 bytes): static const unsigned int cardbus_content[] __attribute__ ((section (".on_chip_rom"))) = {0x12345678, 0x87654321, 0x22222222, 0x33333333, 0xf70000ff, 0xffffccff, ...}; The IDE is also rewriting the on_chip_rom.hex file 8as expected) during compilation but with 0's and not my values. The section in the .objdump file looks like this: 8 .on_chip_rom 00000000 00801600 00801600 0000ef58 2**0 CONTENTS Where is my mistake? How do I initialize memories with the IDE? Best Regards, damc P.S. Simply creating the .hex file as it was possible with Nios1 isn't possible anymore, because the IDE is overwriting this file with 0's on every compilation.