I am have a difficult time understanding when a direct map cache is a hit or a miss. My understanding is that when and index matches, but a tag doesn't it is still a miss but the new tag then takes over the previous tag on that index.
Address Binary Address Tag Index H/M
3 00000011 0000 011 Miss
180 10110100 1011 100 Miss
43 00101011 0010 011 Miss
2 00000010 0000 010 Miss
191 10111111 1011 111 Miss
88 01011000 0101 000 Miss
190 10111110 1011 110 Miss
14 00001110 0000 110 Miss
181 10110101 1011 101 Miss
44 00101100 0010 100 Miss
186 10111010 1011 010 Miss
253 11111101 1111 101 Miss
I am have a difficult time understanding when a direct map cache is a hit or a miss. My understanding is that when and index matches, but a tag doesn't it is still a miss but the new tag then takes over the previous tag on that index.
As such my theory is that all of the mappings are misses, am I correct?
Thank you so much guys!
*TheThe block size is one word; therefore we use no offset bit
*TheThe total size is 8 blocks; therefore we need only 3 index bits