Getting Started with PYNQ on Kria KV260 Vision AI Starter Kit
Last updated
Last updated
Kria KV260 Vision AI Starter Kit is an out-of-the-box platform for vision AI applications. Apart from that, there is also a Kria KR260 Robotics Starter Kit variant specifically for robotic applications.
The following table contains a comparison of FPGA resources from Kria K26 with other FPGAs.
System Logic Cells
28000
85000
256200
504000
930300
CLB Flip-Flops
35200
106400
234240
460800
850560
CLB LUTs
17600
53200
117120
230400
425280
Distributed RAM (Mb)
-
-
3.5 Mb
6.2 Mb
13.0 Mb
Block RAM Blocks
60 (2.1Mb)
140 (4.9Mb)
144 (5.1Mb)
312 (11.0Mb)
1080 (38.0Mb)
UltraRAM Blocks
-
-
64
96 (27.0Mb)
80 (22.5Mb)
DSP Slices
80
220
1248
1728
4272
Even though this board is called an "out-of-the-box" platform, unfortunately the Micro SD card you get has not been setup (pre-installed), so we have to setup it ourselves, unlike other boards, which are usually pre-installed.
Win32DiskImager (https://win32diskimager.org/)
PuTTY (https://www.putty.org/)
Download the Kria Ubuntu Desktop 22.04 LTS image file: https://people.canonical.com/~platform/images/xilinx/kria-ubuntu-22.04/iot-limerick-kria-classic-desktop-2204-x07-20230302-63.img.xz?_ga=2.254269064.1050802735.1707119536-1471661080.1707119536
Extract the file with WinRAR.
Write the image file to the microSD card with the Win32DiskImager program.
Select Image File: iot-limerick-kria-classic-desktop-2204-x07-20230302-63.img
Select Device: adjust to the microSD device on your laptop or computer.
Select Write to write the image.
Insert the microSD card into the Kria board, connect the micro USB cable to the PC, and connect the power supply.
Open the PuTTY program and set up a serial connection. Select the appropriate COM port by looking at Device Manager (Windows).
Baud rate = 115200
Data bits = 8
Stop bits = 1
Flow control = None
Parity = None
The default username and password are:
Username: ubuntu
Password: ubuntu
Then you will be asked to enter a new password:
New password: xilinx_kria
Important
If you want to turn off the board, you should shutdown it; don't immediately remove the power supply. This is done to avoid corrupted microSD, which can cause boot failure.
To use the PYNQ library, you need to install it first from GitHub.
Connect the board to a router connected to the internet with dynamic IP (DHCP) (in this example, I use a 4G router via Ethernet). If you have to use a static IP, the method is in the next section.
Clone PYNQ from GitHub, go to the folder, and then run the installation script.
Note: during the installation process, errors may occur due to an unstable internet connection. If this happens, you can restart the board (if needed) and repeat running the installation script.
How to restart the board:
Wait until the PYNQ installation is completed.
If you want to connect to the board via Ethernet directly from the laptop, you need to set up a static IP.
Run this command:
Add this to the file:
Change the IP setting from DHCP to static:
Add this to the file:
Reboot the board:
Check your IP address:
After the board is connected to the PC either directly or using a router, we can log in to Jupyter Notebook via a web browser:
URL: 192.168.2.1:9090
Password: xilinx
The Ubuntu 22.04 OS has a GUI feature, so we can connect an HDMI monitor, USB keyboard, and mouse to the board.
The Ubuntu 22.04 GUI appears on the monitor and the PuTTY console on the laptop.
The use of a monitor and keyboard is optional. For PYNQ development in this tutorial, a monitor and keyboard are not actually needed.
We replaced it with a PuTTY terminal via serial and a network connection with Ethernet to open Jupyter Notebook and transfer files with FileZilla.
To upload files, such as bitstreams, from the laptop to the board, you can use FileZilla via the Ethernet connection on the board.
Required programs:
FileZilla (https://filezilla-project.org/)
The connections required are:
Host: 192.168.2.1
Username: ubuntu
Password: xilinx_kria
Port: 22
Important
The version of Vivado that can be used for the Kria board is version 2021.1 or later. Because in the previous version, the board library was not available.
Several things you need to pay attention to when installing and using Vivado:
Do not install Vivado in a folder or sub-folder that has space. Because usually there will be errors during the synthesis process.
Don't create Vivado projects in folders such as: Users folder in C:, Program Files folder, or system folders that are protected or read only because usually there will be errors during the synthesis process.
Select Vitis during installation. These options include Vivado.
Just choose the device you need, for example Zynq-7000 (Zybo) or Zynq Ultrascale MPSoC (Kria), so it doesn't take up HDD/SSD space.
Continue installation until complete.
PYNQ for Kria, https://github.com/Xilinx/Kria-PYNQ
How to set up static IP address on Ubuntu, https://www.freecodecamp.org/news/setting-a-static-ip-in-ubuntu-linux-ip-address-tutorial/