理解ARMV8 Device Memory的三个属性
ARMV8的spec.对device memory新引入了3个概念,分别是:Gathering, Reordering和Early Write acknowledge.下面从软件工程师的角度去阐述这三个概念。 Gathering The Gathering attribute determines whether it is permissible for either: • Multiple memory accesses of the same type, read or write, to the same memory location to be merged into a single transaction. • Multiple memory accesses of the same type, read or write, to different memory locations to be merged into a single memory transaction on an interconnect. 当某条load/store指令在pipeline的access memory阶段,发生cache miss(对于non-cacheable的memory就直接跳过,不过对于device memory一般都是non-cacheable的)后,需要将access memory请求发到总线上(例如AXI总线),通过AXI总线访问device memory,这个通过总线访问memory的过程被称为一次transaction. 为了优化性能考虑,在core内,会引入一个Buffer, 当发生一个access memory请求后,会将这个请求信息丢到Buffer中,若某条指令和上一条指令共享同一个cache line或者是访问同一个地址,那么,该条指令便不会再向总线发送transaction了,它share上一条指令 读到buffer中的结果。这个share的过程称为gathering. 读到buffer中的数据,如果是cacheable的,会在某个时间内腾到cache中。 Reordering reordering也是针对device memory的transaction, that is, 某个devic...