Electronic – DRAM – is data pins order important when routing on PCB

datapcbpinsramsdram

Quick question: I have SDRAM (SDR) and trying to connect it to uC.

Can I route data bits from SDRAM to uC in any order? So they aren't connected respectively (d0->d0, d1->d2 … d15->d15) but in any order (like d0->d5, d1->d13 etc)?

If I understand correctly it shouldn't matter – if I write in that order and read in the same it should be ok. Am I right?

(I know that it doesn't apply to address bus because of burst-read, columns/rows etc).

Best Answer

Make sure you keep the association with the byte enables correct. There should be no issue with switching around data lines within each byte or mixing up the bytes, so long as you keep track of the byte enables. However, it would be a good idea to check the datasheet to make sure there aren't any odd requirements with respect to bursts or accessing internal control registers. Also, you might be able to switch around some address lines, but you should keep the low order address lines un-swapped so that sequential accesses don't incur timing penalties. Also, make sure you don't switch around address lines that correspond to configuration commands, or at least keep track of what got swapped so you can send the right command to the chip.