Interrupt controller error when inside block diagram hierarchy

Hi guys, first I would like to thank you for the development of the project and for all the support offered.

I’d like to report a bug I encountered while implementing an AXI interrupt controller IP within a block design hierarchy (in the following example called emg_acq_hier).

When the AXI interrupt controller IP is within a hierarchy (that is, it is not at the top level of the block design), the following error occurs when I try to access the overlay dma ip (also inside the hierarchy) on the jupyter notebook:

KeyError Traceback (most recent call last)
Input In [19], in <cell line: 1>()
----> 1 ol.emg_acq_hier.axi_dma_0

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/overlay.py:904, in _IPMap.getattr(self, key)
902 ipdescription = self._description[“ip”][key]
903 try:
→ 904 driver = ipdescription"driver"
905 except UnsupportedConfiguration as e:
906 warnings.warn(
907 “Configuration if IP {} not supported: {}”.format(key, str(e.args)),
908 UserWarning,
909 )
File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/lib/dma.py:593, in DMA.init(self, description, *args, **kwargs)
587 if type(description) not in [dict, ReprDict] or args or kwargs:
588 raise RuntimeError(
589 "You appear to want the old DMA driver which "
590 "has been deprecated and moved to "
591 “pynq.lib.deprecated”
592 )
→ 593 super().init(description=description)
594 self.description = description
596 if “parameters” not in description:

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/overlay.py:707, in DefaultIP.init(self, description)
705 for interrupt, details in self._interrupts.items():
706 try:
→ 707 setattr(self, interrupt, Interrupt(details[“fullpath”]))
708 except ValueError as e:
709 warnings.warn(“Interrupt {} not created: {}”.format(interrupt, str(e)))

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/interrupt.py:65, in Interrupt.init(self, pinname)
63 if pinname not in PL.interrupt_pins:
64 raise ValueError(“No Pin of name {} found”.format(pinname))
—> 65 parent, self.number = _InterruptController.get_parent(
66 PL.interrupt_pins[pinname])
68 self.parent = weakref.ref(parent)
69 self.event = asyncio.Event()

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/interrupt.py:152, in _InterruptController.get_parent(entry)
150 return dev, 0
151 else:
→ 152 return _InterruptController.get_controller(parent), number

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/interrupt.py:122, in _InterruptController.get_controller(name)
120 if con.name == name:
121 return con
→ 122 ret = _InterruptController(name)
123 _InterruptController._controllers.append(ret)
124 return ret

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/interrupt.py:177, in _InterruptController.init(self, name)
173 # Disable Interrupt lines
174 self.mmio.write(0x08, 0)
176 self.parent, self.number = _InterruptController.get_parent(
→ 177 PL.interrupt_controllers[name])

KeyError: ‘emg_acq_hier/axi_intc_0’

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/interrupt.py:152, in _InterruptController.get_parent(entry)
150 return dev, 0
151 else:
→ 152 return _InterruptController.get_controller(parent), number

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/interrupt.py:122, in _InterruptController.get_controller(name)
120 if con.name == name:
121 return con
→ 122 ret = _InterruptController(name)
123 _InterruptController._controllers.append(ret)
124 return ret

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/interrupt.py:177, in _InterruptController.init(self, name)
173 # Disable Interrupt lines
174 self.mmio.write(0x08, 0)
176 self.parent, self.number = _InterruptController.get_parent(
→ 177 PL.interrupt_controllers[name])

KeyError: ‘emg_acq_hier/axi_intc_0’

if I check the overlay’s interrupt_controllers variable, I get the following: dict_keys([‘emg_acq_hier_axi_intc_0’])

ol.interrupt_controllers.keys()

dict_keys([‘emg_acq_hier_axi_intc_0’])

I think it should be “emg_acq_hier/axi_intc_0” or “emg_acq_hier.axi_intc_0”

If i change the block design in vivado, putting the AXI interrupt controller in the top level, everything works fine.

best regards.
Ricardo Molinari