Does not get output when I use struct in HLS

Hello,

I am working a simple loop-back project using HLS and Pynq on ultra96 v2 board- I was able to get an output for the first picture but I didnt for the second- the only difference in the code is that I used struct in the second one.

Hi @AKINOLA_SAMUEL,

Welcome to the PYNQ community.

Structs are not supported in Vitis HLS to describe streams.
You should use the template ap_axiu<> or ap_axis<>

Mario

Hi @marioruiz ,

The structs was not to describe streams. I used ap_axis to describe streams

I was able to get an output for the first picture but I didnt for the second

Can you clarify this? Does the execution hang? or do you get something?

Your struct uses float, whereas the ap_axis uses integers, this could be you issue.

The execution did not hang- but nothing gets written to the output buffer- the value in the output buffer is 0.

Regarding the struct being float- I don’t think that is a problem- because I used the same implementation on bare metal and it worked well.

I would like to point out that i am sending 64bits data to the IP via DMA.
When I did a loop-back to grab the first 32bits of data that is sent - I realized that the IP isn’t receiving the correct data as shown in the images below- the forst one is the data that is sent why the second one is the output buffer

pynq11

What type is Position_Holonomic?

pynq5

@AKINOLA_SAMUEL,

I am not sure how that object maps to memory, but I am fairly confident that each element is bigger than 64-bit. Hence the mismatch.

If you want to create a custom datatype with numpy, you should use something like this:

Mario

Thank you very much- I was able to get it to work using the given format.

1 Like