PYNQ: PYTHON PRODUCTIVITY

CMA array with np.int32 data type error

Hi,
I need to transfer an array of data type is int32 from PL to PS, and I create an array by using cma_array with data type is np.int32 as follows,
Screenshot from 2020-10-21 10-17-17

As showed in the screenshot, there is an error message “Bus error” and Python got crash.

My board is ZCU102 and PYNQ version is 2.5.

Thanks.

I’m using this and it is working can you try it?
from pynq import allocate
from pynq import Overlay
ol = Overlay(“something.bit”)
arr = allocate(shape=(512, 16), dtype=np.int32)

@bartokon, still the same error. Which version of pynq and board are you use?

image
Image v2.5.1
git clone https://github.com/Xilinx/PYNQ.git -b v2.5.1
Eclypse-Z7

maybe I should try 2.5.1 tomorrow, thanks!

I upgrade PYNQ from 2.5 to 2.5.4, on my Ultra96-v2, still have the same issue…

Check your device-tree. You could forget about dma ?xilinx apf? drivers and device-tree addons for xlnk

Hi @bartokon, thanks your suggestion!
I don’t understand the device-tree you mean, and the the relationship between this error with DMA.
But I google for “Xilinx APF” and found this post
Enabling Xilinx APF Accelerator Driver in PetaLinux, the author mentioned similar problem which is failed to open “/dev/xlnk”. Then he added several configurations about DMA and APF into petalinux configurations.(I don’t familiar with petalinux neither)
Then I looking into the Ultra96-v2 PYNQ image repository and found the configuration file, but do not see any configuration about DMA and APF, could this be the possible cause? If yes, what should I do?
BTW, I upgrade my PYNQ on Ultra96-v2 by using pip3.

Thanks again.

add this to device-tree

zyxclmm_drm {		compatible = "xlnx,zocl";		status = "okay";	};

and add Xilinx APF support.

You could try one of this ready images: https://github.com/Avnet/Ultra96-PYNQ/releases

The Best thing you can do is try to learn how petalinux works and wait for someone from pynq to help you out :slight_smile:

@bartokon, thanks for your help, I will try Avnet’s image later.