D4.8.1 WriteNoSnoop
A WriteNoSnoop transaction is used in a region of memory that is not Shareable with other masters. A WriteNoSnoop transaction can result from: • A program action, such as a store operation. • An update of main memory for a cache line that is in a Non-shareable region of memory. | WriteNoSnoop 用于一段不和其他master share的内存。用于: 1. store操作 2. Non-shareable的内存的cache update到主存中。 writenosnoop是针对不共享的内存的操作,所以不需要给其他的master发送snoop的消息。 可以是直接写内存,或者是将cache中的内容同步到内存。
|
D4.8.2 WriteUnique
A WriteUnique transaction is used in a region of memory that is Shareable with other masters. A single write occurs that is required to propagate to main memory or a downstream cache. | 和其他master共享的内存,writeunique是一个写操作,会将内容写入主存或downstream cache。 这个不是更新cache到主存的命令,是cpu直接发出的写的命令,这个时候如果有cache的话,cache的数据必须是处于clean的状态 |
In the case of master holding a line in a Clean state while performing a WriteUnique transaction, the cache line must be updated to the new value when the WriteUnique transaction response is received. | 如果有clean cache的话,更新之后cache的内容也必须得到更新 |
D4.8.3 WriteLineUnique
A WriteLineUnique transaction is used in a region of memory that is Shareable with other masters. A single write occurs, that is required to propagate to main memory or a downstream cache. | 写道主存或downstream cache |
A WriteLineUnique transaction must be a full cache line store and all bytes within the cache line must be updated | 一次必须是写整个cache的量 |
In the case of master holding a line in a Clean state while performing a WriteLineUnique transaction, the cache line must be updated to the new value when the WriteLineUnique transaction response is received. | 如果有clean cache的话,cache中的内容也必须得到更新。 |
D4.8.4 WriteBack
A WriteBack transaction is a write that can be used in Shareable and Non-shareable regions of memory. A WriteBack transaction is a write of a dirty cache line to update main memory or a downstream cache. | writeback属于cache维护命令,将dirty cache写道主存或downstream cache。 |
The difference between a WriteBack and a WriteClean transaction is whether the cache line remains allocated in the cache for a Shareable region of memory. After a WriteBack transaction, the cache line is no longer allocated. After a WriteClean transaction, the cache line remains allocated. | writeback和writeclean的区别: writeback 写之后cache将变为invalid,writeclean写之后 cache依然 有效。 |
D4.8.5 WriteClean
A WriteClean transaction is a write operation that can be used in Shareable and Non-shareable regions of memory. A WriteClean transaction is a write of a dirty cache line to update main memory or a downstream cache. | 同writeback,也属于cache 维护类操作,将dirty cache更新到主存或downstream cache。 |
D4.8.6 WriteEvict
A WriteEvict transaction can be used when evicting a clean cache line. This transaction is used to write the line to a lower level of the cache hierarchy, such as an L3 or system level cache. A WriteEvict transaction is not required to update main memory. | |
A WriteEvict transaction must only be used in the following circumstances: • When the cache line is held in a UniqueClean state. • When the cache line has not been speculatively fetched from a different shareability domain. | 必须时unique clean,为啥? 能看出来这条操作是将upstream的cleancache写道downstream,为下次使用做准备。 |
Note It is important that a cache line that could have been speculatively fetched, so that it was located outside of its shareability domain, could become out-of-date as the cache line is not required to be updated by subsequent stores to the cache line. If a cache line could be a stale copy, then it must not be written back into its shareability domain by the use of a WriteEvict transaction. |
D4.8.7 Restrictions on WriteUnique and WriteLineUnique usage
Typically, WriteUnique and WriteLineUnique transactions are used by a non-cached component that is writing to a Shareable region of memory. However, WriteUnique and WriteLineUnique transactions can be used by a cached component that meets the requirements. | WriteUnique and WriteLineUnique的典型使用场景是一个没有cache的master对shareable内存的写操作。 对有cache的master也可以,只是有下面一些限制: |
A cached component must be able to complete any incoming snoop transaction while a WriteUnique or WriteLineUnique transaction is in progress. A cached component must: | 在WriteUnique or WriteLineUnique执行时,component必须能完成其他master的snoop的操作,需要按如下规则操作: |
Complete any outstanding WriteBack, WriteClean, WriteEvict, or Evict transactions before issuing a WriteUnique or WriteLineUnique transaction | 在发出WriteUnique or WriteLineUnique传输之前,必须完成所有的WriteBack, WriteClean, WriteEvict, or Evict 传输。why? |
No additional WriteBack, WriteClean, WriteEvict, or Evict transactions can be issued until all outstanding WriteUnique or WriteLineUnique transactions are completed. | 在WriteUnique or WriteLineUnique完成之前不能发出额外的WriteBack, WriteClean, WriteEvict, or Evict 这些传输 |
Complete any incoming snoop transactions without the use of WriteBack, WriteClean, WriteEvict, or Evict transactions while a WriteUnique or WriteLineUnique transaction is in progress. | 当 WriteUnique or WriteLineUnique正在执行时,直接完成所有的snoop,而不需要执行WriteBack, WriteClean, WriteEvict, or Evict transactions |
WriteNoSnoop transactions can also be blocked behind WriteUnique and WriteLineUnique transactions. Therefore, the design of the master must ensure that an incoming snoop transaction can complete when a WriteNoSnoop transaction is blocked by an outstanding WriteUnique or WriteLineUnique transaction. | |
This is necessary, because earlier transactions that also might require earlier snoop transactions to complete, can prevent WriteUnique and WriteLineUnique transactions from progressing. | |
These requirements restrict the use of WriteUnique and WriteLineUnique transactions to components that can either: • Complete all snoop transactions without requiring any data to be supplied, for example write-through caches that do not keep dirty cache lines for Shareable data. • Complete snoop transactions by using the snoop data channel, CDDATA. | |
总结一下:
WriteNoSnoop | 不与其他master共享内存,直接写内存或cache维护 |
WriteUnique | 没有cache的master写(部分cache行) |
WriteLineUnique | 没有cache的master写(整个cache行) |
WriteBack | cache维护指令,将cache写到downstream或主存中,写之后此cache变为invalid |
WriteClean | cache维护指令,将cache写到downstream或主存中,写之后cache依然存在,变为clean |
WriteEvict | 将upstream的clean cache写道downstream,并且invalid upstream的cache |