PYNQ: PYTHON PRODUCTIVITY FOR ZYNQ

Login as xilinx cannot execute the command mode script

Hi,
I encountered the following problem.

If I login as xilinx, it has problem to execute the following command on PYNQ-Z1. Is it normal ? For batch mode executing on PYNQ-ZQ, does it mean it requires to login as root ? Or how do you usually execute the batch script in command mode in PYNQ-Z1 ? Thanks

xilinx@pynq:~/pynq/prj_tst/mlp_fl$ python3.6 mlp_float_test.py

Traceback (most recent call last):

File “mlp_float_test.py”, line 5, in

from pynq import Overlay                                                                                                    

File “/usr/local/lib/python3.6/dist-packages/pynq/init.py”, line 30, in

from .gpio import GPIO                                                                                                      

File “/usr/local/lib/python3.6/dist-packages/pynq/gpio.py”, line 33, in

from .ps import CPU_ARCH, ZU_ARCH, ZYNQ_ARCH                                                                                

File “/usr/local/lib/python3.6/dist-packages/pynq/ps.py”, line 552, in

class _ClocksUltrascale(_ClocksMeta):                                                                                       

File “/usr/local/lib/python3.6/dist-packages/pynq/ps.py”, line 611, in _ClocksUltrascale

IOPLL_CTRL = Register(CRL_APB_ADDRESS + IOPLL_CTRL_OFFSET)                                                                  

File “/usr/local/lib/python3.6/dist-packages/pynq/ps.py”, line 93, in init

self._buffer = MMIO(address).array.astype(np.uint32, copy=False)                                                            

File “/usr/local/lib/python3.6/dist-packages/pynq/mmio.py”, line 81, in init

raise EnvironmentError('Root permissions required.')                                                                        

OSError: Root permissions required.

Exception ignored in: <bound method MMIO.del of <pynq.mmio.MMIO object at 0xb5ab4f70>>

Traceback (most recent call last):

File “/usr/local/lib/python3.6/dist-packages/pynq/mmio.py”, line 112, in del

os.close(self.mmap_file)                                                                                                    

AttributeError: ‘MMIO’ object has no attribute ‘mmap_file’

Start python as sudo

sudo python3.6 mlp_float_test.py

Cathal

Thanks for your prompt reply.