Altera_Forum
Honored Contributor
9 years agoNIOS-II "Memory Test" strange behaviour
Hi,
I have a Cyclone V based product (not a dev-kit!) with 512Mb of SDR SDRAM attached to the FPGA for use by the NIOS-II processor. This is 32-bit wide memory. To test the attached memory chips I used Quartus Prime & the "Nios II 15.1 Software Build Tools for Eclipse", and created a new "Project and BSP from Template". I chose the "Memory Test" template. (NB: That the fully-featured one, not the "Memory Test Small" template) The code runs from the 128K internal memory, and it should test the external 512Mb SDRAM by writing 1's and 0's to every address. It runs ok, and asks for the start and end addresses of the memory to test. The memory map of my NIOS-II system (as taken from Qsys) is as follows: http://www.alteraforum.com/forum/attachment.php?attachmentid=12147&stc=1 The SDRAM has the range 0x0400_0000 - 0x07ff_ffff Now, when I give the Memory Test program that address range, it hangs after printing the words "-Testing each bit in memory device". However (and this is the inexplicably weird bit), if I give it an address range where the SDRAM's start and end address ranges are divided by 16, it works! i.e the address range 0x0040_0000 - 0x007f_ffff See full output here: http://www.alteraforum.com/forum/attachment.php?attachmentid=12148&stc=1 This is weird as there is no memory, or any other device, in the address map in that range at all! So, what's going on? I am baffled by this. Is something aliasing, or is this is a bug in Altera's Memory Test code, or what? Any assistance greatly appreciated. Thank you.