I have a DDR memory Winbond w9425g6kh (
https://www.winbond.com/resource-files/w9425g6kh_a02.pdf) connected to a Lattice MachXO3 (
http://www.latticesemi.com/~/media/LatticeSemi/Documents/DataSheets/MachXO23/DS1047-MachXO3-Family-Data-Sheet.pdf?document_id=50121).
Unfortunately, this chip has no hardware DDR support (there is some gDDR but it's not bi-directionnal). I had to implement my whole DDR design for command and data.
It synthesizes and there is no timing error up to 130MHz. Above 96MHz, I start to see some noise on the real hardware. Here is an example of a written/read pattern to DDR from the FPGA with some noise at 108MHz (at 96MHz, it's perfect):
01 23 45 67 89 AB CD EF 01 23 45 67 89 AB CD EF
01 23 45 *65* 89 AB CD EF 01 23 45 67 89 AB CD EF
01 23 45 67 89 AB CD EF 01 23 45 67 89 AB CD EF
01 23 45 67 89 AB CD EF 01 23 *C5* 67 89 AB CD EF
01 23 45 67 89 AB CD EF 01 23 45 67 89 AB CD EF
Obviously, the more I increase the frequency, the more I see errors. Depending of the frequency and the implementation, the noise can be anywhere. In other words, it doesn't seem to be related to a specific pin.
Any idea of how I could fix my problem? Here are a few remarks:
- there is no timing error reported by the "Place & Route Design" engine of Lattice Diamond up to 130MHz.
- There is no error in the simulation. Up to 96MHz, everything is perfect on real hardware.
- I have the following pin settings:
IOBUF PORT "ddr_Clk" IO_TYPE=LVCMOS25D PULLMODE=NONE SLEWRATE=FAST ;
IOBUF PORT "ddr_Dq[0]" IO_TYPE=LVCMOS25 PULLMODE=NONE SLEWRATE=FAST ;
IOBUF PORT "ddr_Dq[15]" IO_TYPE=LVCMOS25 PULLMODE=NONE SLEWRATE=FAST ;
IOBUF PORT "ddr_Dqs[0]" IO_TYPE=LVCMOS25 PULLMODE=NONE SLEWRATE=FAST ;
IOBUF PORT "ddr_Dqs[1]" IO_TYPE=LVCMOS25 PULLMODE=NONE SLEWRATE=FAST ;
- There is a 2V5 voltage divider (resulting in 1.25V) on VREF of the DDR chip.
- The routing between MachXO3 and DDR is "pretty" clean and homogeneous. Chips are on different side of PCB just back to back. There is the same via type for all the traces. The maximum difference of traces length is <250mil. I calculated that at 125MHz, it's a maximum 2.5% deviation. I don't think that I'm running at a speed high enough to see some hardware-related problem.
I'm looking for generic advice what to look for and change. I'm expecting:
- any idea of pin configuration (
http://www.latticesemi.com/-/media/LatticeSemi/Documents/ApplicationNotes/MO/MachXO3sysIOUsageGuide.ashx?document_id=50125). Slewrate seems to help but not opendrain.
- any advice how to isolate the problem
- any recommendation of more timing constraint