📈
Ween's Lab
UdemyYouTubeTikTok
  • Welcome
  • 📻FPGA Tutorials
    • FPGA Boards: Getting Started
      • Getting Started with PYNQ on Kria KV260 Vision AI Starter Kit
      • Getting Started with PYNQ on Red Pitaya STEMlab 125-14
      • Getting Started with PYNQ on ZYBO
    • FPGA Ethernet Tutorial
      • FPGA Tutorial Ethernet 1: Simple TCP Server
    • PYNQ FPGA Tutorial 101
      • Part 0: Introduction
      • Part 1: GPIO
      • Part 2: Custom IP
      • Part 3: Memory
      • Part 4: ANN Processor
    • PYNQ FPGA Tutorial 102
      • Part 0: Introduction
      • Part 1: Memory Mapped
      • Part 2: Direct Memory Access
      • Part 3: AXI-Lite Multiplier
      • Part 4: AXI-Stream Multiplier with DMA
      • Part 5: AXI-Lite GCD
      • Part 6: AXI-Stream GCD with DMA
      • Part 7: Access to DDR from PL
    • ZYNQ FPGA Tutorial
      • Part 1: Gate-Level Combinational Circuit
      • Part 2: RT-Level Combinational Circuit
      • Part 3: Regular Sequential Circuit
      • Part 4: FSM Sequential Circuit
      • Part 5: ZYNQ Architecture
      • Part 6: ARM CPU and FPGA Module
      • Part 7: FPGA Memory
      • Part 8: Hardware Accelerator for Neural Networks
    • ZYNQ FPGA Linux Kernel Module
      • Cross Compiling Kernel, Kernel Module, and User Program for PYNQ
      • Configure PL to PS Interrupt in Kernel Module
      • Configure AXI DMA in Kernel Module
  • 📟Proyek Arduino
    • Kumpulan Proyek
      • Rangkaian LED
      • LED Berkedip Nyala Api
      • LED Chaser
      • LED Binary Counter
      • OLED 128x4 Bitcoin Ticker
      • Rangkaian Button
      • Button Multifungsi
      • Button Interrupt
      • Button Debouncing
    • Pelatihan Mikrokontroler Arduino ESP32
      • Bab 1 Pengenalan Mikrokontroler
      • Bab 2 Pengenalan Arduino
      • Bab 3 Pengenalan Bahasa C
      • Bab 4 Digital Output
      • Bab 5 Digital Input
      • Bab 6 Serial Communication
      • Bab 7 Analog-to-Digital Conversion
      • Bab 8 Interrupt
      • Bab 9 Timer
      • Bab 10 Pulse-Width Modulation
      • Bab 11 SPI Communication
      • Bab 12 I2C Communication
  • 💰Finance
    • Coding for Finance
      • Build a Bitcoin Price Alert with Google Cloud and Telegram
      • Build a Bitcoin Ticker with ESP32 and Arduino
      • Stock Price Forecasting with LSTM
    • Trading dan Investasi
      • Istilah Ekonomi, Keuangan, Bisnis, Trading, dan Investasi
      • Jalan Menuju Financial Abundance
      • Memahami Korelasi Emas, Oil, Dollar, BTC, Bonds, dan Saham
      • Mindset Trading dan Investasi
      • Rangkuman Buku: Rahasia Analisis Fundamental Saham
      • Rangkuman Buku: The Psychology of Money
      • Rangkuman Kuliah: Introduction to Adaptive Markets
      • Rumus Menjadi Orang Kaya
  • 📝Life
    • Life Quotes
Powered by GitBook
On this page
  • Kria KV260 Vision AI Starter Kit
  • MicroSD Setup
  • Install PYNQ Framework
  • Setup Static IP
  • Jupyter Notebook
  • Graphical User Interface
  • Download and Upload File
  • Vivado Installation
  • References
  1. FPGA Tutorials
  2. FPGA Boards: Getting Started

Getting Started with PYNQ on Kria KV260 Vision AI Starter Kit

PreviousFPGA Boards: Getting StartedNextGetting Started with PYNQ on Red Pitaya STEMlab 125-14

Last updated 5 months ago

Kria KV260 Vision AI Starter Kit

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.

Resource
Zybo Z7-10
PYNQ Z1/Z2
Kria K26
ZCU104
RFSoC 4x2

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

MicroSD Setup

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.

Required programs:

How to write the image to a microSD card:

  1. Extract the file with WinRAR.

  2. 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.

How to boot the board:

  1. Insert the microSD card into the Kria board, connect the micro USB cable to the PC, and connect the power supply.

  2. 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

  3. The default username and password are:

    • Username: ubuntu

    • Password: ubuntu

  4. 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.

How to turn off the board:

sudo shutdown -h now

Install PYNQ Framework

To use the PYNQ library, you need to install it first from GitHub.

  1. 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.

  2. Clone PYNQ from GitHub, go to the folder, and then run the installation script.

git clone https://github.com/Xilinx/Kria-PYNQ.git
cd Kria-PYNQ/
sudo bash install.sh -b KV260
  1. 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.

  2. How to restart the board:

sudo reboot
  1. Wait until the PYNQ installation is completed.

Setup Static IP

If you want to connect to the board via Ethernet directly from the laptop, you need to set up a static IP.

  1. Run this command:

sudo nano /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
  1. Add this to the file:

network: {config: disabled}
  1. Change the IP setting from DHCP to static:

sudo nano /etc/netplan/50-cloud-init.yaml
  1. Add this to the file:

network:
    renderer: NetworkManager
    version: 2
    ethernets:
      eth0:
        dhcp4: no
        addresses: [192.168.2.1/20]
        nameservers:
          addresses: [8.8.8.8,8.8.4.4]
  1. Reboot the board:

sudo reboot
  1. Check your IP address:

ifconfig

Jupyter Notebook

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

Graphical User Interface

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.

Download and Upload File

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:

The connections required are:

  • Host: 192.168.2.1

  • Username: ubuntu

  • Password: xilinx_kria

  • Port: 22

Vivado Installation

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.

References

Win32DiskImager ()

PuTTY ()

Download the Kria Ubuntu Desktop 22.04 LTS image file:

FileZilla ()

Getting Started Kria KV260,

PYNQ for Kria,

How to set up static IP address on Ubuntu,

📻
https://win32diskimager.org/
https://www.putty.org/
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
https://filezilla-project.org/
https://www.amd.com/en/products/system-on-modules/kria/k26/kv260-vision-starter-kit/getting-started/getting-started.html
https://github.com/Xilinx/Kria-PYNQ
https://www.freecodecamp.org/news/setting-a-static-ip-in-ubuntu-linux-ip-address-tutorial/