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 = lsb(d1) and d0.next_msb=msb(d1)

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

CURDESC_PNTR = lsb(d0)

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.


Associated Attachments

Linked Answer Records

Master Answer Records

Answer Number Answer Title Version Found Version Resolved
54685 IP Release Notes and Known Issues for LogiCORE AXI CDMA for Vivado 2013.1 and Forward N/A N/A
AR# 75666
Date 10/24/2020
Status Active
Type General Article
People Also Viewed