Data:
Memory size = 232 bytes
Total address space = 32 bit
Block size = 32 bytes = 25 byte
Cache lines = 512 = 29
Formula:
Tag
|
No. of line
|
Block offset
|
(x bits)
|
(9 bits)
|
(5 bit)
|
In bits:
Total address space = tag + no. of lines + block offset
For direct mapped cache:
Calculation:
32 = x + 9 + 5
∴ x = 18
The size of tag field in bits = 18