Xilinx virtual cable in PYNQ Z2 board

hi,

i am using pynq z2 board ,Viavado and Petalinux 2018.2

i am trying to debug the ila using Xilinx virtual cable, i tried many procedures which are available in the internet, but i am unable to get…

Please provide a step by step procedure for xilinx virtual cable with PYNQ z2 board.

1 Like

You must install the Digilent drivers while installing the Xilinx software.

You have to put the jumper on the upper row of pins of JP1, above PMODA, from the left two pins (SD) to the right (JTAG position).
Plug the board via a normal USB cable directly to a USB port of your development computer.

Start the board.
It will ignore the SD card, and be available directly from Vivado and Vitis.

I tested this with 2020.1 and 2020.2.

3 Likes

Do you guys know if its possible to use Virtual Cable over IP for Pynq Z2?
Thanks!

Hi @dvirdc,

There’s a community contributed driver for this. However, this is something I haven’t tried myself.

Mario

1 Like

In case anyone shows up here with the same query, here’s how I got the DebugBridge working on PYNQ (ZCU208, but platform should hopefully not matter).

  1. Place a Debug Bridge instance in your overlay block diagram using “AXI to BSCAN” mode and wire up the AXI bus so it is accessible from the PS (ZYNQ). Apparently the “BSCAN” part magically connects to the underlying boundary scan circuitry without any further user intervention. Spooky…

  2. The HWH file scanner does not currently (as of version 3.0.1) extract the debug bridge instance properly, so you’ll need to piece it together by hand. It turns out that finding your way around the .hwh file is actually not too hard but you’ll be using your “find” feature a lot. Here’s an example instantiation of a Debug Bridge on the python side of PYNQ (i.e. in an ipython notebook running on the hardware).

from pynq.lib import DebugBridge
from pynqutils.runtime.repr_dict import ReprDict
base = 0x800B0000
high = 0x800BFFFF
dd = {
    "phys_addr": base,
    "addr_range": high-base+1,
    "fullpath": "/debug_bridge_0",
    "parameters": {},
}
bridge = DebugBridge(ReprDict(dd))
  1. Start the XVC server on the ZYNQ platform (below I’m using the default port number 2542, but you can change that by passing the “serverPort” kwarg to the function below).
bridge.start_xvc_server()
  1. If your target is visible on your LAN, you should be able to open Vivado, open the Hardware Manager, and connect to a local device. If prompted, you can specify the host name as “localhost” and even provide the explicit port number if needed. If the target is attached to another computer, you can always forward that port via ssh, e.g.:
ssh -L 2542:$target_ip:2542 user_name@host_name
  1. For my use case, I also instantiated an ILA core in “native” mode in my overlay and this was visible once I opened the target in hardware manager.

  2. The limited documentation on the PYNQ “DebugBridge” class screams about making sure you close the XVC server before applying a new overlay. So…

if bridge.serverThread is not None:
    bridge.stop_xvc_server()

I hope this helps someone. Took me a bit of trial and error but it’s been a lifesaver.

1 Like