Source: http://www.cnblogs.com/bingoo/p/3450850.html
1. Method one:. SOF and. Elf are all stored inside the FPGA, and the program is loaded and run inside the FPGA.
Put the FPGA configuration file. Sof downloaded via JTAG (in fact, online) into the FPGA itself, at this time in the Nios II interface, click "Run"-"Run as Hardware" to achieve online operation. At this time in the SOPC configuration, need to have on-chip mem_rom and Mem_ram, the program's reset vector is Mem_rom, offset 0x00, the exception vector is Mem_ram, offset 0x20. Unable to run after power failure.
2. Method two:. POF is stored in the epcs4,.elf inside the FPGA, loaded from the EPCS4, running inside the FPGA.
As with method one, just put the configuration file of the FPGA. POF is downloaded to EPCS4 as as, and the software file is also downloaded into the FPGA via JTAG, and the power is not able to run. The two configurations inside the CPU are Mem_rom and Mem_ram.
3. Method Three: Save the. sof file and the. Elf in EPCS4, load from EPCS4, run inside the FPGA.
The. sof file is downloaded into the FPGA via a jtag download, and then the. Sof and. Elf files are downloaded into the EPCS4 via the Nios II Flash programmer, with the reset vector of the CPU being EPCs, offset 0x00, The Exception vector is mem_ram and the offset is 0x20. The power supply will continue to operate normally.
4. Method Four: Save the. sof file and the. Elf in EPCS4, load from EPCS4, run in SDRAM.
The specific download method is the same as Method 3, except that the setup process is different.
The SDRAM Controller needs to be added to the SOPC, as the width of the SDRAM should be set to 8 bits, since only 8 data lines are connected in the Development Board. It is also not necessary to set the data masking word (block a byte per bit) when the top layer is instantiated. It is also necessary to instantiate a PLL in Sopc. The SDRAM clock is 100M. and phase adjustment is required for the output clock C2 of the PLL. Set the exception vector to SDRAM in the CPU.
Several ways of burning writing about Nios II (RPM)