Hey guys, so I have a question about actually calculating the size of the three fields and what cache block a hex number addresses. We're working with fully associative, direct mapped, and 2-way. It all went pretty fast and over my head but I don't think anything is too complicated, just a lot of work with exponents. Oh, there's also something about a valid bit? I think it's to determine if that's the memory block you want or not. So here's an example I pulled out from class,

Suppose a computer using direct mapped cache has 2^20
words of main memory and a cache
of 32 blocks, where each cache block contains 16 words.

a) How many blocks of main memory are there?

b) What are the sizes of the tag, block, and word fields?

c) To which cache block will the memory address 0DB6316 map?

Is a) 20? I'm sorry, I understand the basics of what cache memory does and the differences between the three, I just don't quite get the calculations.

8 Years
Discussion Span
Last Post by seanl1

Nevermind, I found a really great powerpoint online that explained the process. I would still like to know the answer to A if anyone could help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.