411 views
1 votes
1 votes
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.

1 Answer

Best answer
3 votes
3 votes

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

1 votes
1 votes
0 answers
1
LRU asked Jan 14, 2022
365 views
Consider a memory system that uses a 32-bit address to address at the byte level, plus a cache that uses a 64-byte line size. Assume a four-way set-associative cache with...
1 votes
1 votes
1 answer
2
LRU asked Dec 4, 2021
380 views
The cache takes 2 cycles to access and has a 5% miss rate, main memory takes 100 cycles to access and has an 8% miss rate, and the disk takes 10,000 cycles to access. The...
2 votes
2 votes
2 answers
4
LRU asked Nov 5, 2021
530 views
Consider the following memories with their miss rates and hit times Then the average memory access time is ______ (in ns)