Solved

Posted on 2008-11-12

Hello,

I've often wondered why it is that DIMMs of RAM invariably have an amount of memory which is a power of two. Why? What aspect of modern computer architectures necessitates this?

Thanks,

Sternocera

I've often wondered why it is that DIMMs of RAM invariably have an amount of memory which is a power of two. Why? What aspect of modern computer architectures necessitates this?

Thanks,

Sternocera

8 Comments

Chipsets should be able to handle several banks with different sizes (no matter if they are on the different DIMMs or the same ones).

2) Size of 1 bank is still power of 2. That is to make easier memory address translation without complex computations. If chipset needs to fetch byte from memory from arbitrary memory location, it should determine memory bank, and address in the bank. If size of bank is power of 2 it is possible to implement that using only bit-shift operations, which are very fast and simple.

If bank size is not a power of 2, we would need to add summators/comparators, which are FAR slower and takes more transistors to implement.

(think of it as a square)

if you have 4 elements of ram, you situation is : 4 elements = 2²

n n <--row 0

n n <--row 1

^ ^

| |

column 0 1

more info : http://en.wikipedia.org/wi

if you want more, just ask !

The question is why number of rows & columns is power of 2 :-)

That is for efficient memory controller implementation. It is possible to create custom memory controller which could handle non-power-of-2 rows/columns but this would significantly impact performance&cost.

How? A bitshift is only useful for doubling or halving a binary number, or finding powers of two; If we're looking for, say, a 32-bit integer that is fifth in an array of integers, for example, I can see no reason everything being a power of two helps us.

"the why is answered in the adressing; the same bus carries the row and column signals, so it is much easier to keep them the same number."

I am familiar with memory addresses; I am a C++ programmer. I have a fairly high level understanding of computer architecture; Could you clarify what you meant here? On most architectures, memory addressed are 32-bits, typically represented as hexadecimal, in the form 0x00000000 - 0xFFFFFFFF. What part of that number is the row, and what part is the column? I have an understanding of virtual address spaces versus physical address spaces, address resolution, the translation lookaside buffer and so on.

I'm probably missing something obvious here.

Regards,

Sternocera

Second step - get bank number (i.e. which DIMM or which part of it have this phisical address), and what row/column at dram to read - that is being done by memory controller (in chipset, or inside processor in AMD Athlon(754, 939 and 940 sockets) & Intel i7).

For example, 512Mb DIMM module usually have:

4 banks, 8192 rows of 16384 bits.

So if you want to know what is byte position of the requested byte, chipset would do the following simplified (pseudocode):

bank number = address/128mb

address%=128mb

row=address/16384

column=address%16384

As you see all these operations could be done without divisions and modulo using bit operations.

(Simplification is that you read 64 bit at once or even 128 bit)

Why there are rows & columns, not just address index (i.e. if we want 512Mx8bit chip with linear addressing)? Because that would require to have multiplexer with 512M contacts in hardware which would consume about 512M*log2(512M) transistors. Also it is slow.

If we go with rows & columns we need just 2 demultiplexors(with 8192 & 16384/8 contacts), one with 8192*log2(8192) transistors, second with 16384*log2(16384/8) transistors which require much less space & works much faster.

16384 is divided by 8 because each chip output 8 bits, not just any particual bit.

So with 2 bit bank, 13 bit row and 11 bit column you select 8 bit memory register. Total address width is 2+13+11 = 26, 2^26 = 64M 64-bit words which is 512Mb .

Title | # Comments | Views | Activity |
---|---|---|---|

Lenovo Drivers won't take | 3 | 49 | |

Inspiron 3521 Touchscreen LCD - colors inverted | 15 | 57 | |

Expanding drive bay in HP DL380p Gen8 server | 2 | 49 | |

SLI adding 16ms latency? | 6 | 78 |

Join the community of 500,000 technology professionals and ask your questions.

Connect with top rated Experts

**17** Experts available now in Live!