AN 736: Nios II Processor Booting From Altera Serial Flash (EPCQ)

ID 683104
Date 5/20/2016
Public

1.5.2.1. Reset and Exception Vector Settings for Nios® II Execute-In-Place Method

  1. Under Reset Vector in the Vectors tab, select EPCQ (epcq_controller_0.avl_mem) in the Reset vector memory drop-down menu and type the reset vector offset in the Reset vector offset entry box. The reset vector must be the base address of your application. In this example, it is 0x01E00000.
    Note:

    Your *.sof image size influences your reset vector offset configuration. The reset vector offset is the start address of the .hex file in EPCQ flash and it must point to a location after the *.sof image. You can determine the minimum reset vector offset by using the following equation:

    minimum reset vector offset= (.sof image start address + .sof image size) in HEX

    For example, if your *.sof image starts at address 0x0 and is 512 KB in size, then the minimum reset vector offset location you can select is 0x0080000. If the *.sof image space and the reset vector offset location overlap, Intel® Quartus® Prime software displays an overlap error.

  2. Under Exception Vector, you may select EPCQ (epcq_controller_0.avl_mem) or OCRAM in the Exception vector memory drop-down menu. In this example, 0x20 is listed for the Exception vector offset entry.
    Note: When executing-in-place, the Nios® II processor boots and runs directly from EPCQ flash, without copying any code at boot time. Because the Nios® II begins executing at the reset address in this case, exception vectors must be located at a nonzero exception vector offset to allow for instructions between the reset vector and the base of the exception vectors. Thus, you must include an exception vector offset when the reset vector and the exception vector point to the same memory and no boot copier is present.
    Note: Intel® recommends setting the exception vector to OCRAM to make the interrupt processing faster.
    Figure 4. Exception Vector Settings in Platform Designer
  3. Click Finish. You will return to the Platform Designer System Contents tab.
  4. Double-click on the Serial Flash Controller IP to open the Intel FPGA Serial Flash Controller Parameter editor.
  5. Select the Configuration device type based on your hardware design and choose the desired I/O mode.
  6. Close the Parameter Editor and return to the Platform Designer System Contents tab.
  7. Click Generate HDL to generate your Platform Designer design.
  8. Compile your design in Intel® Quartus® Prime software.