Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

5.2.4.4.1. Hardware Design

The following sections describe a step-by-step method for building a bootable system for a Nios® II processor application executing in place from configuration QSPI flash. The example below is built using Cyclone V E FPGA development kit.

IP Component Settings

  1. Create your Nios® II Processor Project using Intel® Quartus® Prime and Platform Designer.
  2. Ensure the Generic Serial Flash Interface Intel FPGA IP is added into your Platform Designer system. IP is added into your Platform Designer system.
    Figure 146. Connection for Generic Serial Flash Interface IP
    Important:
    Figure 147. Generic Serial Flash Interface Parameter Settings
  3. Change the Device Density (Mb) according to the QSPI flash size.
  4. Change the addressing mode by modifying bit 8 of the Control Register value in the Default Settings parameter section. Changing bit 8 to 0x0 enables 3-byte addressing, or 0x1 enables 4-byte addressing.
    Note: Refer to Intel Supported Configuration Devices tab ➤ Intel Supported Third Party Configuration Devices tab in Device Configuration Support Center to check the byte addressing mode supported for each flash device in each FPGA device. For example, Cyclone V E FPGAs when used with Micron MT25QL256 devices support the 4-byte addressing mode.

    Prior to Intel® Quartus® Prime Pro Edition Version 19.3 and Intel® Quartus® Prime Standard Edition Version 20.1, the Control Register is available after you select Show Hidden Parameter by right clicking on the parameter editor.

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

  1. In the Nios® II Processor parameter editor, set the Reset Vector Memory to QSPI Flash and Exception Vector Memory to OCRAM/ External RAMor QSPI Flash according to your design preference.
    Note: Your SOF image size influences your reset vector offset configuration. The reset vector offset is the start address of the HEX file in QSPI flash and it must point to a location after the SOF image. If the SOF image space and the reset vector offset location overlap, Intel® Quartus® Prime software displays an overlap error. 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.
    Figure 148.  Nios® II Parameter Editor Settings When Exception Vector is set to OCRAM/ External RAM
    Figure 149.  Nios® II Parameter Editor Settings When Exception Vector is set to QSPI Flash
  2. Click Generate HDL, the Generation dialog box appears.
  3. Specify output file generation options and then click Generate.

Intel Quartus Prime Software Settings

  1. In the Intel® Quartus® Prime software, click on Assignment > Device > Device and Pin Options > Configuration.
  2. Set Configuration scheme to Active Serial x4 (can use Configuration Device).
  3. Set the Active serial clock source to 25 MHz Internal Oscillator
    Figure 150. Device and Pin Options
  4. Click OK to exit the Device and Pin Options window.
  5. Click OK to exit the Device window.
  6. Click Start Compilation to compile your project.