Forum Discussion
Altera_Forum
Honored Contributor
11 years agoThere are two different ways for NiosII executable code storage:
1. Executable code is stored in On-Chip RAM directly. This is according to your first attempt: --- Quote Start --- In Nios I generated the mem_init file, and added them into my quartus project, and the reset vector I set to the on-chip ram, then after I programmed the .sof file into FPGA, it works --- Quote End --- In this case you need not the epcs_flash_controller in your system. Both Reset and Exeption vectors must point to On-Chip RAM. If you convert this sof file to jic, and program this jic to EPCS, your project will start the work after power is up. I don't know, why your project doesn't start. Did you recompile quartus project after mem_init hex file was added? If yes, may be your jic has been created incorrectly, or some problem occured during EPCS programming. 2. Executable code is stored in the EPCS. This is according to your second attempt: --- Quote Start --- I changed the reset vector to EPCS controller, it still doesn't work --- Quote End --- In this case the epcs_flash_controller is nesessary in your system. The reset vector must point to the epcs_flash_controller, which contains the bootcopier code. The exeption vector must point to On-Chip RAM because your .text segment is still located there. After power is up, NiosII start the execution of the bootcopier code from epcs_flash_controller internal ROM. This bootcopier gets application executible code from EPCS and stores it into On-Chip RAM. After bootcopier has finished its work the control passes to the application executible code in the On-Chip RAM.