# Multiple DMA: stall!

**URL:** <https://discuss.pynq.io/t/multiple-dma-stall/4452>\
**Category:** Support\
**Created:** [July 13, 2022, 1:34am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452 "2022-07-13T01:34:56Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![alienflip](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/alienflip/32/3408_2.png) [@alienflip](https://discuss.pynq.io/u/alienflip)\
**Post date:** [July 13, 2022, 1:34am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/1 "2022-07-13T01:34:56Z")

</div>

So I am following [this guide](https://pp4fpgas.readthedocs.io/en/latest/axidma2.html), but it seems that using vivado 2022.1, when running validation it throws some errors about `tlast` and about the custom IP write channel byte size.

If you ignore the errors and compile anyway, then when using jupyter, there is a stall.

Has anyone else found that it is the case? Been stuck for a day! HELP!

Best,  
K

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [July 13, 2022, 7:25am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/2 "2022-07-13T07:25:01Z")

</div>

Hi @alienflip,

Welcome to our community. As you are using the tools 2022.1, the HLS compiler is Vitis HLS not Vivado HLS.

Vitis HLS does not generate AXI4-Stream from structure properly. To generate AXI4-Stream interfaces you need to use something like this `hls::stream< ap_axis<32,0,0,0>`.

You can review Cathal’s tutorial for more information.

> [@Tutorial: using a HLS stream IP with DMA (Part 1: HLS design)](https://discuss.pynq.io/t/tutorial-using-a-hls-stream-ip-with-dma-part-1-hls-design/3344):
>
> Tutorial: using a HLS stream IP with DMA tutorial (Part 1: HLS design) In a [previous tutorial](https://discuss.pynq.io/t/tutorial-pynq-dma-part-1-hardware-design/3133) I showed how to use the AXI DMA to stream data between memory to AXI stream interfaces. The DMA tutorial used an AXI stream FIFO to do a loopback test to show how to use the DMA. This tutorial will show how to create and add a HLS IP with an AXI input stream, and AXI output stream. This tutorial will be split into two parts. This part 1 shows how to build the HLS IP, [part 2](https://discuss.pynq.io/t/tutorial-using-a-hls-stream-ip-with-dma-tutorial-part-2-vivado-design/3345) shows how to build the Vivad…

Mario

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [July 13, 2022, 7:33am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/3 "2022-07-13T07:33:41Z")

</div>

@marioruiz

If you take a closer look at his example link. It is using 2020.2 Vivado and Vitis HLS.  
Meantime there do no tlast signal are generate accordingly.  
So this lead to 2 major questions:  
PYNQ 2.7 DMA according to the example can work without tlast signal?  
Any major differences between DMA on PYNQ revisions?

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [July 13, 2022, 7:37am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/4 "2022-07-13T07:37:43Z")

</div>

The DMA could complete the transaction when the right amount of data is moved (still need to verify this claim) or when TLAST is asserted.

The DMA IP is from the Vivado IP Catalog, the PYNQ driver only configures it.

Mario

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [July 13, 2022, 7:40am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/5 "2022-07-13T07:40:28Z")

</div>

@briansune where do you see that the example can work without TLAST? OP mentions an stall, this is highly likely due to the fact that no TLAST is being generated.

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [July 13, 2022, 7:41am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/6 "2022-07-13T07:41:51Z")

</div>

Just from the capture of the blocks, maybe I am wrongly seen.  
And the report of the HLS signals

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [July 13, 2022, 7:47am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/7 "2022-07-13T07:47:16Z")

</div>

I don’t think the example is fully verified, I can see a few inconsistencies. At the begging vivado\_hls is called, but some of the screenshots are from vitis\_hls

> axis\_t is a struct defined in the header file that is composed of an int data and an ap\_uint\<1\> last. The 1-bit last is required for axis interfaces, and signals the last struct of the stream, ending the stream.

As I mentioned in my first reply, Vitis HLS does not support custom structs to generate AXI4-Streams

Mario

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [July 13, 2022, 7:51am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/8 "2022-07-13T07:51:40Z")

</div>

@marioruiz

If this example really rely tlast to work why the interface of single and multiple DMA makes the same interface report.  
Of cause this can be another clone example from other place but sure that if two examples following the same flow then it is really what it can do wo the tlast (I guess).

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/5/5da2348f4d1a2be141dcc1bb12c8368da4bff737.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/c/cea17454609240424afa9342fb243343483eeaee.png)

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [July 13, 2022, 8:00am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/9 "2022-07-13T08:00:14Z")

</div>

Whatever agree or disagree, I think we do agree one point is that it is a very bad design if this is relying on the enough amount of data passing to the DMA while using tlast only suffer really little LEs usage and introduce a much much complete handshaking protocol.

---

<div class="post-metadata">

**Author:** ![alienflip](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/alienflip/32/3408_2.png) [@alienflip](https://discuss.pynq.io/u/alienflip)\
**Post date:** [July 13, 2022, 11:03am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/10 "2022-07-13T11:03:36Z")

</div>

@briansune @marioruiz Thanks!

So for [this](https://discuss.pynq.io/t/tutorial-using-a-hls-stream-ip-with-dma-part-1-hls-design/3344) guide and [this](https://pp4fpgas.readthedocs.io/en/latest/axidma2.html) guide, I guess we should be using vivado/vitis 2020.2?

Lastly: are there any up-to-date equivalents for 2022.1 that you guys know of?

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [July 13, 2022, 1:02pm UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/11 "2022-07-13T13:02:20Z")

</div>

> I guess we should be using vivado/vitis 2020.2?

If you do not want to do any changes, yes.

I am not aware of any up to date version.

You should report this problem with them [GitHub - KastnerRG/Read\_the\_docs: Projects and Labs for the Parallel Programming for FPGAs book](https://github.com/KastnerRG/Read_the_docs)

Mario

---

<div class="post-metadata">

**Author:** ![alienflip](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/alienflip/32/3408_2.png) [@alienflip](https://discuss.pynq.io/u/alienflip)\
**Post date:** [July 18, 2022, 12:43am UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/12 "2022-07-18T00:43:14Z")

</div>

[Reported](https://github.com/KastnerRG/Read_the_docs/issues/28)

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/system/32/2_2.png) [@system](https://discuss.pynq.io/u/system)\
**Post date:** [May 3, 2023, 9:46pm UTC](https://discuss.pynq.io/t/multiple-dma-stall/4452/13 "2023-05-03T21:46:44Z")

</div>

Closed on May 3, 2023, 9:46pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
