The PYNQ3.0 framework is used on KRIA KV260 for hardware acceleration of convolutional neural networks. The convolutional neural network is successfully made into an IP core. In the PYNQ3.0 framework, the mmap method in the script is called to read the .bit file design information. During the memory mapping process, the /mem driver device in the /dev folder cannot be accessed. Try to directly modify the /dev/mem permissions or comment out the root user permission check in the script, but the following problem still occurs.
Regarding the permission check code in the comment script, the /dev/mem device driver cannot be accessed
Thank you for your reply. Maybe I didn’t express it clearly before. I want to introduce ROS 2 (Robot Operating System) into PYNQ3.0 framework and implement it on Xilinx kria kv260 platform. I have successfully completed the PL-side acceleration module design, but when calling the overlay method to load the .bit file in the pynq3.0 framework, an error occurs: the /mem driver device in the /dev folder cannot be accessed. I tried to directly modify the /mem or /uio permissions to allow ordinary users (Ubuntu) to have access rights, but the same error still occurs. Since my call to the overlay class in the pynq3.0 framework is a part of the top-level instruction, the top-level instruction of the step where I reported the error is: ros2 run forest_mnist_cnn_fpga_node fpga_node, which means running a ROS 2 function node that obtains the data to be processed from the PS side and passes it to the PL-side acceleration module for processing. Since commands in ROS 2 can only be run in normal mode, sudo cannot be added directly before the top-level command. Try to write a separate program named load_overlay.py for the call of the overlay class under the pynq3.0 framework and give root privileges to run it. The problem of not finding the pynq module occurs. Check that the installation path and environment settings of the pynq module are correct. The reason for this problem is that a virtual operating environment is built under the pynq framework, and load_overlay.py is not running in the virtual operating environment. The error message is as follows, and the source code of the load_overlay.py program is attached。
load_overlay.py.txt (410 Bytes)
You should source the env
ok,thank you very much!
Execute the operation: source /etc/profile.d/pynq_venv.sh. The same problem still occurs. The virtual environment configuration is as follows
The issue is that you’re running the source with the regular user, root should source the script. You can try something like
sudo source /etc/profile.d/pynq_venv.sh && sudo python3 ....