Cache
November 12, 2023Cache
November 12, 2023Cache
Question 1 |
The size of the tag field is ______ bits.
17 |
Given that the main memory is 2^32 bytes. So the physical address is 32 bits long.
Since it is a direct mapped cache the physical address is divided into fields as (TAG, LINE, OFFSET).
Cache size is 32KB = 2^15 Bytes.
Block size is 64 bytes = 2^6 bytes, so OFFSET needs 6 bits.
Number of blocks in the cache = 2^15//2^6 = 2^9, So LINE number needs 9 bits.
TAG bits = 32 – 9 – 6 = 17 bits.
Given that the main memory is 2^32 bytes. So the physical address is 32 bits long.
Since it is a direct mapped cache the physical address is divided into fields as (TAG, LINE, OFFSET).
Cache size is 32KB = 2^15 Bytes.
Block size is 64 bytes = 2^6 bytes, so OFFSET needs 6 bits.
Number of blocks in the cache = 2^15//2^6 = 2^9, So LINE number needs 9 bits.
TAG bits = 32 – 9 – 6 = 17 bits.