棋子 · 2020年01月20日

Additional Control Information Questions

Hi. I recently got the ARM AMBA specification in my work, and now I am learning stuffs. But the Additional control information got me stuck for a day haha

My questions are

  1. What is the reason to use the Cacheable bit in the Cache support? I wish I could get the example In real industry standard.
  2. When reading the speicfication on the Cacheable bit, they say the multiple write can merge together in multiple writes. I cannot catch the viivd picture on this situation. Does this mean the several master can write the data on cache? can i get some real life example so that I can visualize the real problem with this write section?
  3. I want to check whether I understand right in read section. So if the read happens with the cacheable bit flag HIGH, it means the data which the Master wants to read from the memory could be cached in the cache nearby the Master. And the principle of the Cache getting the data nearby the address which the Master asks to the Slave get applied here so some are 'pre-fetched' in the Cache. Is this right to understand what the specification explains??

What I feel while writing this question is that all understanding I have right now is all wrong. I feel like I got a wrong start move from the beginning.

1 个回答 得票排序 · 时间排序
极术小姐姐 · 2020年01月20日
  1. The cacheable bit was renamed the modifiable bit in AXI4, which is a more accurate name for its intended function. In an actual system, its used to differentiate between an access to Normal memory or Device memory.

Normal memory offers higher performance, but relies on the fact that there are no requirements on various attributes of the access, such as the size, or whether it needs to propagate all the way to main memory. DDR memory is an example of Normal memory.

Device memory is used for accesses where we care about various attributes of the access being preserved. For example, Device memory cannot be used speculatively, and may require that the size, length and number of accesses is preserved. It also often requires that the access is sent all the way to its final destination, before a response can be sent back. Peripheral registers are considered to be Device memory.

In effect, this means that Normal memory can be cached, for example in a local CPU cache (hence this bit being named Cacheable), and does not need to propagate to main memory in order to complete. Device memory cannot be cached, and responses need to come from the final destination.

  1. Since this bit indicates whether an access is to Normal memory, it determines whether this memory location is fussy about the attributes of the access being preserved. If this location is not particular about the size or number of accesses, then the system can attempt to improve the efficiency of the accesses by merging multiple acceses together.

For example, a CPU might make four 64 bit writes to a sequential group of locations. Downstream in the system, the data bus width is actually 128 bits. These accesses can potentially be merged meaning that the four 64 bit accesses is the equivalent of two 128 bit accesses. This is more efficient as we're now using the full data bus width, and the access may only require two clock cycles to transfer the data, instead of four cycles.

  1. Partially yes, but I think it makes more sense if you consider Normal and Device accesses. An address with this bit high would mark as Normal memory, which means it could potentially be cached. The line about prefetching really refers to whether an access can be performed speculatively or not - where a Device access would not allow this.
你的回答