This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
已咨询e2e工程师,请看下面工程师的回复。
Help me understand the use case for copying data from DDR to cache. This may not be allowed or possible.
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1303160/am6442-dma-for-ddrss
正常来说一个cpu的指令下来之后是先到cache里面去找数据,如果此时数据没有找到也就是未命中的情况,那么数据就需要从ddr搬运到cache来,这个过程不就是复制吗?我现在想知道的是这个搬运的工作是谁在做。
您帮我问下ti工程师,我号在那边没法回复,谢谢您了
对于用户来说,ARM的cache是透明的,用户的程序在编译后,通过各种汇编指令会去mov DDR中的数据到ARM的CPU寄存器或者反过来,如果刚好此时cache命中,则节省了CPU访问DDR的时间,加速了运算。
我不认为在这个过程中需要DMA的参与,如果是大片的数据搬移,比如DDR到DDR,或者DDR到内部其他IP,可以用到DMA。
DMA设计的初衷,就是用来代替CPU来搬运数据,而CPU自己是可以去做同样的事情,只是用DMA后就可以去处理其他事务。
请看下面e2e工程师的回复。
This is not specific to AM64x, in general there is no separate DMA involved in a cache miss. The processor core (in AM6442 case A53 or R5) cache controller is the initiator the fetches or evicts a cache line (64bytes with A53, 32bytes with R5) in a burst. You can think of this cache controller as being a dedicated DMA for just the purpose of reading and writing between main memory and caches.