-
A 4-way set-associative cache memory unit with a capacity of 16 KB is built using a block size of 8 words. The word length is 32 bits. The size of the physical address space is 4 GB. The number of bits for the TAG field is _____.
-
- 20
- 4
- 21
- 10
Correct Option: A
Physical address size = 32 bit
Cache size = 16k bytes = 214 bytes
block size = 8 words = 8 × 4 byte = 32 byte
No. of blocks = | = 29 | |
25 |
block offset = 9 bits
No. of sets = | = | = 27 | ||
4 | 22 |
set offset = 7 bits
Byte offset = 8 × 4 bytes = 32 bytes = 25
⇒ 5 bits
TAG = 32 – (7 + 5) = 20 bits
