您好,我现在用chain方式传输数据,共有四个传输,两种场景:(1)单个channel,一个channel负责四个传输;(2)两个channel,每个channel负责两个传输的;第一种场景的传输耗时总体观测要比第二种场景多25%,不知道怎么解释为什么性能会有这么大的差距,谢谢;(所有channel都在TC相同,芯片是DM6467T,系统中没有其他传输)
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.
请问在场景1中你的4个传输是一个结束以后启动下一个,还是用link的方式?建议是使用link。
EDMA的参数配置和启动都需要时间的。还有EDMA传输的数据量越大,效率越高,如果传输数据较少,overhead就会很突出了。
假设两个channel时,第一个channel的两个传输请求为TR0,TR1,第二个channel的两个传输请求为TR2,TR3,那么TR0完成后,TR2就可以立即出队列启动传输,而TR0传输完成后会产生一个新的传输请求TR1,然后进入事件队列等待TR2完成,TR2完成后,TR1立即出队列启动传输,而TR2传输完成后会产生一个新的传输请求TR3,然后进入事件队列等待TR1完成,TR1完成后,TR3立即出队列启动传输;
这样TR0(TR2)完成产生TR1(TR3)入队列在时间上就与TR2(TR1)出队列启动传输并行,也就节省了TR0(TR2)完成产生TR1(TR3)入队列的时间;
是不是可以这样认为?请不吝赐教,谢谢;
基本正确。就是流水线的概念,请参考EDMA文档如下部分。
2.11.1.2 TR Pipelining
TR pipelining refers to the ability of the source active set to get ahead of the destination active set.
Essentially, the reads for a given TR may already be in progress while the writes of a previous TR may
not have completed.
The number of outstanding TRs is limited by the number of destination FIFO register entries. A single TR
must be assured to target a single source peripheral endpoint.
TR pipelining is useful for maintaining throughput on back-to-back small TRs. It eliminates the read
overhead because reads start in the background of a previous TR writes.