Forum Discussion
Altera_Forum
Honored Contributor
15 years agoFull On-Chip Memory
Hi, I'd like to know how to determine if the memory space of an on-chip memory is full. In my nios II system, I generated an on-chip M4K memory. It's size is 4096 bytes with a 32 bits data...
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- When you have this line:
IOWR(ONCHIP_MEMORY2_1_BASE, 0x3fe, "THIS IS TO TEST HOW MUCH DATA CAN A MEMORY SPACE CONTAIN");The C compiler will reserve 57 bytes in the .data section and put the string in there. If you use the default settings for the linker script, the .data section will end up in main RAM with your software code. --- Quote End --- Actually the 57 bytes will end up in the .rodata.str1.4 section and the default linker script will merge this with all the readonly code sections (rather than the read-write data sections).