Improving NIOS2 performance, problems with memory map
My starting point was a project for the Trenz CYC1000 which couples a Cyclone 10 LP with a 64M bit SDRAM memory chip. I'm successfully developing and running a NIOS2 application but the performance is really poor and I need more throughput. A quick look at the linker settings shows that all sectors are going into SDRAM, which will kill performance for sure. I tried:
Putting .text into the 16kB of on chip memory but it didn't fit.
Putting .bss and/or .rwdata into the 16kB of on chip memory but the exception handling code wont span some jumps. The error code is "warning: unable to reach alt_instruction_exception_handler (at 0x2a0) from the global pointer (at 0x1028ad8) because the offset (-16943160) is out of the allowed range, -32678 to 32767"
What can I do? I guess I'd really like to know what this offset limit means in practice.
Thanks for that. I've looked at the description of mgptop and I'm not really any the wiser. In the mean time I've got it to link by putting onchip memory just below the SDRAM so there aren't big gaps in memory space. There look to be a lot of settings that should improve performance (e.g. separate interrupt stack) but I'm guessing a lot of them may also just break the project. I'm reluctant to change anything I don't really understand.