Embedded Design Handbook

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

5.2.6.2.15.2.6.3.1. Hardware Design5.2.6.2.15.2.6.3.1. Hardware Design

  1. Create your Intel® Quartus® Prime project and Platform Designer design.
  2. Make sure OCRAM or External RAM is added into your Platform Designer system.
  3. Refer to diagram below for example IP connections in Platform Designer.
Figure 179. Figure 204. Example IP Connections in Platform Designer for Booting Nios II from CFI Flash

IP Component Settings

  1. In the Nios® II processor parameter editor, set the Reset vector memory to CFI flash and Exception vector memory to OCRAM / External RAM or CFI flash according to your design preference.
    Note: Setting the exception vector memory to OCRAM / External RAM is recommended to make the interrupt processing faster.
    1. If exception vector memory is set to CFI Flash, the minimum exception vector offset that you can set is 0x20.
      Note: When executing-in-place, the Nios® II processor boots and runs directly from CFI 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 32 bytes instructions between the reset vector and the base of the exception vectors.
    2. The Reset vector must be the base address of your application. In this example, it is 0x01bc0000.
      Note: Your *.sof image size influences your reset vector offset configuration. The reset vector offset is the start address of the .hex file in CFI 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
    Figure 180. Figure 205.  Nios® II Parameter Editor Settings with Exception Vector Set to OCRAM / External RAM
    Figure 181. Figure 206.  Nios® II Parameter Editor Settings with Exception Vector Set to CFI Flash
  2. In Generic Tri-State Controller IP parameter editor, select one of the preset configurations in Library to automatically assign the parameter values.
    Figure 182. Figure 207. Generic Tri-State Controller Preset Configuration
    If your flash device is not listed in the Library, you can use the parameter editor to specify the required settings.
    Note: The appropriate values for these parameters are typically listed in the device’s datasheet.
    On top of the device specific parameters, ensure the following settings are correct in place:
    1. In Signal Selection tab, enable the following signals:
      • readdata
      • writedata
      • read
      • write
      • chipselect
      • address
      Figure 183. Figure 208. Signal Selection
    2. In Signal Polarities tab, enable the following signals:
      • read
      • write
      • chipselect
      Figure 184. Figure 209. Signal Polarities
    3. In Parameters tab, select Is memory device.
      Figure 185. Figure 210. Parameters Window
    4. In Avalon® Connection Point Assignments tab, set the following parameters to a value of 1:
      • embeddedsw.configuration.isFlash
      • embeddedsw.configuration.isMemoryDevice
      • embeddedsw.configuration.isNonVolatileStorage
      Figure 186. Figure 211.  Avalon® Connection Point Assignments
  3. Click Generate HDL. The Generation dialog box appears.
  4. Specify output file generation options, and then click Generate.

Intel Quartus Prime Software Settings

  1. In the Intel® Quartus® Prime software, click on Assignments > Device > Device and Pin Options > Configuration. Set Configuration scheme to Passive Parallel x8/x16/x32 1821
    Figure 187. Figure 212. Configuration Scheme Selection
  2. Click OK to exit the Device and Pins Options window.
  3. Click OK to exit the Device window.
  4. Click on Processing > Start Compilation to compile your project and generate the .sof file.
1821 Set data width according to supported scheme.