Altera_Forum
Honored Contributor
17 years agoProblem with DDR SDRAM controller (words swapped)
I'm using version 8.0 of the Altera DDR SDRAM controller to interface to a Micron MT46V16M16BG-6 SDRAM. The control signals between my local controller and the Altera DDR SDRAM block look fine when I examine them using signaltap, and match those in the datasheet, but the data I'm reading back is shifted relative to the input.
For example, I perform a 4x burst write by applying the following data to the local_wdata[31..0] port: 00000000h, 00010001h, 00020002h, 00030003h But the following data is returned on the local_rdata[31..0] port: 00000840h, 00010000h, 00020001h, 00030002h The SRAM chip has a 16 bit wide data interface so it appears that the data is offset by one clock somewhere. I've checked that the settings in the contraints tab matches the DQ/DQS pins I've used, but even if I change them it doesn't make any difference to the behaviour. I have checked the pin settings against the board, and checked the timing settings against those listed in the datasheet numerous times. I'm using my own PLL block but I've checked that the frequencies and phases match those of the example PLL generated by the Megacore. I've tried inverting clocks etc but nothing seems to work. Can anyone shed any more light on this problem?