D4.10 Handling overlapping write transactions

This section describes the expected behavior when two masters attempt stores to the same cache line in a Shareable region of memory at approximately the same time. When this happens, it is the responsibility of the interconnect to sequence the order that the transactions occur.
The master that gets sequenced first proceeds with the transaction as normal. However, the master that is sequenced second sees the transactions that are associated with the first master’s store on its snoop port while attempting to carry out a store.
The following sections describe the expected behavior from the standpoint of the master that is sequenced second. For brevity, the master that is sequenced first is referred to as Master1 and the master that is sequenced second is referred to as Master2.
如果两个写操作同时进行,由interconnect决定他们操作的顺序,首先操作的按正操步骤进行,第一个操作的要通过snoop将第一个操作的结果拿过来,然后才能进行store操作。

D4.10.1 Overlapping ReadUnique

If Master2 has issued a ReadUnique transaction because it required a copy of the data, the following occurs:
1. Master2 issues a ReadUnique transaction.
2. Master2 then sees one of the following transactions on its snoop port from Master1 attempting a write to the
same line:
• ReadUnique.
• CleanInvalid.
• MakeInvalid.
At this point, Master2 must invalidate any local copy that it has of the cache line. If Master2 does not have a
local copy of the cache line, then no action is required.
3. When the ReadUnique completes, it returns with the updated copy of the cache line that includes the store
that is performed by Master1.
4. Master2 can perform its store.
 

D4.10.2 Overlapping MakeUnique

If Master2 has issued a MakeUnique transaction because it was performing a full cache line write, the following
occurs:
1. Master2 issues a MakeUnique transaction.
2. Master2 sees one of the following transactions on its snoop port from Master1 attempting a write to the same
line:
• ReadUnique.
• CleanInvalid.
• MakeInvalid.
At this point, Master2 must invalidate any local copy that it has of the cache line. If Master2 does not have a
local copy of the cache line, then no action is required.
3. When the MakeUnique completes, Master2 can perform its full cache line store.
 

D4.10.3 Overlapping CleanUnique

If Master2 has issued a CleanUnique transaction because it was performing a partial line store but it already had a
cached copy of the line, the following occurs:
1. Master2 issues a CleanUnique transaction.
2. Master2 sees one of the following transactions on its snoop port from Master1 attempting a write to the same
line:
• ReadUnique.
• CleanInvalid.
• MakeInvalid.
At this point, Master2 must respond to the snoop appropriately and then invalidate its local copy of the cache
line.
3. When the CleanUnique completes, Master2 cannot perform its local store because it has lost its local copy of the cache line.
4. Master2 can issue a new ReadUnique transaction to obtain a copy of the line.
5. Master2 can perform its store.
 
A master can remove the need to issue a new ReadUnique the transaction, as described in the CleanUnique case, by initially issuing a ReadUnique transaction instead of a CleanUnique transaction. However, this sometimes results in a fetch from main memory occurring when it is not required.mater可以通过initially issuing 一个readunique来代替cleanunique,这样在有冲突的情况下,就不用再次发送readunique了,但是这样会导致如果所有的cache都没有的话,会从主存中读数据
Alternatively, a master can remove the need to issue a new ReadUnique transaction by performing a partial line WriteBack to main memory, that only updates the required bytes, when its CleanUnique transaction completes and the master has permission to store to the line. This does mean that the master does not retain a copy of the line.master还可以通过使用writeback直接写主存,来避免发送readunique
It is acceptable for a master to use a CleanUnique transaction when carrying out a full cache line store. In this case, the master does not have to retry the transaction with a ReadUnique. It can simply perform the full cache line store when the CleanUnique is complete.如果master是写整个cacheline的话,可以直接写就ok。

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值