Search code examples
memoryfpgacalibrationspartan

How can I investigate failing calibration on Spartan 6 MIG DDR


I’m having problems with a Spartan 6 (XC6SLX16-2CSG225I) and DDR (IS43R86400D) memory interface on some custom hardware. I've tried on a SP601 dev board and all works as expected.

Using the example project, when I enable soft_calibration, it never completes and calib_done stays low.

If I disable calibration I can write to the memory perfectly as far as I can see. But when I try to read from it, I get a variable number of successful read commands before the Xilinx memory controller stops implementing the commands. Once this happens, the command fifo fills up and stays full. The number of successful commands varies from 8 to 300.

I'm fairly convinced it's a timing issue, probably related to DQS centering. But because I can't get calibration to complete when enabled, I don't have continuous DQS Tuning. So I'm assuming it works with calibration disabled until the timing drifts.

Is there any obvious places I should be looking for why calibration fails?

I know this isn't a typical stack overflow question, so if it's an inappropriate place then I'll withdraw.

Thanks


Solution

  • Unfortunately, the calibration process just tries to write and read content successively while adjusting taps internally. It finds one end of success then goes the other direction and identifies that successful tap and then final settles on some where in the middle.

    This is probably more HW centric as well, so I post what I think and let someone else move the thread.

    1. Is it just this board? Or is it all of them that are doing it? Have you checked? If it's one board, and the RAM is BGA style, it could be a bad solider job. Push you finger down slightly on the chip and see if you get different results... After this is gets more HW centric
    2. Does the FPGA image you are running on your custom board, have the ability to work on your devkit? A lot of times, that isn't practical I know, but I thought I would ask as it rules out that the image you are using on the devkit has FPGA constraints you aren't getting in your custom image.

    3. Check your length tolerances on the traces. There should have been a length constraint. Plus or minus 50 mils something like that. No one likes to hear they need a board re-spin, but if those are out, it explains a lot.

    4. Signal integrity. Did you get your termination resistors in there and are they the right values? Don't supposed you have an active probe?
    5. Did you get the right DDR memory. Sometimes they use a different speed grade and that can cause all sorts of issue.
    6. Slowing down the interface will usually help items 4 and 5. so if you are just trying to work done, you might ask for a new FPGA image with a slower clock.