Memory Questions

This is a discussion on Memory Questions within the Tech Board forums, part of the Community Boards category; Sorry to re-post, but the last thread didn't really help much. Mainly because things weren't explained to me and my ...

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    119

    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
    -address space M is...?
    -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?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    > 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".
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    119
    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!

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    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.

  5. #5
    Registered User
    Join Date
    Sep 2007
    Posts
    119
    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?

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    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.

  7. #7
    Registered User
    Join Date
    Sep 2007
    Posts
    119
    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?

  8. #8
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    That's what I'd do.

  9. #9
    Registered User
    Join Date
    Sep 2007
    Posts
    119
    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. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    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.......)

  11. #11
    Registered User
    Join Date
    Sep 2007
    Posts
    119
    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?
    Last edited by John_L; 10-07-2008 at 06:19 PM.

  12. #12
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    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.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-06-2009, 11:27 AM
  2. Random memory questions
    By Blackroot in forum Windows Programming
    Replies: 3
    Last Post: 04-04-2007, 09:33 PM
  3. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 08:32 AM
  4. Accessing Video Memory Information...need help
    By KneeLess in forum C++ Programming
    Replies: 8
    Last Post: 08-24-2003, 03:53 PM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21