This is due to the mismatch of the default size in OCRAM in the Platform Designer and the Memory Initialization file (.hex). This applies to the default Nios® V processor design example generated with the Platform Designer.
The memory size used in the Platform Designer is 300000 which is not equivalent to the memory size 327680 (4FFFF) of the memory initialization file. The default memory size of the OCRAM in the Platform Designer is set in the create_qsys.tcl script.
Figure 1: Platform Designer
Figure 2: create_qsys.tcl script
To work around this problem, modify the create_qsys.tcl script line 33 to change the memory size as below:
“set_component_parameter_value memorySize {327680}”
This modification will generate a design with a memory size of 327680, which matches the memory initialization file.
This problem is fixed starting with the Intel® Quartus® Prime Pro Edition Software version 21.4.