This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DDR3 Controller Read Question



Hi,

I'm trying to understand how data moves from a 64-pin DSP DDR data bus to 4, 16-bits DDR SDRAMs.

According to the DDR3 Memory Controller datasheet, "the default burst size is 8, the DDR3 memory controller returns 8 words of data for every read command. Word size is nothing but the DDR3 interface bus width." 

This makes sense since the DSP ddr data pins [15:0] interfacing with a [15:0] SDRAM will require a total of 8 burst to achieve a single read/write into the SDRAM core (8n prefetch architecture). Or in other words as the datasheet explains, the DDR3 memory controller returns 8 words of data for every read command..

However, the 64 DSP DDR data pins are split into four ranges [15:0], [31:16], 47:32], [63:48] to each [15:0] SDRAM (total of 4 SDRAMs).

1) So, when a read command occurs, and say for example, I'd like to read a Uint64, then the SDRAMs return 8 words of data per [15:0], [31:16], [47:32], [63:48]? This is assuming that the Uint64 data is stored and split in 16-bits into each of the 4 SDRAM. So, we would be getting extra data, but those data extra would be masked. 

I couldn't find much information about this. I'm using the CC6678 DSP

I look forward to your response,

Best

Alvaro 

  • Hi Alvaro,

    I've forwarded this to the design experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Hi Alvaro,

    This has more to do with how DDR3 SDRAMs operate then how the controller operates. Reading from memory requires the controller to issue commands defining the bank, row and column addresses. All data reads for DDR3 with a 64bit bus are 64bits wide and all read commands issued by the C6678 controller will result in a burst read of eight 64bit words. The controller will then extract the data needed to by the original read command and provide it to the processor. As you can see, reading an 8bit byte from memory results in the same number of memory accesses as reading a 64bit word.

    Regards,

    Bill

  • Hi Bill,

    Thanks.

    Does this mean that the DDR3 memory controller is smart enough to not request a new read command if it already has the needed data from a previous read command? Also, do you know of a doc that you could recommend I take a look?
  • Hi Alvaro,
    The controller is not that smart. If you have a series or reads in your software, the controller will initiate a burst of eight for each read. If you need a block of data from the DDR, the most efficient method is to DMA that block of memory. The controller will use a burst to read the consecutive memory locations.
    There are a number of good application notes on DDR3. Here is a link to a basic paper from Micron.
    www.micron.com/.../e1503e10.pdf
    Regards,
    Bill
  • Hi Bill,

    Thanks again.

    One more question. I can't seem to find info about it.

    1) If I write a 32-bit word into a memory address that is 8 byte aligned, then the 32-bits would be right aligned to the external data bus from [0:31]?

    2) If I write a 32-bit word into a memory that is 4 byte aligned, then the 32-bits would be aligned to the external data bus from [32:63]?

    Best,
    Alvaro
  • Hi Alvaro,

    That would depend on the address. I am not sure what you mean by 8 byte aligned. Normally the controller handles which portion of the data bus is used.

    Regards,

    Bill

  • Hi Bill,

    Here is a different way of explaining what I'm confused with.

    When all the address and control bus are daisy chained (ex: 4 DDR SDRAMs + chip select for all are always active) then a read/write or activate command will trigger accesses in all DDR SDRAMS chips simultaneously.

    With this in mind, if I write a 64-bit data word, would the DDR controller use all 64 data I/O pins or decide which portion of the pins to use?

    (8-byte aligned are addresses like 0x80000000, 0x80000008, 0x80000010, etc. )

    Best.
    Alvaro
  • Hi Bill,

    Thanks for your help, and your time.

    Best,
    Alvaro
  • Hi Alvaro,
    Accesses always use all 64bits. If it's a read, eight 64bit words are burst into the device and the data requested is extracted. If it is a write, the mask bits are used to determine which bytes are written to the memory during the burst.
    Regards,
    Bill