Part 1
요약·해설
kv260_r5 configuration은 KV260 RPU를 지원합니다. R5 두 core를 각각의 TCM과 독립 실행하거나 TCM을 두 배로 사용하는 dual lock-step unit으로 구성할 수 있지만, 현재 Zephyr port는 첫 core만 지원합니다.

Cortex-R5 RPU, independent 또는 lock-step
application code/data는 DDR의 sram0
Linux APU의 remoteproc0
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
1223167F71EEE1E22EAC10BDD8DFAF8BEBD81E9EB91C0C72DE51E118E5A506C2
.. _kv260_r5:
Xilinx KV260 Development Board RPU Cortex-R5
############################################
Overview
********
This configuration provides support for the RPU, real-time processing unit on Xilinx
KV260 development board, it can operate as following:
* Two independent R5 cores with their own TCMs (tightly coupled memories)
* Or as a single dual lock step unit with double the TCM size.
This processing unit is based on an ARM Cortex-R5 CPU, it also enables the following devices:
* ARM PL-390 Generic Interrupt Controller
* Xilinx Zynq TTC (Cadence TTC)
* Xilinx Zynq UART
.. figure:: ../../../../../../../boards/amd/kv260_r5/doc/kv260-starter-kit.jpg
:align: center
:alt: Xilinx KV260 Starter Kit
Hardware
********
Supported Features
==================
The following hardware features are supported:
+--------------+------------+----------------------+
| Interface | Controller | Driver/Component |
+==============+============+======================+
| GIC | on-chip | generic interrupt |
| | | controller |
+--------------+------------+----------------------+
| TTC | on-chip | system timer |
+--------------+------------+----------------------+
| UART | on-chip | serial port |
+--------------+------------+----------------------+
The kernel currently does not support other hardware features on this platform.
Devices
========
System Timer
------------
This board configuration uses a system timer tick frequency of 1000 Hz.
Serial Port
-----------
This board configuration uses a single serial communication channel with the
on-chip UART1.
Memories
--------
Although Flash, DDR and OCM memory regions are defined in the DTS file,
all the code plus data of the application will be loaded in the sram0 region,
which points to the DDR memory. The ocm0 memory area is currently available
for usage, although nothing is placed there by default.
Known Problems or Limitations
==============================
The following platform features are unsupported:
* Dual-redundant Core Lock-step (DCLS) execution is not supported yet.
* Only the first core of the R5 subsystem is supported.
* Xilinx Zynq TTC driver does not support tickless mode operation.
* The Cortex-R5 and the Cortex-A53 shares the same UART controller, more details below.
Programming and Debugging
*************************
Currently the best way to run this sample is by loading it through remoteproc
from the APU, running Linux, to the RPU, assuming the target board has a compatible
Linux kernel.
Users can make use of Xilinx's pre-built Petalinux reference images as a starting point to enable
remoteproc support, it is based around 5.15 Xilinx maintained kernel, as described here:
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/1641152513/Kria+K26+SOM#PetaLinux
The other option is to use the reference image from the openAMP project, the link
below points, betweem the options, to the kv260 target:
https://github.com/OpenAMP/openamp-ci-builds/releases/tag/v2022.12
Select the option ``xilinx-kv260.tar.gz``, and just decompress it to the target rootfs
partition of user's SD card:
.. code-block:: console
$ sudo mount /dev/<user-sd> /media/rootfs
$ sudo tar -C /media/rootfs -xzf xilinx-kv260.tar.gz
$ sudo umount /media/rootfs
Your SD file may be ready for use, just plug it to the slot located in the board.
After getting the Linux image running on the target board, build a Zephyr application,
such as the hello world sample shown below:
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:host-os: unix
:board: kv260_r5
:goals: build
Due to a hardware limitation, both Linux and Zephyr share the same UART
controller, meaning when the Zephyr application is started it will takeover the
console from Linux.
To avoid this limitation when accessing the Linux shell, the best approach is to
connect to the board using ``ssh`` over the network (not using the FTDI
USB interface on the board), with the dev board and the host computer
connected to the same network.
Assuming you are using the default ``petalinux`` user from the Xilinx
reference image , open a terminal on the host machine and ssh into the
development board with the board's IP address (found via ``ifconfig``):
.. code-block:: console
$ ssh petalinux@<board-ip-address>
The initial password should be ``petalinux``. On another terminal deploy
the Zephyr application ``.elf`` file using utility like the ``scp`` or ``rsync``,
for example:
.. code-block:: console
$ scp /path/to/zephyr_app_elf_file petalinux@<board-ip-address>:/home/petalinux
After that move the file to ``/lib/firmware`` directory, then you be able to start the firmware
on the desired RPU via remoteproc with:
.. code-block:: console
$ sudo -i # You need to operate the remoteproc as root
$ echo zephyr.elf > /sys/class/remoteproc/remoteproc0/firmware
$ echo start > /sys/class/remoteproc/remoteproc0/state
With another terminal connected to UART1 on the host machine
(available via one of the tty ports with the on-board FTDI chip),
you should see the Zephyr application running:
.. code-block:: console
*** Booting Zephyr OS build v3.4.0 ***
Hello World kv260_r5!
References
**********
1. ARMv7-A and ARMv7-R Architecture Reference Manual (ARM DDI 0406C ID051414)
2. Cortex-R5 and Cortex-R5F Technical Reference Manual (ARM DDI 0460C ID021511)
3. Zynq UltraScale+ Device Technical Reference Manual (UG1085)
4. Kria KV260 Vision AI Starter Kit User Guide (UG1089)
Part 3
한국어 전문 번역
개요
이 configuration은 Xilinx KV260 development board의 RPU(real-time processing unit)를 지원합니다. 자체 TCM이 있는 R5 core 두 개를 독립적으로 실행하거나, TCM 크기가 두 배인 single dual-lock-step unit으로 동작시킬 수 있습니다.
Arm Cortex-R5 기반이며 ARM PL-390 GIC, Xilinx Zynq/Cadence TTC와 Xilinx Zynq UART를 enable합니다.

지원 기능
| Interface | Controller | Driver/Component |
|---|---|---|
| GIC | on-chip | generic interrupt controller |
| TTC | on-chip | system timer |
| UART | on-chip | serial port |
다른 platform hardware는 현재 kernel에서 지원하지 않습니다.
장치
System timer
system timer tick은 1000 Hz입니다.
Serial port
on-chip UART1 channel 하나를 사용합니다.
Memory
DTS에 flash, DDR, OCM region이 정의되어 있지만 application의 모든 code와 data는 DDR을 가리키는 sram0에 적재됩니다. ocm0도 사용할 수 있으나 기본 배치는 없습니다.
알려진 제한
- DCLS(dual-redundant core lock-step) execution은 아직 지원하지 않습니다.
- R5 subsystem의 첫 번째 core만 지원합니다.
- Xilinx Zynq TTC driver는 tickless mode를 지원하지 않습니다.
- Cortex-R5와 Cortex-A53이 같은 UART controller를 공유합니다.
프로그래밍과 디버깅
현재 가장 실용적인 실행 방법은 Linux가 동작하는 APU에서 remoteproc로 RPU에 image를 적재하는 것입니다. target Linux kernel에 remoteproc 지원이 필요합니다. Xilinx Petalinux reference image(5.15 Xilinx-maintained kernel) 또는 OpenAMP v2022.12의 xilinx-kv260.tar.gz를 사용할 수 있습니다.
OpenAMP rootfs 준비
$ sudo mount /dev/<user-sd> /media/rootfs
$ sudo tar -C /media/rootfs -xzf xilinx-kv260.tar.gz
$ sudo umount /media/rootfs완료한 SD card를 board slot에 넣습니다.
Zephyr build
$ west build -b kv260_r5 samples/hello_world
Xilinx reference image의 기본 petalinux user로 board IP에 접속합니다. 초기 password도 petalinux입니다.
$ ssh petalinux@<board-ip-address>
$ scp /path/to/zephyr_app_elf_file petalinux@<board-ip-address>:/home/petalinux
ELF를 /lib/firmware로 옮긴 뒤 root 권한으로 remoteproc firmware와 state를 설정합니다.
$ sudo -i # remoteproc operation requires root
$ echo zephyr.elf > /sys/class/remoteproc/remoteproc0/firmware
$ echo start > /sys/class/remoteproc/remoteproc0/state
host의 on-board FTDI UART1 terminal에는 다음 출력이 나타납니다.
*** Booting Zephyr OS build v3.4.0 ***
Hello World kv260_r5!
참고 자료
- ARMv7-A/R Architecture Reference Manual, ARM DDI 0406C
- Cortex-R5/R5F TRM, ARM DDI 0460C
- Zynq UltraScale+ TRM UG1085
- Kria KV260 Vision AI Starter Kit User Guide UG1089
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.