cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sunyata
Visitor
Visitor
2,346 Views
Registered: ‎01-19-2009

Initializing external SDRAM with data from a file

I have built a design which uses internal block RAM memory to store some data that I need. It's relatively easy to initialize block RAM memory with a simple VHDL function that reads the initial data from an external file. Now I want to modify my design so that the data are stored in the external SDRAM memory but I have trouble figuring out how exactly I could initialize it. Note that I'm not interested in running my application from external memory but only in using this memory to transfer data from it to my peripheral and vice versa. Could someone give me some hints as to how I could initialize SDRAM with my own data?

Can I do this by modifying the linker script in EDK? Maybe adding another section, linking it to SDRAM and appending the executable.elf with my data?
Or maybe by programming the flash memory with my initialization file and then, upon start-up, copying its contents to SDRAM? In this case, what should be the format of this initialization file? A simple sequence of 0s and 1s?
0 Kudos
1 Reply
tembridis.com
Explorer
Explorer
2,340 Views
Registered: ‎07-14-2008

A simple binary file should do the trick. That's how I make image raw data available for processing to my modules for testing purposes. I convert images to RAW with Gimp and then just burn them into flash. Later on, my application copies them to volatile memory via memcpy().
0 Kudos