XVDPU-TRD 2021.1 vck190 es1

XVDPU-TRD 2021.1をvck190のes1でやったときのメモ

References

Prerequisites

  • Vitis 2021.1
  • XRT 2021.1
    • % cd XRT
    • % git pull origin 2021.1
    • % cd build
    • % ./build.sh
    • % cd Release
    • % make package
    • % sudo apt install –reinstall ./xrt_202110.2.11.0_18.04-amd64-xrt.deb
    • % dpkg -l | grep xrt
      • 2.11.0
  • PetaLinux 2021.1

Preparing the environment

  • % cd Vitis-AI
  • % git pull
  • % cp -r dsa/XVDPU-TRD ~/tmp/
  • % cd ~/tmp/XVDPU-TRD/
  • % export TRD_HOME=$PWD

Build

platform

  • (for ES1)
    • % code vck190_platform/platforms/vivado/vck190_mipiRxSingle_hdmiTx/Makefile
      • $(ISP_IP):
            make -C $(ISP_DIR) ip XPART=xcvc1902-vsva2197-1LP-e-S-es1
    • % code vck190_platform/platforms/vivado/vck190_mipiRxSingle_hdmiTx/scripts/main.tcl
      • set proj_board [get_board_parts “*:vck190_es:*” -latest_file_version]
  • % cd vck190_platform/
  • % time make all
    • (for Ubuntu 18.04.1)
      • ./trd-pl.cfg: 13: ./trd-pl-cfg: Syntax error: “(” unexpected
        • % code petalinux/xilinx-vck190-base-trd/trd-pl-cfg &
          • Move ”#!/bin/bash” to the first line.
      • % sudo apt update
      • % sudo apt upgrade

petalinux

  • (for RHEL 7.5)
    • ERROR: Failed to Extract Yocto SDK.
      ERROR: Failed to config project.
      ERROR: Get hw description Failed!. Check the /u1/satorui/tmp/vck190/XVDPU-TRD/vck190_platform/petalinux/xilinx-vck190-base-trd/build/config.log file for more details…
      make[1]: *** [images/linux/boot.scr] Error 255
      make[1]: Leaving directory `/u1/satorui/tmp/vck190/XVDPU-TRD/vck190_platform/petalinux/xilinx-vck190-base-trd’
      make: *** [linux] Error 2
      • % cd vck190_platform/petalinux/xilinx-vck190-base-trd
      • % petalinux-config
        •  Yocto Settings → (Checked)Enable Buildtools Extended

xvdpu

  • % cd ../vitis_prj/
  • % code vitis_prj/xvdpu_config.mk
    • CPB_N       = 64
      BATCH_N     = 3
  • % time make all
  • Flash ‘$TRD_HOME/vitis_prj/package_out/sd_card.img.gz’ into SD card

arch.json

  • It can be found in ‘$TRD_HOME/vitis_prj/package_out/sd_card’ .

Run apps on board

Workaround for ES1

  • % code es1_workaround.sh
for i in {0..39}
do
  for j in {1..8}
  do
    a=0x20000000000
    b=0x31000
    devmem $[a+b+(i<<23)+(j<<18)] 32 0
  done
done
  • copy es1_workaround.sh to vck190 ES1 board.

vck190

  • % bash es1_workaround.sh

あとはいままで通り、好きにモデルを動かせばOK。
今回はXVDPUをC64B3に設定したので、モデルのコンパイルもC64B3のarch.jsonを使うこと。
(そうしないとfingerprint errorになる。)

コメント

タイトルとURLをコピーしました