Wednesday 18 December 2013

DDR memory interfacing - Part 1

DDR memory short form for Dual Data Rate memory is a type of RAM. As we know, RAM is a volatile memory. There are several types of random access memories like SRAM, DRAM, SDRAM. DDR comes under SDRAM category. The main difference between other types of RAM and DDR is that data is transmitted on rising and falling edge of clock and hence it's name. There are several types of DDR namely DDR, DDR2, DDR3, LPDDR2, LPDDR3, DDR3L, DDR3U. We shall go into details of each types of memory later. We shall have a look into the differences also in later parts. For now, let us discuss some of the terminologies used in DDR and techniques used in DDR interfacing which helps to achieve throughput, bandwidth, power consumption, etc.


Memory interleaving:

DRAM is arranged as banks internally and each bank is selectable using a BANK ADDRESS signal. Each bank in turn is accessed as rows and columns. Option is that memory address can be assigned bank after another which is the normal way of doing. While accessing a memory bank, it takes time to respond and this effects the throughput of DDR. One way of increasing throughput is to assign addresses to banks in an alternate manner. This is nothing but addressing memory in a interleaved manner. For example, for a byte addressable memory, 0-7 address will be assigned to first bank, 8-15 to second bank and so on. This helps to increase throughput of RAM. But one question arises for a designer and he wants to where he should use this type of interleaving. Interleaving is used when there is a slow DRAM interfaced to core.

Channel count:

We generally see datasheets of processors mentioning support for single channel, dual channel. This means that it can support up to two independent DRAM parts. For example let us assume that a processor supports 64-bit DDR memory. In this case, dual channel means a 64-bit DDR can be connected to one channel and another 64-bit DDR to another channel. Or as per design needs user can use only one channel and connect 4 16-bit or 2 32-bit devices to one channel. This again depends on support from processor and for this you have to refer processor datasheet. But one may raise a question, why should i use 4 16-bit devices instead of 1 64-bit device? As cost wise also, it doesn't help. The main reason is that my throughput is much higher in the case of 4 devices compared to 1 device. It is almost x4 times. So, it is always the case of trade-off between speed and cost. Make your choice!!!

No comments:

Post a Comment