Embedded Design Handbook

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

5.2.2.3.1. Hardware Design

  1. Create your Intel® Quartus® Prime and Platform Designer project.
  2. Make sure external RAM or onchip memory (OCRAM) is added into your Platform Designer system.
  3. If dual image configuration is required, ensure that the Dual Configuration IP is instantiated in Platform Designer (Configuration Mode is set to Dual Compressed Images).
  4. Refer to the diagram below for example IP connections in Platform Designer.
    Figure 71. Example IP Connections in Platform Designer for Booting Nios® II from On-Chip Flash (UFM)

IP Component Settings

  1. In the Nios® II processor parameter editor, set the reset vector memory to On-Chip Flash and exception vector memory to OCRAM/ External RAM.
    Figure 72.  Nios® II Parameter Editor Settings
  2. In the On-chip Flash IP parameter editor, set the Configuration Mode to one of the following, according to your design preference:
    • Single Uncompressed Image
    • Single Compressed Image
    • Dual Compressed Images
    Figure 73. Configuration Mode Selection in On-Chip Flash Parameter Editor
  3. Program the UFM data (HEX file) by using one of the following methods:
    • Method 1: Initialize the UFM data in the SOF Intel® Quartus® Prime includes the UFM initialization data in the SOF during compilation. SOF recompilation is needed if there are changes in the UFM data.
    • Method 2: Combine UFM data with a compiled SOF during programming files (POF) generation 13—UFM data is combined with the compiled SOF during the programming files conversion. SOF recompilation is NOT needed even if there are changes in the UFM data. .
  4. Click Generate HDL. The Generation dialog box appears.
  5. Specify output file generation options, and then click Generate.

On-Chip Flash IP Settings for Method 1

  1. Check Initialize flash content.
    Figure 74.  Initialize Flash Contents with Default Initialization File
  2. If the default path is used, add meminit.qip generated during “make mem_init_generate” into Intel® Quartus® Prime project.
    Figure 75. Adding meminit.qip File in Intel® Quartus® Prime

    Make sure the generated HEX naming matches the default naming.

  3. If non-default path is selected, enable the Enable non-default initialization file and specify the path of the HEX file.

On-Chip Flash IP Settings for Method 2

  1. Uncheck Initialize flash content.
    Figure 76. Initialize Flash Content with Non-default Initialization File

Intel® Quartus® Prime Software Settings

  1. In the Intel® Quartus® Prime software, click on Assignment > Device > Device and Pin Options > Configuration. Set Configuration mode to Single Uncompressed Image or Single Compressed Image.14
    Figure 77. Configuration Mode Selection in Intel® Quartus® Prime Software
    Note: If the configuration mode setting in Intel® Quartus® Prime software and Platform Designer parameter editor is different, the Intel® Quartus® Prime project compilation will fail with the following error message.
  2. Click OK to exit the Device and Pin Options window.
  3. Click OK to exit the Device window.
  4. Click Processing > Start Compilation to compile your project and generate the .sof file.
13 This is the recommended method for application developer. You are not required to recompile SOF file for application changes during development.
14 The size of UFM shown vary according to your device selection.