All Nios II tutorials explain how to use on-chip memory to store the Nios II program. However, what does one do if the program is too big to fit in there? Then one would have to use off-chip memory. However, I do not know how this is incorporated into the design flow.
In other words, in tutorials Qsys system we connect the instruction master of the processor to on-chip memory. Thereafter, when we execute the program from Nios II Ecplise IDE, the program is downloaded into the on-chip memory automatically (I think) and executed. How do I make the program be put into off-chip memory like SDRAM or SRAM or Flash? Is off-chip program download as simple as with on-chip memory i.e one click and the Nios II program is downloaded and executed? Finally, which file generated by the Nios II Eclipse IDE contains the size of the program? Is the size of the ELF file all that I need to know?連結已複製
5 回應
You specify the address of the external memory controller and connect it to the instruction master in Qsys, just like with on-chip memory.
I believe the size of the .elf file is the size you need to know.Hi Xaui,
When .elf file is generated, there are 2 additional text files that are generated as well - .map and .objdump Good estimation on the size of memory can be found in .map file. There is some kind of table "memory configuration", where entry .text correspond to your code segment. In the column "length" - the size of your compiled code. Regards.Thanks for the answers, however there is still a missing element, provided that I add an external memory controller into the Qsys system and link the Nios II instruction master to it, the question still remains as to how will I instruct Eclipse IDE to put the code into that memory device?
--- Quote Start --- Thanks for the answers, however there is still a missing element, provided that I add an external memory controller into the Qsys system and link the Nios II instruction master to it, the question still remains as to how will I instruct Eclipse IDE to put the code into that memory device? --- Quote End --- You can also specify your external memory module in the settings of your NIOS processor in qsys ("reset vector memory" and "exception vector memory") ... see screenshot below. Then, (as I suppose) the memory selected in these options, is "picked up" when BSP is generated. https://www.alteraforum.com/forum/attachment.php?attachmentid=14015
