Embedded Design Handbook

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

5.2.5.1.1. Hardware Design

  1. Create your Intel® Quartus® Prime and Platform Designer design.
  2. Make sure onchip memory (OCRAM) is added into your Platform Designer system.
  3. Refer to the diagram below for example IP connections in Platform Designer.
    Figure 167. Example IP Connections in Platform Designer for Booting Nios® II from On-Chip Memory (OCRAM)
    Note: On-Chip Flash IP is applicable to Intel® MAX® 10 devices only. For other FPGA devices, it should be the memory controller IP that works with your FPGA configuration scheme.

IP Component Settings

  1. In the Nios® II Processor parameter editor, set both the Reset vector memory and Exception vector memory to On-Chip Memory (OCRAM).
    Figure 168.  Nios® II Parameter Editor Setting
  2. For Intel® MAX® 10 devices, in the On-chip Flash IP parameter editor, set the Configuration Mode to Single Uncompressed Image with Memory Initialization or Single Compressed Image with Memory Initialization. Leave the Initialize flash content unchecked. This is because the On-chip flash initialization data will not be enabled
    Figure 169. Configuration Mode with Memory Initialization Selection and Initialize Flash Content Setting
  3. In the On-chip Memory (RAM or ROM) IP parameter editor, check Initialize flash content. If default path is used, add meminit.qip generated during “make mem_init_generate” into Intel® Quartus® Prime project. Make sure the generated HEX naming matches the default naming. If non-default path is selected, check Enable non-default initialization file and specify the path of the HEX file (<on_chip_ram>.hex).
    Note: The meminit.qip stores the location information of the initialization files.
    Figure 170. Enable Initialize Memory Content with Default Initialization File in On-Chip Memory Parameter Editor Settings
    Figure 171. Adding meminit.qip File into Intel® Quartus® Prime
    Figure 172. Enable Initialize Memory Content with Non-default Initialization File in On-Chip Memory Parameter Editor Settings
  4. Click Generate HDL, the Generation dialog box appears.
  5. 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. Set Configuration mode to Single Uncompressed Image with Memory Initialization or Single Compressed Image with Memory Initialization.17
    Note: This setting is applicable to Intel® MAX® 10 devices only. For other FPGA devices, set the Configuration mode according to your FPGA configuration scheme.
    Figure 173. Configuration Modes with Memory Initialization Selection in Intel® Quartus® Prime
    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.
    • If configuration mode without memory initialization is selected with Initialize flash content checked in On-chip Memory IP, 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 Start Compilation to compile your project and generate the .sof file.
17 The size of UFM sector will vary according to your device selection.