Readunique and cleanunique transactions in ACE protocol

In case of readunique transaction cache line is copied into the initiating master's cache(whether it is clean or dirty) and invalidated in snooped master's cache and then store operaation is performed in initiating master's cache line.

In case of cleanunique transaction cache line is copied to main memory if it is dirty(and invalidate)  and then  store operation performed in initiating master's cache.

Why do we need extra write to memory in case of cleanunique transaction? 

  • Maybe I am replying to this question after a long time. Anyway, according to my understanding, ReadUnique and CleanUnique transactions are almost the same. In addition, CleanUnique is more efficient compared to ReadUnique. Here is the explanation.

    ReadUnique: is used by a master prior to performing a partial line write, i,e, it is updating only some bytes in the line. To do this, it needs a copy of the line from memory, which is obtained after the snooped master has updated the recent line in the memory.

    CleanUnique: is the same as ReadUnique, where the master already has a copy of the line in either SharedClean or SharedDirty state. Note that only one master can have a copy of the cache line in SharedDirty state. Therefore, performing CleanUnique will save the additional memory read operation performed in ReadUnique transaction.

    In conclusion, I am afraid that your question may be not valid. For more reading, you can look into the Cache Coherency white paper by ARM

    Cheers,

    Dr. Ray

  • The extra write is required in order for the Dirty responsibility not to be lost.  If a cache line is not the same as main memory, then one component in the system must maintain the line in a Dirty state to ensure that memory is eventually updated with the new data.

    CleanUnique is not allowed to return PassDirty = 1 to the initiating.  When the snooped master receives the CleanInvalid snoop (CleanUnique generates a CleanInvalid snoop), it must invalidate the line.  If the line is in a Dirty state, then the snooped master must either write that data back to main memory or assert PassDirty in response to the snoop.

    If it asserts PassDirty in response to the snoop, then the interconnect must take the Dirty responsibility as it cannot assert PassDirty back to the initiating master.