25.7k views
2 votes
A 4-way set associative cache has 64 blocks of 16 words. How many bits are there in the ""tag"" field of the 15-bit address for this architecture

User Ngoa
by
7.5k points

1 Answer

3 votes

Answer:

3 bits

Step-by-step explanation:

Given a 4- way set associative cache that has 64 blocks of 16 words.

Therefore, the number of sets cache has:


(64)/(4) = 16

Now,

Cache data size is 16kB

The number of cache blocks can be calculated as:


16kB/16 = 1024 bytes/16 byte* 16 = 256 cache blocks

Now,

Total sets =
(cache blocks)/(associative sets)

Total sets =
(256)/(4) = 64

Now,


2^(n) = 64

n = 6

For 15 bit address for the architecture, the bits in tag field is given by:

15 - (6 + 6) = 3 bits

Thus the tag field will have 3 bits

User Amr Magdy
by
8.5k points