Nios® II Software Developer Handbook

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

14.2.3. Memory Initialization Namespace

You use the memory initialization namespace to pass memory initialization information to embedded software tools. Use this namespace to create memory initialization files, including .flash, .hex, .dat, and .sym files. You use memory initialization files for the following tasks:
  • Flash programming
  • RTL simulation
  • Creating initialized FPGA RAMs for Quartus Prime compilation

You only need to provide these assignments if your component is a memory device that you want to initialize.

The assignment name for the memory initialization namespace is embeddedsw.memoryInfo. <name> . The embedded software tools already have definitions for the data types of the possible values.
Table 54.   Memory Initialization Data Types and Corresponding Format
Memory Initialization Data Type Format
boolean 1, 0
32-bit integer 123, -50
string ABC
Note: Quotation marks are not required.
Table 55.  Memory Initialization Information - Assign with set_module_assignment Command
Memory Initialization Name Type Default Meaning
HAS_BYTE_LANE boolean 0 Create a memory initialization file for each byte.
IS_FLASH boolean 0 Component is a flash device.
IS_EPCS boolean 0 If IS_FLASH and IS_EPCS are both 1, component is an EPCS flash device. If IS_FLASH is 1 and IS_EPCS is 0, the component is a CFI flash device. If IS_EPCS is 1, IS_FLASH must also be 1.
GENERATE_HEX boolean 0 Create an Intel hexadecimal file (.hex).
GENERATE_DAT_SYM boolean 0 Create a .dat and a .sym file.
GENERATE_FLASH boolean 0 Create a Motorola S-record File (.flash).
INCLUDE_WARNING_MSG string empty string Display a warning message when creating memory initialization files.
MEM_INIT_FILENAME string Module instance name Name of the memory initialization file, without any file type suffix.
MEM_INIT_DATA_WIDTH 32-bit integer none (mandatory) Width of memory initialization file in bits. May be different than the slave port data width.