Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

NIOS-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.

1 Reply

  • sirujjan's avatar
    sirujjan
    Icon for New Contributor rankNew Contributor

    Hello dear

    Please can you update if your issue was resolved??
    My design testing in eclipse is suffering the same issue exactly. Because my DE board has 1GB SDRAM, so its address range is: 0x4000_0000 - 0x7fff_ffff. But I am unable to fully test it.

    Secondly, my DE board consists of another SDRAM (2 separate modules of 1GB each). This second SDRAM addressing in qsys is: 0x0000_0000 - 0x7fff_ffff. I am unable to test this second SDRAM at all.

    Please can you help me update about your issue if resolved already?