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

Suppose a computer using a direct mapped cache has 2^32 word for main memory and

ID: 3641537 • Letter: S

Question

Suppose a computer using a direct mapped cache has 2^32 word for main memory and a cache of 1024 blocks, where each cache bock contains 32 words.

a. how many clocks of main memory are there?
b. What is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, block, and word fields?
c. To which cache block will the memory reference 000063FA_16 map?

the 16 at the end of question c is subscript i was not sure if the _ symbol was used for it or not.

Explanation / Answer

a) number of blocks in main memory : = size of main memory /size of each block = 2^32/32 = 2^32 /2^5 = 2 ^ 27 blocks. b) block size = 2^ 5 words, hence word field will require 5 bits. There are 2^10 blocks in cache so, 10 bits will be required for block field, Now For Tag calculation we need to know how many blocks from main memory will be mapped to one cache block. so number of blocks that will be mapped to cache block = number of blocks in main memory / number of blocks in cache = 2^27/2^10 = 2 ^ 17, So ,tag bit required is 17. ( keep in mind at any time only one of the block from main memory will be in one cache block.) So We get for direct mapping , < 17,10,5> C) subscript 16 means that we are using hexadecimal notation. so 000063FA in hex will be 0000 0000 0000 0000 0110 0011 1111 1010 ( spaces are put to distinguish between each hex number). so from last five digit we get 26 . Then from next 10 digit we get 799. So we have 799th block and 26th word.
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote