Knowledge Base Article
Why does the AXI MCDMA IP terminate an H2D packet early when multiple channels are active?
Description
When you are using the AXI Multichannel DMA IP for PCI Express* using Quartus® Prime Pro 25.3.1, IP version 3.3.0, with a single AXI‑Stream port.
When two or more host-to-device (H2D) channels are active and an H2D packet spans multiple descriptors (SOF set on the first descriptor and EOF set on the last), the IP may insert an extra AXI-Stream beat at a descriptor boundary before the packet's expected end. On that beat, tvalid, tlast, and h2d_axi_st_tuser_error are asserted, and tdata is all zeros. The inserted beat terminates the packet early. The next beat may belong to another channel, and the remaining descriptors of the original packet can later be streamed as a separate packet. Host-side descriptors can still complete normally, with no error reported by the driver.
The IP can assert h2d_axi_st_tuser_error for either of the following reasons:
- A PCIe Completion returns a non-successful Completion Status.
- The IP inserts an end-of-packet (EOP) beat because the queue ID (QID) changes before the current packet reaches EOP.
If the AXI-Stream trace shows a QID change immediately after the inserted beat and PCIe Advanced Error Reporting (AER) shows no relevant errors, the symptom is consistent with a forced EOP.
Resolution
Use one H2D descriptor per packet, with both SOF and EOF set on that descriptor, when multiple H2D channels must remain active concurrently. MCDMA can service another channel before all descriptors of a multi-descriptor packet have completed. To preserve packet boundaries, the packet's descriptors must be serviced without interleaving from another channel from start-of-packet (SOP) through EOP.
If a packet must span multiple descriptors, use one of these alternatives:
- Run only one active H2D channel.
- Serialize H2D submissions across channels so no descriptors from another channel are in flight between the packet's SOP and EOP. Submitting all descriptors for a packet in one tail-pointer update does not, by itself, prevent interleaving if another channel already has pending work.
Increasing h2d_max_num_desc_fetch_hwtcl may reduce how often packets are split, but it does not prevent interleaving and is not a substitute for the workarounds above.