The state changes that can be associated with a transaction are determined by: • The transaction type. • The read response for transactions that are issued on the AR channel. • Whether the master supports an external snoop filter. • Whether the master performs speculative reads. | |
The rules that apply to a master are: | |
• If a transaction read response has PassDirty asserted, then the cache line must move to a Dirty state. The PassDirty response can be asserted for: — ReadNotSharedDirty. — ReadShared. — ReadUnique. | 当read的response的passDirty置位时,cache必须置为dirty state |
• If a transaction read response has IsShared asserted, then the cache line must move to either a Shared state or the Invalid state. The IsShared response can be asserted for: — ReadOnce. — ReadClean. — ReadNotSharedDirty. — ReadShared. — CleanShared. | 当read response的isShared asserted时,cache必须置为shared 或 invalid 状态。 |
• A cache line that is in a Unique state is permitted to move to the equivalent Shared state, but this is not expected behavior. | unique state可以转为shared state,但是不建议这么做。 |
• If an external snoop filter is not supported, a cache line that is in a Clean state can move to the Invalid state. | 如果没有外部snoop filter,则cache可以从clean sate转变为invalid state |
D4.3.1 State changes associated with a load
No cache line state change is required for the internal action of a load. |
D4.3.2 State changes associated with a coherent store
Before carrying out the internal operation of a store to a cache line in Shareable memory, the master must ensure that it has permission to store. A master has permission to store if the cache line is in the UniqueClean or UniqueDirty state. | 只有当cache的state是uniqueclean或uniquedirty时,才能对cache执行store的操作,即必须时unique时才能store。 |
If the master does not have permission to store then it must either: | 对于不处于unique状态的cahe,可以执行下面的操作使其变换到unique的状态: |
• Issue a transaction on the AR channel that obtains permission to store, and then perform the store to the cache line. After the store to a cache line, the master must be in the UniqueDirty state. The transactions that obtain permission to store are: — ReadUnique. — CleanUnique. — MakeUnique | 在读通道上执行下面的操作转为unique状态,在store之后,cache要处于uniquedirty state。 |
• Issue a transaction on the AW channel that obtains permission to store and also updates main memory. The transactions that obtain permission to store data and also update main memory are: — WriteUnique. — WriteLineUnique. | 在写通道上执行操作使其转为unique状态,这些操作会更新主存。 |
D4.3.3 State changes associated with a main memory update
An update to main memory can be performed when the cache line is in a Dirty state. | |
When a master is given permission to update main memory, the earliest the associated write transaction can occur is the cycle after the RVALID/RREADY handshake in which RLAST is asserted for the transaction that gave permission to update main memory. | |
An update to main memory is performed using a WriteBack or WriteClean transaction. After an update to main memory, the cache line must be in a Clean or Invalid state. | 向main memory更新要使用writeback或writeclean操作。 写之后cache的状态是clean或invalid。 |
If an external snoop filter is supported, then the following restrictions apply: • After a WriteBack transaction, the cache line must be in the Invalid state. • After a WriteClean transaction, the cache line must be in a Clean state. | 如果支持外部snoop filter的话: writeback之后cache状态时invalid,writeclean之后是clean状态。 |
D4.3.4 State changes associated with cache maintenance operations
The cache maintenance transactions are: • CleanShared. • CleanInvalid. • MakeInvalid | |
Before issuing a cache maintenance transaction, the master must ensure that: • For CleanShared, the cache line must be in a Clean or Invalid state. • For CleanInvalid and MakeInvalid, the cache line must be in the Invalid state. | 执行cleanshared之前cacheline要求处于clean或invalid的状态 执行cleaninvalid或makeinvalid之前,cacheline必须是invalid state。 |
A cache maintenance transaction does not change the cache line state. | cache维护操作不改变cacheline state |