Forum Discussion

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

DDR3 read/write using NIOS

Hi,

I want to write/read DDR3 SDRAM using NIOS II. I have prepared a Qsys system that contains a DDR3 controller with UniPHY, Nios II/s processor and JTAG UART. Is that sufficient? Do I need to add a DMM in the system. I referred "UniPHY Design Tutorials" tutorial for Qsys (http://www.altera.com/literature/hb/external-memory/emi_tut_qdr.pdf). They have used DMA in the system.

Note that I want to use the same DDR3 SDRAM as the program memory of Nios II. Is it possible? Which components do I need in addition to the ones mentioned above?

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You should run just a basic system. If you want to write to the memory from external peripheral or to external peripheral, then you need DMA, otherwise just write to a pointer and you'll be writing to the memory.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    Yes it is possible to test DDR running your application in DDR but only if you DDR is working. You might want to consider instantiating a large block of internal dual port ram in the design and then changing the bsp to run the application from the internal memory. This will also allow you to check that you c code is correct before testing DDR. The NIOS has a DDR3 template for testing DDR and Flash memory that has worked for me.