Let's look at how the cache is accessed by the core. As just mentioned, the core might request a specific bit of data from the memory system and that memory might be marked as cacheable. And if it is, the core will look in the cache first before it decides maybe to have to go out to main memory and this is known as a Cache Lookup. What makes the memory cacheable? Well, we've discussed the MPU already, and that can be used to mark a memory address as cacheable. Also, if we're using the default memory map, then that might have some addresses that are by default marked as cacheable. The processor might end up deciding to perform a cache lookup with or without the MPU. We're going to introduce some new terms here, tag, index and offset. These relate to the address that's being used for the Cache Lookup. This is the address in this example, 54 in hexadecimal and we split it up into different fields, including the tag, index and offset of that address. We're going to show how these different fields are used to locate data in the cache if it's there at all. Here we have part of the cache, specifically the data RAM. This is where the actual data that you're caching ends up in the cache and this is a very simple 4 by 4 block structure, where each entry here represents a single word of data. The first thing that the core will probably check is the index field of the address and that will indicate which cache line the data might be in. In this specific address, the index field is set to 01, so that's why in this example, the data might be in this cache line here. Cache line is a line in cache, a line of four words in this example, where that data might be located. The number of cache lines we'll see later can vary depending on the implementation. The next thing the processor might do is, use the tag field and this is what really tells you whether or not the data is present in the cache. In this example, we have a tag of 001, it's part of the address that we're looking up and the tag RAM, this is another portion or structure block inside the cache hierarchy is also indicating that in this cache line where this specific address might be located, the data is actually present. We can then use the final field, the offset field, to determine exactly which of these four entries the data item is, and it's set to 01, so that means that we're going to go to this entry. This is 00 for the offset, 01, 02 and 03. In this example, we end up with what's called a cache hit. The data will be returned to the processor directly from the cache. However, there is a chance that this value here didn't match the tag in the address and that would result in a cache miss, which will require the processor to go out and request the data from external memory. Then the access will be delayed, as we mentioned previously and typically this will result in a cache linefill, so we won't just go out to external memory and return the data. We'll return the data into the processor core, but also fill in the line in the cache, not just that word of data but the neighboring items as well so next time round we'll be able to hopefully get that data from the cache if we make another request to that specific address or one of the neighboring addresses.