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

Questions 1) Compute the total number of bits required to implement the cache gi

ID: 3716925 • Letter: Q

Question

Questions 1) Compute the total number of bits required to implement the cache given below. This number is different from the size of the cache, which usually refers to the number of bytes of data stored in the cache. The number of bits needed to implement the cache represents the total amount of memory needed for storing all of the data, tags, and valid bits Address (showing bit positions) 31 14 136521 0 4 Byte offset 18 Data Hit Tag Index Block offset 18 bits 512 bits V Tag Data 256 entries 18 32 32 32 Mux 32

Explanation / Answer

Bits required to implement the above cache is:

The offset bits(0,1), hence 2 bits => block size is 4 Bytes

Above one is a n-way set associate as the multiplexer selects one of the n blocks in the set.

The block offset bits are (5,4,3,2), hence 4 bits. Therefore number of blocks in the set are: 2^4(16)

Therefore its a 16-way set associative cache

There are 256 entries, hence Number of sets = 2^8(256) , therefore index bits are 8

Tag Size = address size - index size -offset = 32 - 8 - 2 = 22 bits

Bits/ Block = data bits + tag bits + valid bits = 32 + 22 + 1 = 55 bits

Therefore Bits required to implement total cache = Total number of blocks * bits/block

Total number of blocks = Total number of set * Total number of blocks/set = 256*16

bits required to implement total cache = 256 * 16 * 55 = 220 Kbits

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote