I need to make a fpga module that can read and write to the ddr memory of the DE 10 standard fpga board. But I have no idea on where to start. Can some one please point me in a right direction.
Thank you.
I need to make a fpga module that can read and write to the ddr memory of the DE 10 standard fpga board. But I have no idea on where to start. Can some one please point me in a right direction.
Thank you.
Ideally you will take some demo project built for your exact board, and alter it accordingly to your needs.
The generic way - download the "SystemBuilder" sw from Terasic site (the manufacturer of the DE10 boards). Find your board, open "Resources" section and download needed stuff.
Run SystemBuilder, select the desired interfaces instantiated, including hard processor system. Systembuilder will create a template project with pin locations assigned.
Within your project run Qsys platform designer, instantiate the HPS core, configure the required interfaces (FPGA-to-HPS SDRAM Interface), fill in the settings for the sdram chips used. I can't remember if I've used some "Golden hardware reference design" project, but I had the needed numbers to configure ddr controller for exact chips on the other type of board (DE10-nano).
Run the tcl script "hps_sdram_p0_pin_assignments.tcl" to complete the ddr3 sdram pin assignment (standards applied, etc). On the fpga side then you'll have a memory-mapped interface, and you access ddr3 like it's just a static ram, but respecting the wait requests when controller asserts it.
It's very likely you'll find something pre-built in one of big archives present in "Resources" section on the Terasic site page for your board.
In any case, you'd better go through some tutorials on HPS instantiation, that's a huge topic, involving preparing the preloader that runs before linux, etc.