AR# 75666

|

AXI CDMA race condition when updating >32-bit tail pointer

描述

A race condition can occur with the AXI CDMA when it is using >32-bit addressing.

Example of the issue:

The user sets up a string of descriptors as follows:

d0 -> d1 -> d2 -> d3 -> garbage. 

The arrows show how the {next_msb, next} values are set up. For example d0.next = lsb(d1) and d0.next_msb=msb(d1)

Software initially kicks off AXI CDMA with the following descriptor pointers:

CURDESC_PNTR = lsb(d0)
CURDESC_PNTR_MSB = msb(d0)
TAILDESC_PNTR = lsb(d2)
TAILDESC_PNTR_MSB = msb(d2)

Later, the software updates the TAILDESC_PNTR and TAILDESC_PNTR_MSB with the address for d3.

There are no issues if CDMA has completed d2 and paused when the software updates TAILDESC_PNTR and TAILDESC_PNTR_MSB with the address for d3.
After writing TAILDESC_PNTR_MSB, the CDMA reads in d3, does the work and pauses again.

There are usually no issues if CDMA is executing d2 and software updates both TAILDESC_PNTR and TAILDESC_PNTR_MSB with the address for d3 before d2 completes.
The CDMA does not pause between d2 and d3, executes d3 and pauses after completing d3.

However, there are issues when following sequence of events occurs:

  1. CDMA is executing d2
  2. Software updates TAILDESC_PNTR
  3. d2 completes but does not pause because the tail descriptor is in this state: {TAILDESC_PNTR_MSB(d2),TAILDESC_PNTR(d3)}
  4. d3 begins execution, but with a small number of bytes to transfer.
  5. There is a race between the Scatter/Gather( SG) engine fetching d3 -> next desc and the update to TAILDESC_PNTR_MSB.
  6. If TAILDESC_PNTR_MSB is not updated in time, the SG does not pause but instead starts fetching the garbage descriptor that d3 points to.
Once this sequence occurs, the AXI CDMA can report errors because the garbage descriptor points to invalid addresses or has a bytes to transfer of 0.

 

解决方案

To resolve the issue, you can apply the attached patch either for 2019.2 or 2020.1.

This issue is fixed in the 2020.2 release.

附件

文件名 文件大小 File Type
AR75666_Vivado_2020_1_preliminary_rev1.zip 141 KB ZIP
AR75666_Vivado_2019_2_preliminary_rev1.zip 141 KB ZIP

链接问答记录

主要问答记录

Answer Number 问答标题 问题版本 已解决问题的版本
54685 IP Release Notes and Known Issues for LogiCORE AXI CDMA for Vivado 2013.1 and Forward N/A N/A
AR# 75666
日期 10/24/2020
状态 Active
Type 综合文章
Tools
IP
People Also Viewed