Suppose we have a byte-addressable computer using 8-way set associative cache. T
ID: 3910910 • Letter: S
Question
Suppose we have a byte-addressable computer using 8-way set associative cache. There is up to 16 GB of main memory. There are 256 blocks of cache. Each block contains 128 bytes. Type in the following numeric answers in Decimal without any spaces or leading zeros. No manual re-grading will be done if you do not follow the instructions. 1. The size of the offset (a.k.a. word) field is 2. The size of the set field is 3. The size of the tag field is 4. the hexadecimal address 0x1BED6 maps to this cache set bits. bits. bitsExplanation / Answer
Since there are 128 bytes in a cache block, the OFFSET field must contain 7 bits (27 = 128).
Each set contains 8 cache blocks (8-way associative) so a set contains 8*128 bytes. There are 256*128 bytes in the entire cache, so there are 256/8 = 32 sets. Thus the set field contains 5 bits (25 = 32).
Size of physical address = 16GB = 16*(2^30) Bytes = 2^34 Bytes
These physical addresses are divided equally among the sets.
Hence, each set can access ((2^34)/32) bytes = 2^29 bytes = 2^22 BLOCKS
Hence the number of tag bits =22
The address maps to Considering 12 bits from last we get 1110 1101 0110
The first five bits are 11101 corresponding to set 29