--- Quote Start ---
originally posted by ellis@Mar 26 2007, 03:59 AM
hi again,
found what i meant, i guess:
http://www.altera.com/literature/lit-nio2.jsp (http://www.altera.com/literature/lit-nio2.jsp)
-> nios ii software developer's handbook
in chapter 4 'developing programs using the hal' under 'memory usage' -> 'placement of heap and stack':
'by default, the heap and stack are placed in the same memory partition
as the .rwdata section. The stack grows downwards (toward lower
addresses) from the end of the section[/b]. The heap grows upwards from the
last used memory within the .rwdata section. You can control the
placement of the heap and stack as a system library property in the
Nios II IDE.' (right now page 3-38)
So if I got it right, heap and stack are not placed at the end of memory, just stack grows downwards from end of .rwdata section (check also Figure 4-3 'Sample HAL Link Map' on page 4-34).
Then maybe I've been wrong, sorry. Still I didn't get it in total.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=22505)
--- Quote End ---
[/b]
--- Quote End ---
Thanks Elli for the reply.
We dont have enough resource in FPGA to place an on-chip memory. Just for the sake of testing I instantaited one more sdram. used first sdram to place .rodata, rwdata stack and heap., so that one sdram is totally free. I was able to test the full sdram in simualtions. I contacted altera my support regarding this issue. They have also replied telling that stack and heap are placed at the end of the memory. Then I asked them where can I find the memory allocation done for rodata, rwdata, stack and heap? They suggested me to generate .objdump file which will give the placement details. We can generate this file from NIOS II window. goto nios II IDE -> window -> preferences -> NIOS II -> generate objdump file.
I generated this file. I could see the address allocation done for .rwdata, .rodata, .text etc.. But did not find exact allocation done for stack and heap. I am waiting for the reply from mysupport. Also during mass production of the boards we want to check the complete SDRAM i.e each and every location of SDRAM. We dont have any other memory in our project except Flash and SDRAM. So if we place rodata, rwdata, stack and heap in the SDRAM then we wont be able to test the complete
SDRAM.So give me some suggestions on this.
Thanks
Shilpa