Xilinx / PYNQ

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

DebugBridge fails to connect #1429

Closed jacopoabramo closed 6 months ago

jacopoabramo commented 1 year ago

Greetings,

I tried using the DebugBridge class together with the debug bridge IP in my design but could not make it work. I documented the problem in this post. Does the original author of this class have some idea on what am I doing wrong?

Thanks in advance.

Best,

Jacopo

fpjentzsch commented 6 months ago

Hi,

looks like a simple bug to me: The DebugBridge constructor checks if the description is of type ReprDict (this line) while other drivers, such as the DMA, check for ReprDict or dict (here).

I was able to work around this using:

from pynq.lib.debugbridge import DebugBridge
from pynqutils.runtime.repr_dict import ReprDict

bridge_desc = ReprDict(ol.ip_dict["debug_bridge_0"]) # ol is the Overlay
bridge = DebugBridge(bridge_desc)
bridge.start_xvc_server(bufferLen=4096, serverAddress="0.0.0.0", serverPort=2542, reconnect=True, verbose=True)
mariodruiz commented 6 months ago

That's a good point @fpjentzsch. That check is not really necessary, although it can be fixed as you suggest. Could you do a PR?

fpjentzsch commented 6 months ago

That's a good point @fpjentzsch. That check is not really necessary, although it can be fixed as you suggest. Could you do a PR?

Sure: https://github.com/Xilinx/PYNQ/pull/1445