Nios® II Software Developer Handbook

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

5.10.1. Memory Types

The default Tcl script uses the IsFlash and IsNonVolatileStorage properties to determine what kind of memory is in the system.

The IsFlash property of the memory module (defined in the .sopcinfo file) indicates whether the .sopcinfo file identifies the memory as a flash memory device. The IsNonVolatileStorage property indicates whether the .sopcinfo file identifies the memory as a non-volatile storage device. The contents of a non-volatile memory device are fixed and always present.

Note: Some FPGA memories can be initialized when the FPGA is configured. They are not considered non-volatile because the default Tcl script has no way to determine whether they are actually initialized in a particular system.
Table 25.  Memory Types Recognized when Making Decisions about Your Boot Configuration
Memory Type Examples IsFlash IsNonVolatileStorage
Flash Common flash interface (CFI), erasable programmable configurable serial (EPCS) device true true
ROM On-chip memory configured as ROM, HardCopy ROM false true
RAM On-chip memory configured as RAM, HardCopy RAM, SDRAM, synchronous static RAM (SSRAM) false false

The following sections describe each supported build configuration in detail. The alt_load() facility is HAL code that optionally copies sections from the boot memory to RAM. You can set an option to enable the boot copy. This option only adds the code to your BSP if it needs to copy boot segments. The hal.enable_alt_load setting enables alt_load() and there are settings for each of the three sections it can copy (such as hal.enable_alt_load_copy_rodata). Enabling alt_load() also modifies the memory layout specified in your linker script.