Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12748 Discussions

SDRAM/SRAM memory Initialization for Modelsim simulation

Altera_Forum
Honored Contributor II
1,237 Views

Hi all, 

I plan to initialize my SDRAM using a .mif file or .hex file. This is my plan to do it: 

 

1) Initialize the on-chip RAM with the .mif file since there is an option to initialize it in SOPC builder (the .mif file contains only about 256 bits, so wouldn't pose any insufficient memory problem). 

 

2) Use a DMA to transfer the data from the RAM into the SDRAM. 

 

The program of my code is stored in SDRAM. I have a few questions regarding this. Is this an efficient method to initialize SDRAM using .mif file ? How do I know what memory location does my code is program into? This is to prevent any code overwrite by DMA. I see that malloc and section command does allow us to manually assign C code into specific memory but not specific address. Please advise or correct me if I am wrong in any sense. Thank you.
0 Kudos
0 Replies
Reply