# Mismatch of PYNQ Data Stream from DMA

**URL:** <https://discuss.pynq.io/t/mismatch-of-pynq-data-stream-from-dma/4605>\
**Category:** Support\
**Created:** [August 27, 2022, 9:49pm UTC](https://discuss.pynq.io/t/mismatch-of-pynq-data-stream-from-dma/4605 "2022-08-27T21:49:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NNUT](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/nnut/32/3540_2.png) [@NNUT](https://discuss.pynq.io/u/NNUT)\
**Post date:** [August 27, 2022, 9:49pm UTC](https://discuss.pynq.io/t/mismatch-of-pynq-data-stream-from-dma/4605/1 "2022-08-27T21:49:55Z")

</div>

-PYNQ Version 2.7.0  
-Board: PYNQ-Z1  
-Vivado & VITIS HLS 2021.2.1

What I’m trying to do:  
I’m trying to run tutorials to send data from a Zynq (via jupyter notebooks) to an HLS generated IP. I’ve been following the DMA tutorials by @ [cathalmccabe]:

- [Tutorial: using a HLS stream IP with DMA (Part 3: Using the HLS IP from PYNQ)](https://discuss.pynq.io/t/tutorial-using-a-hls-stream-ip-with-dma-part-3-using-the-hls-ip-from-pynq/3346)

What I’ve done and gotten to work:  
I’ve run tutorials to send data from a Zynq (via jupyter notebooks) to a FIFO loopback and have had success. Link to the end of the tutorial:

- [Tutorial: PYNQ DMA (Part 2: Using the DMA from PYNQ)](https://discuss.pynq.io/t/tutorial-pynq-dma-part-2-using-the-dma-from-pynq/3134)

Problem:  
When I get to the end of the following **Zynq (via jupyter notebooks) to an HLS generated IP** tutorial I have a problem.

In the " **DMA receive**" section… The values that we should get back are:

0x05  
0x06  
0x07  
0x08  
0x09  
0x0a  
0x0b  
0x0c  
0x0d  
0x0e

I get the following:

0x05  
0x07  
0x09  
0x0b  
0x0d  
0x0f  
0x11  
0x13  
0x15  
0x17

I’ve followed everything exactly… a couple of times… and still keep getting this issue. I’m not really sure why this is happening because the HLS IP clearly does the following: **output = input + 5**. Could this be due to my data possibly not being aligned properly in the DMA?

---

<div class="post-metadata">

**Author:** ![NNUT](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/nnut/32/3540_2.png) [@NNUT](https://discuss.pynq.io/u/NNUT)\
**Post date:** [August 27, 2022, 10:30pm UTC](https://discuss.pynq.io/t/mismatch-of-pynq-data-stream-from-dma/4605/2 "2022-08-27T22:30:19Z")

</div>

It seems as though I figured it out.

The HLS example had an input requested size of 4 bytes.

But my DMA had a stream data width with a size of 8 bytes:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/e/e40b15dd238b4ba67a44ccd2866fbabab7bef1f9.png)

I changed the stream data width size to 4 bytes to match the HLS input size of 4 bytes and then I received the correct values.
