Forum Discussion
Altera_Forum
Honored Contributor
12 years agoRead Write to DRAM (main memory)
I am just switching from another fpga to altera. Could you please tell me is this the write way to access main memory. main_memory = (char *) DDR2_SDRAM_BASEADDR; // base address of main...
Altera_Forum
Honored Contributor
12 years agoThis isn't the right way if the "main memory" is also used for your software. The beginning of the memory is generally used for the exception vectors, and if you overwrite those you will crash the system.
It is a lot safer to allocate a block of memory to use, either by using malloc() to allocate at run time, or by using a static or global table to allocate at compile time.