# Thread: Designing a memory system

1. ## Designing a memory system

I am new to the hardware realm and am having difficulty with some work i've been assigned from a text book. Any help would be greatly appreciated.

Question:
--------------------------------------
Given a supply of 4 bit wide DRAM chips containing 2^29 locations, you are asked to design a memory system for a machine with 8 DIMM slots where each DIMM slot provides word (32bit) wide data transfers and has a capacity of 2GB. How many chips are required per DIMM?

Given a 32 bit address: <A31 A30 … A2 A1 A0>, which bits will be used to:
a) select a location on a given chip,
b) select between chips on a DIMM and
c) select between DIMM slots.

Real-world memory systems commonly allow you to choose between different sized DIMMs (e.g. you can plug in either 1GB or 2GB DIMM sticks). How does this affect the address bits used in selecting chips, DIMMs, etc.? How do you think this is done?
----------------------------------------------------

I'm not worried about the rest of the question yet, i'm still stuck on the first part (opening paragraph), "How many chips are required per DIMM?".

I'm not looking for handouts, just something to get me started or point me in the right direction. Thanks in advance!

2. 2GB/8 (the number of slots) is the memory (in bytes) for each DIMM.
Then divide that by 2^29 for the number of chips to span the address range.
Since each chip is only 4 bits, you need 2 for a byte.

3. I'm a bit confused,

2 GB = 2, 147, 483, 648 bytes

2, 147, 483, 648 bytes / 8 DIMM Slots = 268, 435, 456 bytes/Dimm slot

268, 435, 456 bytes / 2^29 locations = 0.5 bytes/location

0.5 bytes = 4 bits

So only 1 chip per DIMM slot? (is that right?)

Aside: These are some variables I gathered from the book

*need main memoery word width of W bits made out of chips of width w
-main memory word width W = 32 bits?
-chip width w = 4 bits?

*if address space is M and memory chip has N locations
-locations N is....?

*You will need M/N rows of W/w chips where M >= N and W >= w (where N is a multiple of M and w is a multiple of W)

I tried working with that somewhat, but get lost and am not 100% sure about the numbers i'm using.

p.s. Thanks for the help so far!

4. How about approaching it from the other end.
How much is 2^29 and how many of them do you need to get to 2^31

5. 2^31 / 2^29 = 4?

so I need 4 chips per DIMM slot?

6. Another thought.
2^31 bytes = 2^29 dwords

7. I'm kind of lost at this point....further re-reads of the text book hasn't helped and i'm not sure what your trying to indicate to me at this point. Sorry...

8. Two DRAM chips in parallel would be 2^29 bytes (8 bits wide)
Four in parallel would be 2^30 bytes (16 bits wide)
Eight in parallel....

9. -main memory word width W = 32 bits?
-chip width w = 4 bits?
Yup. So W/w = 8. You'll need 8 chips in parallel.

-locations N is....?
address space M was given--2 GB.
locations N was also given--2^29 bits.

So M/N = 4; you will need 4 rows of chips.

I'm probably missing something here... But what I don't understand is how you can select a, b, and c with just 32 bits. You'll need 29 bits to select the location, 5 bits to select the chip on a DIMM, and 3 bits to select a DIMM. Which equals... 37 bits.

10. hold on a sec, you mean 32 rows, isn't 2GB => 2^34 bits. Than 2^34 / 2^29 = 32, so it's 32 rows of 8 chips.....Than is that the total amount of chips I need, 32 * 8...or what's the next step?

11. 2GB = 2^31 bytes.

--
Mats

12. oh ok, so since the number of rows are 4, 4 rows of 8 chips....that means the total number of chips per DIMM slot is 32?