I am successfully programming the FPGA on my KV260 board using PYNQ overlays. I’m reading registers from an IMU. I would like to be able to get that data into a separate script running c++ but I’m getting errors when I try to run my overlay script in a .py file. It says I need root permissions. So, a couple questions:
Is there something special going on behind the scenes with Jupyter Notebook?
Is it possible to run .py scripts using the PYNQ library?
Thanks! That worked for running the .py script. What I’m hoping to do now is actually get the data from that script and use it in a ROS node elsewhere. Do you have any suggestions on how to do that? I basically want to use pynq to download the bitstream once and then continuously read/write from registers on my peripheral. I want to then grab the data from a different script unrelated to pynq, but I’m having trouble doing this. Thank you!!
From the sounds of it, you need a driver. If it is a simple IP with only MMIO registers, you could use a mmap userspace driver.
For large data movement, it is more complicated and outside of the scope of this forums. You will need to do contiguous memory allocation among other things. You can try to use the XRT APIs. For questions related to this, you may be better off posting in the Xilinx forums.
For the mmap userspace driver, you can check Shane’s post.