retagged by
602 views
1 votes
1 votes
A system is having $4$ way set associative cache of $256$ KB. The cache line size is $8$ words and each word has $32$ bits. Suppose memory addresses are $64$ bits long. Then number of bits required for the index field of the cache memory is _______
retagged by

2 Answers

Best answer
1 votes
1 votes

Cache size is 256 KB .

4 way set associative cache means number of blocks per set is 4 .

Cache line size is 8 words( means each block size is 8 words ) and each word has 32 bits = 4 Bytes ,  

so total Block size is 8 * 4 = 32 Bytes 

32 = 2so 5 bits require for block offset .

There are 4 blocks /set and each block size is 32 Bytes .

It is 4 way set associative cache , so number of sets are ( 256 KB/ 4 * 32 B )

= (28 * 210 / 22 * 25 ) =218/27

= 211

Hence 11 bits require to represent the index field .

selected by
0 votes
0 votes
if index offset is set offset in set associativity then answer is 11 bits.
edited by
Answer:

Related questions