Overlay object not found

PYNQ version 2.5 & PYNQ-Z2 & Vivado 2019.1

Hi, I am currently working on a project including a timer. When including the timer, I can generate the bitstream, and use the .tcl, .hwh and .bit files on the board. The timer is detected on the overlay, but the object is not detected. I can use my PWM analyzer just fine.

snippet :

from pynq import Overlay
ol = Overlay(“design_emulator.bit”) # load the design
ol.axi_timer_0?


design_emulator.tcl (7.8 KB)
design_emulator.bit (3.9 MB)

design_emulator.hwh (186.8 KB)

@AFTT

Welcome to PYNQ community =]

Post the address map table as well.
ENJOY~

Hi, thanks for the reply.
I’m not sure how to find that, which file is needed ?

I think that’s what you asked for

@AFTT

If you code it as:

tmr = ol.axi_timer_0
tmr?

Will this the same?

ENJOY~

It raises a key error, I can not access the object. I will send the trace in the morning.

Regards,
AF.

@AFTT

Interesting, I cannot see the issue you had.
My Image is PYNQ 2.7.

Maybe try direct addressing the address:
https://pynq.readthedocs.io/en/v2.5/pynq_libraries/mmio.html?highlight=mmio

I see v2.6 removed support for .tcl file and is using .hwh file for the overlay, do you know if I can select to generate the overlay with .tcl or .hwh in v2.5?

Regards,
AF

Here is the trace :

Traceback (most recent call last):
File “/home/xilinx/jupyter_notebooks/E_CONTROL_2023_SP_EMULATOR/emulator.py”, line 16, in
timer = ol.axi_timer_0
File “/usr/local/lib/python3.6/dist-packages/pynq/overlay.py”, line 337, in __ getattr __
return getattr(self._ip_map, key)
File “/usr/local/lib/python3.6/dist-packages/pynq/overlay.py”, line 737, in __getattr __
driver = ipdescription’driver’
File “/usr/local/lib/python3.6/dist-packages/pynq/overlay.py”, line 602, in __init __
setattr(self, interrupt, Interrupt(details[‘fullpath’]))
File “/usr/local/lib/python3.6/dist-packages/pynq/interrupt.py”, line 98, in __init __
_InterruptController.get_controller(parentname))
File “/usr/local/lib/python3.6/dist-packages/pynq/interrupt.py”, line 159, in get_controller
ret = _InterruptController(name)
File “/usr/local/lib/python3.6/dist-packages/pynq/interrupt.py”, line 177, in __init __
self.mmio = MMIO(PL.ip_dict[name][‘phys_addr’], 32)
KeyError: ‘’

@AFTT

Hand it to @cathalmccabe or @marioruiz
I cannot see the reason behind the issue you are facing.
For 2.7 Image no issue found maybe older version is more unstable?

ENJOY~

@AFTT

Incase you can double check my blocks:


Adding an interrupt controller seems to be fixing my issue so far. I’ll update this thread if running into more issues.
Thanks for the help.
AF


image

@AFTT

Can you repeat the same issue after removing the AXI-interrupt?
I am confused by adding additional AXI interrupt resolve the issue?
How about without interrupt connecting and ZYNQ interrupt is disable?

Enjoy~

Hi,

Yes if I remove the AXI interrupt controller I reproduce the error, adding it back seems to make the setup work fine.

I’m unsure what you ask me to try, remove the IRQ connection between the controller and the PS and disabling IRQ port on PS?

Regards,
AF

@AFTT

Yes disable the interrupt function in ZYNQ block and leave the irq open.
If this also introduce the same issue?

ENJOY~

Hi,

No there is no issue if I disable the interrupt (I just can not use the interrupt), I can apparently access the registers. The IP is loaded without interrupt.

Regards,
AF

@AFTT

@marioruiz
Could help a bit on such behavior on PYNQ 2.5 image.
Why additional AXI interrupt blocks is needed?

ENJOY~

Earlier versions of PYNQ required an interrupt controller, in the latest version a single interrupt can be connected directly to the IRQ pin. More than one interrupt, requires an interrupt controller.