1,258 views
1 votes
1 votes
Consider a 16-way set associative cache which holds 64 KB of data. The size of physical address is of 40 bits. A cache block consist of 4 words. Every data word is of 32 bits. Assuming that all cache entries are initially empty and data words are word-addressable. Find the size of Tag , Set and Offset field in bits?

1 Answer

0 votes
0 votes
Since there are 4 words in each block and it is word addressable, 2 bits will be required to locate words.

Each word is 32 bits, so each block will contain 32 x 4 = 128 bits. Total no of blocks = 64kb / 128 b = 512. To represent it, we need log 512 = 9 bits.

The remaining are tag bits = 29 bits.

For a 2 way set associative, subtract 1 bit from block and add to tag. So (30, 8, 2)

For a 4 way, (31,7,2)

For a 16 way, (33,5,2)

Related questions

0 votes
0 votes
1 answer
1
Mrityudoot asked Jun 5, 2023
640 views
In a 2 level hierarchy, the cache has an access time of 15 ns and the main memory has an access time of 110 ns, the hit rate of the cache is 90%. If the block size of the...
0 votes
0 votes
1 answer
3
0 votes
0 votes
0 answers
4
aditi19 asked Dec 5, 2018
320 views
https://gateoverflow.in/494/gate2008-71can someone explain how indexes of the array elements have been calculated?