cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
stu
Observer
Observer
402 Views
Registered: ‎02-14-2019

AXI DMA and Custom IP : Why received value is not correct?

Jump to solution

Hi. 

I made a system design that includes Zynq, DMA and custom ip. Zynq is for getting data from UART and sending to DMA. DMA sends the data to custom IP. Custom IP is just adds a number to received values and sends the values to DMA again. Then, in Zynq, values are receving from DMA. Here is the problem part; 

I designed custom ip in two way and tried in order:

1 - There is no operation on received data. Just take and send.
2 - Add 5 to received data and send.

In first one, everything is okay. I am taking what i am sending.

But in second, received value pattern is like v0 + 5, v1 + 7, v2 + 7, v3 + 7, v4 + 5, v5 + 7 ... I didn't figure out why is this happening. 5 must be added to all. 

In second custom IP design, i am using stream template type and doing operation as this; 

ap_axis<8,2,5,6> tmp_1
A.read(tmp_1);
tmp_1.data = tmp_1.data + 5; // in first scenario it is commented out.
B.write(tmp_1);

I made the custom IP in HLS. A is for input stream data, B is for output stream data and they are the arguments of the function.

For being more clear about the problem, Vitis SDK expressions window in first and second scenario is shown below.

First:
data_1.PNG
Second:
data.PNG

Block design:
design.PNG

Also, i try the custom ip with testbench for second scenario, here is the result;

testbnch.PNG

 Thanks!

0 Kudos
1 Solution

Accepted Solutions
dgisselq
Scholar
Scholar
375 Views
Registered: ‎05-21-2015

@stu ,

Looks like you are getting confused by octal notation.  7 isn't being added, but 5.

322 + 5 (in octal) doesn't wrap, so it equals 327

325 + 5 (in octal again) this time wraps, since 5+5 >= 8.  So, let's take 5+5=10 and subtract the 8, you then get a 2 and carry the 1 onto the next digit.  The result is 332--just like you got.

Dan

View solution in original post

2 Replies
dgisselq
Scholar
Scholar
376 Views
Registered: ‎05-21-2015

@stu ,

Looks like you are getting confused by octal notation.  7 isn't being added, but 5.

322 + 5 (in octal) doesn't wrap, so it equals 327

325 + 5 (in octal again) this time wraps, since 5+5 >= 8.  So, let's take 5+5=10 and subtract the 8, you then get a 2 and carry the 1 onto the next digit.  The result is 332--just like you got.

Dan

View solution in original post

stu
Observer
Observer
368 Views
Registered: ‎02-14-2019

oh, yes. thanks for the quick answer  

0 Kudos