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.

关于EDMA chain方式传输的疑问

您好,我现在用chain方式传输数据,共有四个传输,两种场景:(1)单个channel,一个channel负责四个传输;(2)两个channel,每个channel负责两个传输的;第一种场景的传输耗时总体观测要比第二种场景多25%,不知道怎么解释为什么性能会有这么大的差距,谢谢;(所有channel都在TC相同,芯片是DM6467T,系统中没有其他传输)

  • 请问在场景1中你的4个传输是一个结束以后启动下一个,还是用link的方式?建议是使用link。

    EDMA的参数配置和启动都需要时间的。还有EDMA传输的数据量越大,效率越高,如果传输数据较少,overhead就会很突出了。

  • 第一个场景是一个channel 四个PaRAM 依次link,第二个场景是两个channel,每个channel两个PaRAM依次link,EDMA的参数配置是相似的,每次传输都会配置,启动和等待试过同时启动等待也试过一个channel一个channel的启动等待;按照宏块进行搬运的,数据量基本固定都比较小24*24吧,也不可能那么大

  • 数据搬移是否有相关性?如果没有,第二个场景是可以并行搬移的,会快点的。每次只穿24x24么?数据很少啊。

  • 因为算法需求只能这么传,相关性是什么意思?数据重叠吗?这个是有的,四个传输都有重叠,第二个场景为什么可以并行搬运?两个channel是分配在同一个TC上的

  • 假设两个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.