Hello,
I am trying to import and overlay the base.bit test for the PYNQ-Z2 board.
It works with Jupyter notebooks, but with Python, it causes errors.
overlay test code py_test2.py
from pynq import Overlay
base = Overlay(‘/home/xilinx/pynq/overlays/base/base.bit’)
(pynq-venv) xilinx@pynq:~/tmp$ python py_test2.py
Traceback (most recent call last):
File “/home/xilinx/tmp/py_test2.py”, line 2, in
base = Overlay(‘/home/xilinx/pynq/overlays/base/base.bit’)
File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/overlay.py”, line 348, in init
self.download()
File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/overlay.py”, line 424, in download
Clocks.set_pl_clk(i, div0, div1)
File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/ps.py”, line 303, in set_pl_clk
cls._instance.set_pl_clk(clk_idx, div0, div1, clk_mhz)
File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/ps.py”, line 309, in _instance
cls._real_instance = _ClocksZynq()
File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/ps.py”, line 581, in init
self._slcr_mmio = MMIO(self.SLCR_BASE_ADDRESS, 0x200)
File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/mmio.py”, line 73, in init
self.array = self.device.mmap(base_addr, length)
File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/embedded_device.py”, line 581, in mmap
raise EnvironmentError(“Root permissions required.”)
OSError: Root permissions required.
(pynq-venv) xilinx@pynq:~/tmp$
(pynq-venv) xilinx@pynq:~/tmp$ cat py_test2.py
from pynq import Overlay
base = Overlay(‘/home/xilinx/pynq/overlays/base/base.bit’)
(pynq-venv) xilinx@pynq:~/tmp$
Thanks,
Kiman