ACP slave interface 学习

ACP:Accelerator Coherency Port

ACP是一个可选的slave interface(接口),接口协议规范是ACE-Lite协议的子集。只有访问cacheable memory空间时,ACP slave接口允许外部master通过DSU的main memory interface(Master口)访问memory空间。ACP读和写的data bus是128bit,为了提高效率,每次访问以cache line长度为边界。为了保持cache的一致性,对于ACP口的访问,需要check cluster中的所有cache locations,即L3 cache和每个core的data caches。By default(默认情况下),ACP write访问(acccess)隐含stash requests to the L3 cache,即其他master想要把数据存在(stash)L3 cache中。或者,隐含的stash request can target the L2 cache of a selected core,即将数据存在指定的core的L2 cache中。

ACP interface properties for the DSU

ACP property Supported by the DSU
Port_Type Accelerator
Continuous_Cache_Line_Read_Data Yes
Multi_Copy_Atomicity Yes
Cache_Stash_Transaction Yes
Low_Power_Signals Yes
Ordered_Write_Observation No
others…… No

ACP slave口的实现是ACE-Lite协议的子集,ACP ACE-Lite子集在AMBA AXI and ACE Protocol Specification AXI3, AXI4, and AXI4-Lite, ACE and ACE-Lite中有有描述。在DSU中实现的ACP Slave port还有如下额外的限制:

ARCACHES和AWCACHES的值仅限于:

——0b0111
——0b1011
——0b1111

所有的传输(transactions)可以是Secure或Non-secure。
Exclusive accesses不支持。ARLOCK和AWLOCK信号不存在。
通过AWDOMAINS和ARDOMAINS信号,所有的操作可以指定是Inner Shareable、Outer Shareable和Non-shareable。

不支持Barriers操作。任何write transaction的BRESP响应表明该transaction可以被全局观察(global observability)到。
ARSIZE和AWSIZE信号不存在,默认认为是4(16 bytes)。
ARLENS和AWLENS限制如下:

    0:  One beat
    3:  Four beats

ARBURST和AWBURST信号不存在,默认认为是0b01,即INCR类型。
ARSNOOP信号不存在,默认认为是0b0000。
ARQOS和AWQOS信号不存在。

ACP支持的read传输类型有如下transfer size和length组合:

16-byte INCR read transaction:

     ——ARLENS is 0 (one beat)。
     ——Address aligned to 16-byte boundary (ARADDRS[3:0] is 0b0000)。

64-byte INCR read transaction:

     ——ARLENS is 3 (four beats)
     ——Address aligned to 64-byte boundary (ARADDRS[5:0] is 0b000000)。
 ACP支持的写传输类型有如下transfer size和length组合:

16-byte INCR write transaction:

     ——AWSTRBS,any combination of bytes,including no bytes,are valid.
     ——AWLENS is 0 (one beat).
     ——AWSNOOPS is WriteUniquePtl.
     ——Address aligned to 16-bytes boundary (AWADDRS[3:0] is 0b0000)

64-byte INCR write transaction

     ——AWSTRBS,any combination of bytes,including no bytes,are valid. When AWSNOOPS is WriteUniqueFull, all bytes must be valid.
     ——AWLENS is 3 (four beats).
     ——AWSNOOPS is WriteUniquePtl or WriteUniqueFull.
     ——Address aligned to 64-bytes boundary (AWADDRS[5:0] is 0b000000)
ACP支持如下的Cache stash传输类型的transfer size和length组合:

64-byte INCR write stash transaction:

     ——AWSTRBS,all bytes are valid.
     ——AWLENS is 3 (four beats).
     ——AWSNOOPS is WriteUniqueFullStash.
     ——Address aligned to 64-bytes boundary (AWADDRS[5:0] is 0b000000)

Dataless 64-byte INCR write stash transaction:

     ——No W-Channel transfer.
     ——AWLENS is 3 (four beats).
     ——AWSNOOPS is StashOnceShared or StashOnceUnique.
     ——Address aligned to 64-bytes boundary (AWADDRS[5:0] is 0b000000)

在AWSTASHLPIDENS信号有效时,AWSTASHLPIDS[3:1]信号指示选定的core number,Stash requests可以指向选定core的L2 cache。

AWSTASHLPIDS[0]信号用于thread number,但不会影响stash request。

如果requests不符合这些约束(restrictions),将会在RRESPS和BRESPS通道上产生SLVERR response。下表列出了支持的ACP transactions

ACP supported transactions

Transaction Notes
ReadOnce
WriteUniqueFull
WriteUniquePtl
WriteUniqueFullStash
StashOnceUnique
StashOnceShared

ACP performance

为了提高ACP性能,ACP transaction遵循如下指导(guidelines):

为了避免second transaction stalling the ACP interface直到first transaction结束,同一个master必须避免发出多个同AXI ID的outstanding transactions。如果有两笔transaction必须要保序,Arm建议second transaction等first transaction回完response后再发送出去。
当writes包含full cacheline data时,会达到更高的性能。因为write小雨full cacheline data时,通常会导致read-modify write sequence,即需要先读后写(merge)
L3的一些资源在ACP interface和cores之间是共享的,因此在一些场景下,ACP interface拥堵的访问会降低cores的性能。

下表列出了ACP的可以接受outstanding能力: ACP acceptance capabilities

Attribute Value Description
Write acceptance capability 33 The ACP can accept up to 33 write transactions.
Read acceptance capability 33 The ACP can accept up to 33 read transactions.
Combined acceptance capability 34 The ACP can accept up to 34 transactions. There is no performance benefit above 32 outstanding transactions.

相关阅读

Makefile文件
Bash shell语言学习

作者:谷公子
首发博客:https://blog.csdn.net/W1Z1Q/article/details/100181857

发表评论

邮箱地址不会被公开。 必填项已用*标注