Forum Discussion
Altera_Forum
Honored Contributor
15 years agoUsually both code and data are stored in sdram, unless you map them in other places changing syslib properties or directly through linker options.
Sure, code and initialized data are stored in flash eprom but they are copied upon boot into sdram (or sram or internal memory, wherever you have mapped each section). As I already posted in another similar thread, a safe and much simpler way to use sdram is: define a sdram buffer as a variable array, i.e. char bigbuffer[BUFSIZE] and then write to bigbuffer[myaddr] instead of using direct iowr. The linker automatically takes care of avoiding sdram corruption (provided you check myaddr<BUFSIZE in your code...) Cris