My best advice is to take a look at DE2 examples.
Anyways, it depends a lot on how do you want to access the DDR:
- do you want to read/write it from a custom IP/design you are developing or do you want to access it from a NIOS softcore?
In the case of NIOS things might be easier, you just need to add the SDRAM controller to the SoPC and map to NIOS memory space.
In the case of a custom IP core, it depends a lot on the design. My best advice would be to develop your IP core as an Avalon MemoryMapped Master, and take advantage of the Avalon bus infrastructure to use the sdram controller.
DMA is not mandatory, and I would suggest to introduce it later and start with a simple design, maybe just a NIOS processor, the SDRAM and a PIO for leds.
Just another advice: rember that, in order to let the SDRAM work correctly, you must use a PLL which anticipates the phase of the clock going to the sdram in order to compensate transmission delays.
So considering, for instance, that you want to run your design @ 100 MHz, you must introduce a PLL which outputs two clocks:
- c0, 100 MHz, Ph: 0 degrees: the clock that you will use INSIDE the FPGA and that will clock the cpu, the SDRAM controller, and the other SoPC peripherals
- c1, 100 MHz, Ph: -65°: the (anticipated) clock that you will output to the DRAM_CLK pin (be aware not to connect to anything inside the design, just to the output pin)
Anyway the best advice is to read getting started manuals inside the DE2 CDrom
Regards,
Primiano