PYNQ-Z2 Numpy Data Movement Tutorial does not work as expected

  • PYNQ version & Board name & Tool Version
    Board: PYNQ-Z2
    Image: V3.0.1

  • Full details of the error message you see, or a detailed description of the problem you experience.
    I ran through the tutorial under get_started, in the 2nd one named 2_python_environment.ipynb, Numpy Data Movement section is not working properly. It seems like pynq.allocate() does not work and causes a runtime error. See the following screenshot. I did not change any codes in this Jupyter notebook. Can anyone explain why this happens and help me fix this issue? Thanks in advance for any help.

  • Steps to reproduce the problem, and if needed: source code and bitstream or any relevant files
    Just run the 2nd tutorial under the get_started directory.

By setting a breakpoint right above the allocate function, I traced it down to

The problem is that the global state file does not exist under the pl_server directory.

Does anyone know where is this file? Did I make some mistakes that leads to the loss of the file? Please let me know where I can find this file or reproduce this file. Thanks!

Hi @qianyich,

Welcome to the community!

Thanks for reporting this. I believe I know what might be the issue; that file is created when an overlay is downloaded. A download of the base overlay should happen on boot – but for some reason, the file is not being created. Would you mind running cells 1 & 2 of notebook 4_base_overlay_iop.ipynb


Then try rerunning 2_python_environment.ipynb and report back?

Many thanks,

1 Like

Hi Shane,

Thank you for your help! It works, but the physical address part does not output anything.

In debug mode, I can see the pl_buffer_address is 0x1684a000, but it did not show up after running.

Could you please help me with this?

Hi Shane,

I figured it out. The outputs field is not filled in Jupyter Notebook so it did not output something like Out[num]: result. I am not much concerned about this. I will use a print statement instead.


1 Like


I can confirm this behaviour (Kria KV260 / Unbuntu 20.04 / PYNQ v1.0).
As a workaround, I have replaced the line:



1 Like