214 views

1 Answer

Best answer
2 votes
2 votes

that is correct, tag bits will remain unchanged but number of cache line will vary. 
For example,
PA = 14 bits, block size = 32 Bytes, Cache Size = 256 Bytes
Suppose, Direct mapping cache:
|tag bits| line Offset| Block Offset|
number of cache lines = $\frac{256B}{32B} = 8$ 
| 6 | 3 | 5 | = |tag bits| line Offset| Block Offset|

Memory to store tag information = no. of cache lines * tag bits per cache line
= 8*6 = 48 bits

Now, imagine block size is 64 Bytes.
no. of cache lines = $\frac{256B}{64B} = 4$
|6|2|6|, notice that tag bits are still same as earlier, But
Memory to store tag information = no. of cache lines * tag bits per cache line
= 4*6 = 24 bits
 

"Therefore, larger the cache block, lower the number of Tags"

No related questions found