This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

When the data CPU wants to access is not in the cache the related block will always be copy to the cache, is this right?

When the data CPU wants to access is not in the cache the related block will always be copy to the cache, is this right?

In the above question, the related region refers to the region seted to be cachealbe.

  • Hello,

    if the access is read, the target cache block (i.e. cache line) is always allocated.

    However, if the access is write, it depends on the cache attribute.

    The below is from the ARM ARM.

    If the attribute is the write-allocate, the target block is allocated into the cache.

    Best regards,

    Yasuhiko Koumoto.

  • Thanks very much for your answer!

    If I can understand like this:

    If the access is read, no matter the related region attribute is set to read-allocate or not(the related region must be set to cacheable first), the target cache will

    be allocated.

    If the access is write, the related region attribute is set to read-allocate (the related region must be set to cacheable first), the target cache will

    be allocated, the related region attribute is set to non-read-allocate the target cache will not be allocated.

    Is this understand right?

  • Hello,

    If the access is read, no matter the related region attribute is set to read-allocate or not(the related region must be set to cacheable first), the target cache will be allocated.

    The read-allocate is usual function  for the cacheable region.

    There is no method to set a region as the read-allocate (i.e. always read-allocate).

    If the access is write, the related region attribute is set to read-allocate (the related region must be set to cacheable first), the target cache will be allocated, the related region attribute is set to non-read-allocate the target cache will not be allocated.


    The write-allocate is significant for the write-through attribute.

    As for the write-back attribute, the read allocation always happens for both read and write accesses.

    Best regards,

    Yasuhiko Koumoto.