In: Computer Science
Caches are important to providing a high performance memory hierarchy to processors. Below is a list of 32-bit memory address references, given as word addresses. 6, 214, 175, 149, 214, 6 Given a direct-mapped cache with four-word blocks and a total size of 16 blocks. Please fill in the following table. You may assume that the cache is initially empty. Because the given address is word address, we may compute tags and indices based on word address. Four-word blocks indicate the right most 2 bits are offset in a block. 16 blocks indicates there are 4 bits for indices, and the rest 26 bits will be the tag.
Word address Binary Tag (hex) Index (Hex) Hit/Miss
6
214
175
149
214
6
We have to use direct mapped caching and create a table
Every address will be represented in 32 bit binary notation
Word offset is represented by the right most bits of the binary memory address and will be in italic
Index bits will be the next 4 bits of the binary memory address and will be in bold
Tag bits will be remaining 26 bits and they will be represented without any formatting.
The cache is initially empty
The first address is 6 and is placed in block 1 and the result will be a miss.
The second address is 214 and is placed in block 5 and the result will be a miss.
The third address is 175 and is placed in block 11 and the result will be a miss.
The fourth address is 149 and is placed in block 5 replacing the its previous contents and the result will be a miss.
The fifth address is 214 and is placed in block 5 replacing the its previous contents and the result will be a miss.
The sixth address is 6 but it is already present in block 1, so this memory access will be a hit
Word Address (Binary) | Tag (Hex) | Index (Hex) | Hit / Miss |
6 (00000000000000000000000000000110) | 0x0000000 | 0x1 | Miss |
214 (00000000000000000000000011010110) | 0x0000003 | 0x5 | Miss |
175 (00000000000000000000000010101111) | 0x0000002 | 0xb | Miss |
149 (00000000000000000000000010010101) | 0x0000002 | 0x5 | Miss |
214 (00000000000000000000000011010110) | 0x0000003 | 0x5 | Miss |
6 (00000000000000000000000000000110) | 0x0000000 | 0x1 | Hit |