Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThe memory base address must be a multiple of the span which may cause gaps. If you are trying to make it continuous so that it looks like one big memory to the software compiler that won't work anyway unless you get really cleaver with the linker scripts. Do you need separate memories though? Couldn't you just make a big memory, subdivide the memory blocks any way you want internally and just limit the memory span if needed?
You can bind individual functions to specific memory sections if you wanted to, I think you can specify this in your code by assigning the function to a specific linker section (see the tightly coupled memory example if you want to see the syntax). You can place the stack and heap in a different memory either modifying the system library properties (using the IDE) or BSP editor (using Eclipse for Nios II). This should be documented in the Nios II software developers handbook in great detail.