# Memory Questions

• 10-04-2008
John_L
Memory Questions
Sorry to re-post, but the last thread didn't really help much. Mainly because things weren't explained to me and my goal is to understand. At this point I am looking for the answers, but also anything and everything leading up to the answers. I have done a lot of work, read a lot of material and still can't get it right.

Questions:
--------------------------------------
1)
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?

2)
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.

3)
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?

Notes:
----------
*need main memory word width of W bits made out of chips of width w
-main memory word width W = 32 bits
-chip width w = 4 bits
-need 32/4 = 8 chips in parallel to form a word

*if address space is M and memory chip has N locations
-locations N is 2^29
-need M/2^29 = ? rows

*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)

Issues:
---------
-What notation is N = 2^29 in? bits, bytes etc..?
-How do I find M, is it 2GB? If so, what units do I use to represent it, bits, bytes etc...? M is supposed to represent the address space, isn't 2GB the the main memory size
-So the overall amount of chips needed per DIMM is rows*columns?
• 10-04-2008
Salem
> Given a supply of 4 bit wide DRAM chips containing 2^29 locations
Meaning if you had two of them side by side, you'd have 2^29 bytes

Then work out how many you need to get to 2GB

Then work out how to arrange them so they're on a 32-bit bus (that's easy, it's just 32 bits (the width of the bus) divided by the width of the chip (in this case, 4))

Now post some effort showing what you think you know, rather than just your assignment and how you "don't get it".
• 10-04-2008
John_L
I don't have an "assignment", prof, or class. I'm working out of a text book trying to grasp hardware issues, especially memory. Which is probably why i'm not doing so well.

I could scan you the pages of work i've completed, but that would probably just be a waste of time.

Can't move on from Q1 until it's complete given the nature of Q2 and Q3. Everything I posted under "Notes" I gathered and calculated to solve the question. Which is "my effort, and what I know". The only thing missing is the variable M within that calculation. If your not interested in helping me, than don't. I'm trying very hard to grasp the material and work through the problems but I have no hardware background what so ever.

As far as how many chips per dimm, I was told in a previous post that it was 4 rows of 8 chips, but I can't confirm that with the work i've done. I'm interested the process, not just the answers, I want to understand. Because this is all for my benefit, there's no one handing me a grade at the end of the day!
• 10-04-2008
tabstop
I would expect (and I guess Salem read it that way too) that 2^29 positions refers neither to bits nor bytes, but to the actual width of the chip (4 bits). It's your book, you should know.

So the width is right -- to fill 32 bits, you'll need eight four-bit chips. To figure out how many rows you need, you need to figure out how many bytes of memory each row of eight four-bit chips holds, and then divide that into the 2GB that's supposed to be on the DIMM. (Or as alluded to earlier, you can say "one row is one dword of memory" and convert 2GB into dwords to be divided by 2^29 (positions on the chip).) Or you can figure out how many total chips you need to get to 2GB, and figure out a rectangle that has that many chips in it.

Your stated goal of wanting to understand and your desire to plug numbers into a formula are incompatible.
• 10-05-2008
John_L
Thank you, the way you put it made a lot of sense. Since each row represents 4 bytes you'd need a rectangle of 4 (across) by 2^29 (down) to make 2GB. I think the only reason I was struggling was because when I was making a diagram to represent it visually, I wasn't thinking logically about the rows of chips. So overall, only 1 row of 8 parallel chips would be needed because of the 2^29 locations?

Also, for the 2nd question and the 32 bit address, I keep getting more than 32 bits because of the 2^29 locations issue. So how many bits am I supposed to use to select a location?
• 10-05-2008
tabstop
Well, that gets a little tricky since 8*2GB = 16GB = 2^34, so you can't address all of 16GB in a 32-bit address space. You should probably assume a 4GB machine for that part.
• 10-05-2008
John_L
right, because 2^32 = 4 GB (which is why i was racking my brain). For all 16GB you'd need a 34 bit address than right? So assuming a 4GB system, than i'd reduce the number of DIMM Slots to 2, than only worry about selecting locations on chips, chips on rows, and between the two dimms?
• 10-05-2008
tabstop
That's what I'd do.
• 10-06-2008
John_L
I think i'll take the other approach, extend the address to 34 bits. So when looking at the locations per chip, 8 chips in parallel, and 8 dimm slots total. This 34 bit address needs to be able to access 29 locations per chip, 8 chips in total per dimm, and 8 dimms overall. Does that mean 29 of the address bits need to be dedicated to accessing locations on a chip? while the other 4 choose between the 8 chips per slot, and dimms?
• 10-06-2008
tabstop
You wouldn't have to completely choose between the eight chips per slot; for one thing, a byte is split over two chips, and for another you often want to fill the whole 32-bit bus anyway so you just take the whole row. (And now that I think about it, if you go a dword at a time, those 16GB is equivalent to 2^32 dwords.......)
• 10-07-2008
John_L
Ya, that makes sense. So with 1 row of 8 parallel chips per DIMM, 29 bits would be used to access locations, 0 for chips, and 3 bits for dimm slots. The only thing that confuses me is if for example if you were to plug in a 1GB dimm stick to each slot. What happens to the bits you use from the 32 bit address? Because wouldn't you only need half the chips in the row than, so you'd need an extra bit for targeting chips?
• 10-07-2008
tabstop
If you have a 1GB DIMM, you couldn't have 2^29 rows to choose from, since one row of eight 2^29 chips gives you 2GB. Either you'd have one row of 2^28 chips, or selecting a "row" would actually give you two rows from the four chips in order. (I guess, it's not as though I know.)