Trenz Electronic GmbH Support Forum

Community => CYC1000 community projects => Topic started by: asc1 on June 15, 2018, 04:12:17 PM

Title: SDRAM Interface
Post by: asc1 on June 15, 2018, 04:12:17 PM
CYC1000 comes with an SDRAM chip, but there is no SDRAM core in the Quartus IP library. According to the NIOS ref design it should be possible to use a NIOS based controller, however the ref design is incomplete (to my taste) and checking the pinout revelas that there is no clock for the SDRAM chip coming from the FPGA.
Please clarifiy how to properly use the SDRAM, preferable also without NIOS.
I use the CYC1000 for teaching and have some designs running on it, so the rest of the board is nice (few more switches would be good, though)
Title: Re: SDRAM Interface
Post by: Minatsu on September 07, 2018, 08:24:04 AM
I got my CYC1000 last week, and found the same issue.

I fixed the reference NIOS design to work with on-board SDRAM:

Primary changes from the original design are as follows:

Enjoy it ;)
Title: Re: SDRAM Interface
Post by: microchaos on September 13, 2018, 08:48:28 PM
Hi Minatsu,

  Thank you for sharing your design!
  Just cloned your design from github. Quick check shows that MEM_CLK pin is not assigned to the physical pin. This is excerpt from qsf file:
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to MEM_CLK

  When checking pin planer pin B14 is shown as unsigned as well.
Title: Re: SDRAM Interface
Post by: Minatsu on September 19, 2018, 03:24:46 PM
Hi microchaos,

Thank you for checking my design.

I am new at FPGA, and interested in fitter's automatic assignment ability because I found that PIN_B14 has "PLL2_CLKOUTp" function.
It seems that PLL2 is intended to be used as a clock generator for SDRAM on CYC1000.

I assigned a location of my_pll (pll0) to PLL2 by assignment editor, and leaved MEM_CLK unassigned.
Then I found that MEM_CLK is automatically assigned to PIN_B14 by fitter at compilation time.

However, of course it is better to assign MEM_CLK to PIN_B14 explicitly to avoid any unexpected behavior, so I updated my design on github.
Title: Re: SDRAM Interface
Post by: MFRAN on February 12, 2019, 07:29:26 PM
Thank you for sharing the design! :-)
I noticed also that the SDRAM QSYS project did not provide a clock for the SDRAM. I found this design and am now wondering why the PLL is not designed in the QSYS/Platform Designer project?
And why 48MHz and not 166MHz?

Bear with me as I am new to Intel FPGAs and Quartus Prime. I ordered the CYC1000 and am still waiting to receive it and dabble with the projects while waiting.
However, I found the Intel online lectures to go over the IP and design very little detail on other than the tool.
For this reason, I am also wondering why both data and instruction master is routed into PIO in the original design. Any idea why instruction master need to be there? (I found it not to be so from the github design though)
Title: Re: SDRAM Interface
Post by: tcmichals on July 30, 2019, 12:18:10 AM
Why isn't the speed faster?  The I/O is cabled of 200Mhz.
Title: Re: SDRAM Interface
Post by: Thomas D on August 05, 2019, 04:18:40 PM
the maximum clock frequency for the sdram chip is 166Mhz. In the documentation of the sdram controller ip ( ( Intel says: "The clock for the SDRAM chip (SDRAM clock) must be driven at the same frequency as the clock for the Avalon® -MM interface on the SDRAM controller (controller clock)." So the maximum frequency you can choose for the sdram chip and the sdram controller is 166Mhz.

A reference design for cyc1000 with pll and sdram controller designed in platform designer is also available at ( In this example the frequency for the sdram chip and the sdram controller is 50Mhz. You also can change the frequency, but which frequency you choose is depending on your design.

Thomas Dück