/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/overlay.py in getattr(self, key)
364 “”"
365 if self.is_loaded():
→ 366 return getattr(self._ip_map, key)
367 else:
368 raise RuntimeError(“Overlay not currently loaded”)
/usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/overlay.py in getattr(self, key)
901 return mem
902 else:
→ 903 raise AttributeError(
904 “Could not find IP or hierarchy {} in overlay”.format(key))
905
AttributeError: Could not find IP or hierarchy iop_pmoda in overlay
Hi marioruiz,
Thank you so much!
I can overlay my bit stream file successful, but there is another issue while I want to use Xilinx exampler to import LED and Button function on my PYNQ-Z2 platform.
It would appeared error message "BaseOverlay’ has no attribute ‘leds’,
AttributeError Traceback (most recent call last)
in
7 rgbled_position = [4,5]
8
----> 9 for led in base.leds:
10 led.on()
11 while (base.buttons[3].read()==0):
The following code was copy from xilinx/pynq/base/board/_btns_leds.ipynb
Would you please also help give some comment for which of mistake from it?
AttributeError: type object ‘BaseOverlay’ has no attribute ‘leds’
from pynq.overlays.base.base import BaseOverlay
base = BaseOverlay
for led in base.leds:
led.on()
while (base.buttons[3].read()==0):
if (base.buttons[0].read()==1):
color = (color+1) % 8
for led in rgbled_position:
base.rgbleds[led].write(color)
base.rgbleds[led].write(color)
sleep(Delay1)
elif (base.buttons[1].read()==1):
for led in base.leds:
led.off()
sleep(Delay2)
for led in base.leds:
led.toggle()
sleep(Delay2)
elif (base.buttons[2].read()==1):
for led in reversed(base.leds):
led.off()
sleep(Delay2)
for led in reversed(base.leds):
led.toggle()
sleep(Delay2)
print(‘End of this demo …’)
for led in base.leds:
led.off()
for led in rgbled_position:
base.rgbleds[led].off()