Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please explain well how to do this question Suppose a computer has 216 words of

ID: 665464 • Letter: P

Question

Please explain well how to do this question

Suppose a computer has 216 words of main memory, and a cache of 64 blocks, where each cache block contains 32 words.

a) If this cache is fully associative, what is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag and word fields?

b) To which cache block will the memory reference F8C9 map?

c) If this cache is 2-way set associative, what is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag, set, and word fields?

Explanation / Answer

a)16 bit addresses with 11 bits in the tag field and 5 in the word field

b)Since it's associative cache, it can map anywhere

c)216 words of main memory implies we have 16 bits in an address. Cache contains 2^5blocks, but each set must have 2 blocks, so we have 2^5/2=2^4 sets. Therefore our 16-bitaddress is divided into 9 bits for the tag field, 4 bits for the set field, and 3 bits for theword field