Problem with Using integrated logic analyzer (ILA) for Debugging with PYNQ

Hi all,

I am using pynq with a Jupyter notebook environment with a RFSoC ZCU111 board. I want to debug an overlay created by myself using ILA core in Vivado. I have inserted the ILA core into the design. Then I use the overlay class in pynq to program the device.
The problem that I am facing is that when I open the hardware manager in Vivado and connect to the board using the Jtag interface, I lose my Ethernet connection to the board and I cannot run the program anymore in Jupuyter notebook.
Any suggestion to help me out?

regards,
Reza

1 Like

Maybe add VIO so you can control the design?

hi, rock,

Is it expected to loose Ethernet connection once use of ILA debugging via the JTAG interface in Vivado on PYNQ as you know?

Hi,

Why does that happen?

I have the same problem. May be related to CPU Idle - see https://www.xilinx.com/support/answers/69143.html. To fix this seems to require a recompile of the board PYNQ boot image :frowning:

OK, it looks like it’s possible to fix this without recompiling PYNQ. Add a new file “uEnv.txt” to the SD card with the following line:
bootargs=root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1 uio_pdrv_genirq.of_id="generic-uio" clk_ignore_unused cpuidle.off=1

This adds cpuidle.off=1 to the rest of the default bootargs found from PYNQ/pynq_bootargs.dtsi at master · Xilinx/PYNQ · GitHub

Now the hardware manager seems to work and so does the Jupyter Notebook interface.

When you boot, you should see “Loaded environment from uEnv.txt” in the uBoot messages on the serial port.

Some info from:
https://forums.xilinx.com/t5/Embedded-Boot-and-Configuration/Not-Able-to-Debug-using-Hardware-Manager-in-ZCU102-revision-1-1/td-p/852542

4 Likes

Hi,

Thanks for the info.
In which directory should I add this file?

cheers,
Reza

2 Likes

Hi all,

I am attempting to do the same thing here so I can debug a driver design created in python on the jupyter notebooks hosted on my Kria KV260 board connected to vivado with the design’s hardware manager open.

Has anyone out there used this recently with PYNQ 3.0.1 or higher? I have this uEnv.txt file placed in the system-boot partition (See Below)

but still doesn’t allow the jupyter notebooks server to launch:

Any help/advice appreciated!
Cheers,
Cameron

In case anyone else is in the same boat - it is because this is a Kria KV/KR260 related issue. The format of the boot files is different from the Kria-PYNQ repo clone compared to the standard PYNQ repo, hence this fix of adding the .uEnv.txt doesn’t work in our case.

Instead consult this xilinx forum post: https://support.xilinx.com/s/question/0D54U00005u8v4nSAA/ubuntu-2204-hangs-when-trying-to-connect-to-kv260-via-vivado-hardware-manager?language=zh_CN

Which carries out the following steps to achieve the same outcome - preventing the cpu from idling:

  • Make a backup of the boot.scr.uimg file

  • Open the file up into asccii characters with the line:
    tail -c+73 < boot.scr.uimg > out

    • This will save a text doc of the appropriate section in a file called out
  • Edit the file by adding “cpuidle.off=1” to both lines under the line 73 (for KR and KV), as shown below:

  • Recompile this into the.uimg file with the line:
    mkimage -C none -A arm -T script -d out boot.scr.uimg

  • Add this new file back into the boot partition, replacing the old

  • Powering on the board now with this in the SD should show the jupyter server launching as successful

Regards,
Cameron