My XSA won't load, how do I load my overlay through the hwh and bit method instead?

When I try to load my XSA I get the error message shown below.
How do I load my overlay via the hwh and bit method instead?


KeyError Traceback (most recent call last)
Input In [1], in <cell line: 2>()
1 from pynqmetadata.frontends import Metadata
----> 2 md = Metadata(‘register_interface.xsa’)

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/metadata.py:41, in Metadata(input)
39 return HwhFrontend(_hwhfile=input)
40 elif str(input).endswith(“.xsa”):
—> 41 return XsaFrontend(input=input)
42 elif str(input).endswith(“.json”):
43 return JsonFrontend(input=input)

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/xsa_frontend.py:24, in XsaFrontend(input)
22 xsa = XsaParser(input)
23 xsa.load_bdc_metadata()
—> 24 md = HwhFrontend(_hwhfile=xsa.defaultHwhPaths[0])
25 md.ext[“xsa”] = XsaObjectExtension(xsa=xsa)
26 for b in md.blocks.values():

File :25, in init(self, name, type, generic_type, _parent, _children, ref, ext, _timestamp, hierarchy_name, ports, parameters, blocks, modules, busses, _hierarchies, _hwhfile, _element_tree, _root, _logical2physical_portmap, _physical2logical_portmap, _logical2physical_extern_pm, _physical2logical_extern_pm)

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/hwh_frontend.py:219, in HwhFrontend.post_init(self)
207 “”"
208 Performs the parsing of the hwh into the metadata model
209 * checks to see if the hwhfile is an XML string or a
(…)
216 * Performs a connectivity pass
217 “”"
218 if self._hwhfile != “”:
→ 219 self.parse()

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/hwh_frontend.py:240, in HwhFrontend.parse(self)
237 self._construct_logical2physical_extern_pm()
238 self._create_external_ports()
→ 240 self.resolve_addressing()
241 self.connect_signals()
243 self.refresh()

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/hwh_frontend.py:596, in HwhFrontend.resolve_addressing(self)
589 def resolve_addressing(self) → None:
590 “”"
591 For all the subordinate ports in the design and manager ports
592 grab all the addressing information
593 WARNING: This should only be called after all the cores and ports
594 have been populated.
595 “”"
→ 596 self._resolve_subordinate_addressing()
597 self._populate_subordinate_regmap()
598 self._resolve_manager_address_maps()

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/hwh_frontend.py:452, in HwhFrontend._resolve_subordinate_addressing(self)
450 for i in self._root.iter(“MEMRANGE”):
451 if i.get(“MEMTYPE”) == “REGISTER” or i.get(“MEMTYPE”) == “MEMORY”:
→ 452 core = self.blocks[i.get(“INSTANCE”)]
453 port = core.ports[i.get(“SLAVEBUSINTERFACE”)]
454 if isinstance(port, SubordinatePort):

KeyError: ‘AXI’

How are you getting your files into your board? Are you using JupyterLab and dragging and dropping the files into the file directory areas? I recommend on your PC to unzip the XSA file after Vivado creates and extract it to a folder. Then step into that folder. You should find the .bit and hwh files. You can drag and drop those up to board. Chrome is my preferred browser. That would be the easiest method. Place them in an overlay directory of your choice and you can do the following:
ol = pynq.Overlay(‘myproject.bit’)

That should get you setup if you have all the files staged first.

Regards,
-N

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.