in CO and Architecture
125 views
1 vote
1 vote
A cache memory system 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 14 bits. If it is designed as a 4-way set associative cache, the length of the TAG field will be ………… bits.
in CO and Architecture
by
125 views

Subscribe to GO Classes for GATE CSE 2022

1 Answer

3 votes
3 votes
 
Best answer

For Direct Cache Mapping

TAG Bits =14 Cache Line offset = log(N/B) Word offset = log(B)

For 4 Way Set Associative Cache Mapping 

TAG Bits  Set Line offset= log(N/4B) Word Offset = log(B)

Suppose tag bits be x for 4 way set associative cache

Since the number of bits to represent physical address space will remain same, hence

14 + log(N/B) + log(B) = x + log(N/4B) + log(B)

On solving above we will get x = 16 bits

So, the length of the TAG field is 16 bits.

 

selected by

Related questions