PYNQ: PYTHON PRODUCTIVITY

Error loading bitstream to PYNQ. AttributeError: 'NoneType' object has no attribute 'get'

Hello !
I have been trying to implement a 1dfilter HLS core found in these tutorials, the HLS code is provided and synthesizes just fine.
Followed the details of the Block Design, and the bitstream tcl and hwh files are generated fine.
here is what my BlockDesign looks like :
DeployFiliter.pdf (93.5 KB)
here are my HWH and TCL files :
DeployFiliter.hwh (442.8 KB)
DeployFiliter.tcl (29.5 KB)

But i am getting an error while trying to load my bitstream to PYNQ (following this tutorial).
using Vivado 2020.1 on a PYNQ v2.6

What i tried :
The same error was already posted here and i tried checking the suggested solution (looking at the size of interrupts and concatenating them), but mine seemed already fine. So it didn’t work for me.

Tried removing the interrupt parts all together from the block Design, and i am still getting the same exact error while loading the bistream in the PYNQ.

Tried not using the streamOverlay() helper function they used in the tutorial and using the usual Overlay() one, they both gave the same output below.

from pynq import Overlay
overlay=Overlay('/home/xilinx/pynq/overlays/stream/stream.bit')
AttributeError                            Traceback (most recent call last)
<ipython-input-4-caa847768b6d> in <module>()
      1 from pynq import Overlay
----> 2 overlay=Overlay('/home/xilinx/pynq/overlays/stream/stream.bit')

/usr/local/lib/python3.6/dist-packages/pynq/overlay.py in __init__(self, bitfile_name, dtbo, download, ignore_version, device)
    339         self._register_drivers()
    340 
--> 341         self.parser = self.device.get_bitfile_metadata(self.bitfile_name)
    342 
    343         self.ip_dict = self.gpio_dict = self.interrupt_controllers = \

/usr/local/lib/python3.6/dist-packages/pynq/pl_server/device.py in get_bitfile_metadata(self, bitfile_name)
    777         hwh_path = get_hwh_name(bitfile_name)
    778         if os.path.exists(hwh_path):
--> 779             return HWH(hwh_path)
    780         else:
    781             raise ValueError("Cannot find HWH file for {}.".format(

/usr/local/lib/python3.6/dist-packages/pynq/pl_server/hwh_parser.py in __init__(self, hwh_name)
    197         self.match_ports()
    198         self.match_pins()
--> 199         self.add_gpio()
    200         self.init_interrupts()
    201         self.init_mem_dict()

/usr/local/lib/python3.6/dist-packages/pynq/pl_server/hwh_parser.py in add_gpio(self)
    444                     self.ps_name, self.family_gpio))
    445             if mod is not None:
--> 446                 din = int(mod.find(".//*[@NAME='DIN_FROM']").get('VALUE'))
    447                 for p in mod.iter("PORT"):
    448                     if p.get('DIR') == 'O':

AttributeError: 'NoneType' object has no attribute 'get'

I am running out of ideas (because am still new at all of this, thanks to the very nice people who already help me all the time in this forum.

I was facing the same problem. Have you used the Interrupt controller in between ps and concat? Mine was solved using interrupt controller as following:
all interrupts lines → Concat → Axi interrupt controller → Concat → PS.
(assuming you have not mistakenly forgotten about placing the HWH file along with the bitstream)

Edit: I haven’t changed any configuration in AXI interrupt controller. Seems like you might have changed.

1 Like

I think this may be an issue with the HWH parsing and the PS GPIO because you only have a single output pin. The HWH parser expects a “DIN_FROM” expression, but the GPIO description in the HWH may be in a different format. Could you post your HWH?

One workaround may be to use a slice block between the PS GPIO and the port you want to connect the wire to.
However, I notice you have two reset blocks in this design. You may be testing your design, but you shouldn’t need to have that separate reset block with the PS GPIO to control it. If you remove one block and remove the PS GPIO that is being used as a reset then I think the issue will go away.

Cathal

3 Likes

Hi ! and thank you for your answer,
Here is my TCL and HWH, (i will also add it to the OP).

DeployFiliter.tcl (29.5 KB)
DeployFiliter.hwh (442.8 KB)

I will try using a slice and remove the PS GPIO parts and come back with the feedback tonight.

Hi, Yes i did change some things in the interrupt controller (switched it from being controlled by LEVEL to Edge), both gave the same results.
from what i got, your issue was that the interrupt going in the PS was size [0:2], making it [0:0] after a concat solved it.
Thanks again for taking the time to answer me !

2 Likes

Hi !
Using a Slice between the GPIO and the reset ports (where i was taking it to) solved my problems.

I would really love to know the thought process behind adding a slice there because i just moronically applied what you suggested i would never have guessed it by myself.

thanks again for everything @cathalmccabe .

1 Like