I have nexys 4 ddr board which has 128MiB on board memory and I access it via IP inside Vivado named Memory Interface Generator. But for example unlike BRAM IP which has a .coe file that initialize BRAMs of the board, here for ddr memory of the board I cannot find a way to initialize it with some data. I have a Ibex processor that utilize this memory as its main memory but now I don't know how to put compiled codes that I have written inside this ddr2 memory. Can anyone help? Is there a way to boot these memories with some initial data easily like BRAMs?
Asked
Active
Viewed 364 times
1 Answers
1
For using an external memory like DDR2 as your processor main memory, you have to use a boot loader. Boot loader programs are small and can be run on the BRAM inside the FPGA. When the board is powered up, it reads the main program from external non-volatile memory (like SPI Flash) and loads it on the external DDR2.
I am not familiar with the processor you are using, but Xilinx has a template SREC-Bootloader in Vitis for its Microblaze processors. You can use that as start point and write your own bootloader.

mohammadhgh
- 59
- 3
-
Thank you for your answer... but as a beginner how hard it can be to write this bootloader? I actually expected to find probably easier solution but apparently it wont be that easy... – Seyed Kian Nov 15 '21 at 04:19
-
@seyed-kian I am not sure, but I guess that you can use most of the SREC-Bootloader template project for your application. If so it won't be hard. You also need to convert your .elf file to SREC format so the SREC-Bootloader can load it. Xilinx has also a tool for this. – mohammadhgh Nov 15 '21 at 10:45
-
Ok... thank you for your answers... let me see what I can find :) – Seyed Kian Nov 15 '21 at 11:35
-
Sorry that I bother you again but I have found [https://github.com/Xilinx/u-boot-xlnx] in github... Does this thing help? Do you have any knowledge about it? – Seyed Kian Nov 26 '21 at 11:31
-
@SeyedKian I have used U-Boot as Linux boot-loader, but I have no experience in booting standalone application with it. – mohammadhgh Nov 29 '21 at 15:23