Xilinx / PYNQ

Python Productivity for ZYNQ
http://www.pynq.io/
BSD 3-Clause "New" or "Revised" License
1.95k stars 808 forks source link

Fixed module disappearing outside pr area #1437

Open tignear opened 6 months ago

tignear commented 6 months ago

Assume that the static area contains the following modules.

When I reconfigured the "processor", the "processor_enable" module disappeared. It should be correct that it doesn't disappear, so I'll fix it that way.

mariodruiz commented 5 months ago

Hi @tignear,

Thank you for your contribution. We will review this for the next release.

STFleming commented 4 months ago

Hi @tignear, would it be possible to get a .hwh file so that we can investigate this issue that this PR fixes before evaluating if we can merge it onto the next release branch.

Thanks so much.

tignear commented 3 months ago

project.zip

ol = Overlay("toplevel.bit")
ol.pipeline_enable # => ok
ol.pipeline.download("image_processor_id_partial.bit")
ol.pipeline_enable
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [13], in <cell line: 1>()
----> 1 ol.pipeline_enable

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/overlay.py:363, in Overlay.__getattr__(self, key)
    358 """Overload of __getattr__ to return a driver for an IP or
    359 hierarchy. Throws an `RuntimeError` if the overlay is not loaded.
    360 
    361 """
    362 if self.is_loaded():
--> 363     return getattr(self._ip_map, key)
    364 else:
    365     raise RuntimeError("Overlay not currently loaded")

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/overlay.py:931, in _IPMap.__getattr__(self, key)
    929     return mem
    930 else:
--> 931     raise AttributeError(
    932         "Could not find IP or hierarchy {} in overlay".format(key)
    933     )

AttributeError: Could not find IP or hierarchy pipeline_enable in overlay
mariodruiz commented 3 months ago

Hi @tignear,

Can you try to rename pipeline_enable to something that does not start with pipeline?

Which board are you using?

tignear commented 3 months ago

Can you try to rename pipeline_enable to something that does not start with pipeline?

It will work if I do that.

Which board are you using?

https://digilent.com/reference/programmable-logic/pynq-z1/start