block size = 32B
cache size = 128KB
number of cache lines = cache size/ block size
= 128kb/32b= 4096
number of cache sets = number of cache lines/p-way
s = 4096/2 = 2048
tag s block size
tag s block size
b31b30 b29 b28 b27 b26 b25 b24 b23
b22 b21 b20 b19 b18 b17 b16
|
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6b5 |
b4 b3 b2 b1 b0 |
A method of addressing a cache directory, comprising:
computing a parity of an address tag field within a presented address;
computing an index including:
the computed parity within a bit of the index; and
an index field within the presented address within remaining bits of the index.
The index field of an address maps to low order cache directory address lines. The remaining cache directory address line, the highest order line, is indexed by the parity of the address tag for the cache entry to be stored to or retrieved from the corresponding cache directory entry. Thus, even parity address tags are stored in cache directory locations with zero in the most significant index/address bit, while odd parity address tags are stored in cache directory locations with one in the most significant index/address bit. The opposite arrangement (msb 1=even parity; msb 0=odd parity) may also be employed, as may configurations in which parity supplies the least significant bit rather than the most significant bit.
now in the set (s) field msb is used as a parity bit the remaining set field bits are used for indexing...along with parity bit
so clearly b15 b14 b13 b12 b11 b10 b9 b8 b7 b6b5 are used for indexing