Home » Computer Organization and Architecture » Computer organization and architecture miscellaneous » Question

Computer organization and architecture miscellaneous

Computer Organization and Architecture

  1. A cache memory unit with capacity of N words and block size of B words is to be designed. If it is designed as a direct mapped cache, the length of the TAG field is 10 bits. If the cache unit is now designed as a 16-way set-associative cache, the length of the TAG field is______ bits.
    1. 5
    2. 28
    3. 14
    4. 7
Correct Option: C

In Direct Mapped :

No. of line in direct mapped cache =
N
bits
B

For No. of line = log
N
B

In Set Associative :

TAG1 + log
N
+ log(B) = TAG2 + log
N
+ log(B)
B16 B

By cancelling the same terms
As given that
TAG1 = 10 bits for Direct Mapping.
TAG2 let say X bits.
Then , 10 + log
N
= X + log
N
B16 B

By taking exponentation both side w.r.t 2.

(2^10)*
N
= (2^X)*
N
B16 B

(2^10) = (2^X)
1
16

(2^10) = (2^X)
1
2^4

(2^14) = (2^X)
X = 14

So, the required length of TAG field in Set Associative mapped is = 14.



Your comments will be displayed only after manual approval.