• edited by
3,097 views
7 7 votes
Consider a physically tagged, word addressable, 16-way set associative cache with the line size of 128 Bytes. What is the size of cache if tag memory size is 2Kbits. Further assume that physical address space is 24 bits and word size is 4 Bytes.

a. 1 KB

b. 2 KB

c. 3 KB

d. 4 KB

1 Answer

Best answer
4 4 votes
  • 16 - way set Associative 
  • Line size = 128B 
  • Size of tag memory = 2Kbits
  • Physical Address space = 24 bits
  • Word size = 4B

Words in a line = $\large \frac{Line \ size}{ Word \ size} = \frac{128 B}{4 B} = 32 \ words$

Bits needed for indentifying a word from a line = 5 bits

Let number of bits for set = s

Then tag bits = 24 - 5 - s = 19 -s

 

Number of blocks = Number of sets $\times$ number of blocks per set = $2^s \times 16$

Tag memory size = Tag bits  $\times$ Number of blocks

$\Large 2^{11} = \left ( 19-s \right ) \times 2^s \times 16$

$\Large \frac{2^7}{2^s} = 19 - s$

$\Large 2^{7 -s} = 19 - s$

$\large s = 3$

Tag bits = 19 - 3 = 16

Number of blocks = $\frac{Tag \ Memory \ Size}{ Tag \ Size}$ = $\frac{2^{11}}{2^4} = 2^7$

Size of cache = Number of blocks $ \times $ Block size   $= 2^7 \times 2^7   = 2^{14} = 16 KB$

 

• edited by
Position:
Show:

Related questions

0 0 votes
1 1 answer
1.4k
1.4k views
Amar Khade asked Dec 27, 2018
1,361 views
The cache can hold 64 KB .data is transferred between main memory and cache in blocks of 4 bytes each.the main memory consist of 16 M Bytes . if the cache memory is 16-wa...
1 1 vote
0 0 answers
182
182 views
0 0 votes
1 1 answer
1.1k
1.1k views
Tulsidhar M asked Nov 30, 2018
1,081 views
What is the correct formula for tag directory size in associative mapped cache concept.?