FC2カウンター FPGAの部屋 2019年10月
fc2ブログ

FPGAやCPLDの話題やFPGA用のツールの話題などです。 マニアックです。 日記も書きます。

FPGAの部屋

FPGAの部屋の有用と思われるコンテンツのまとめサイトを作りました。Xilinx ISEの初心者の方には、FPGAリテラシーおよびチュートリアルのページをお勧めいたします。

SDx 2019.1 のUltra96-V2 用プラットフォームを作る5(SDx 1)

SDx 2019.1 のUltra96-V2 用プラットフォームを作る4(PetaLinux3)”の続き。

前回は、boot, image ディレクトリを作り、boot.bif を作成し、mylib と mylib2 を作成した。今回は、SDx を立ち上げてプラットフォーム・プロジェクトを生成し、ビルドする。
なお、この記事は、”SDx のUltra96-V2 用プラットフォームを作る8(SDxでプラットフォーム・プロジェクトを生成)”の 2019.1 版だ。

SDx を立ち上げた。
まずは、source コマンドで、SDx のsettings64.sh を起動して、環境を整えた。
sdx でSDx を起動した。
ワークスペースを聞かれるので、/home/masaaki/sdx_workspace/2019.1 ディレクトリを指定した。
SDx2019_1_platform_43_191031.png

SDx が立ち上がった。Welcome 画面が表示された。

SDx の File メニューから New -> SDx Platform Project... を選択した。

New Platform Project ダイアログが表示された。
Create new platform project 画面でProject name に Ultra96V2_Platform1 を設定した。
SDx2019_1_platform_44_191031.png

platform project 画面で、デフォルトのCreate from hardware specification のラジオボタンが選択されているのを確認する。
SDx2019_1_platform_45_191031.png

Platform Project Specification 画面では、Hardware Specification のDSA/HDF file: に /home/masaaki/HDL/Ultra96/SDx_platform/2019.1/Ultra96V2_Platform1/Ultra96V2_Platform1.dsa を指定した。(”SDx 2019.1 のUltra96-V2 用プラットフォームを作る1(DSA ファイルを作成)”を参照)
SDx2019_1_platform_46_191031.png

Ultra96V2_Platform1 プラットフォーム・プロジェクトが作られた。
SDx2019_1_platform_47_191031.png

Generate prebuilt data にラジオボタンをクリックする。
+アイコンをクリックして、System Configuration を選択する。
New System Configuration ダイアログが表示された。
Name にLinuxConfig と入力した。
SDx2019_1_platform_48_191031.png

Use pre-built software components ラジオボタンをクリックする。
Boot Directory のBrows ボタンをクリックして、/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/images/linux/boot ディレクトリを選択した。
Bif File のBrows ボタンをクリックして、/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/images/linux/ の boot.bif を選択した。(”SDx 2019.1 のUltra96-V2 用プラットフォームを作る4(PetaLinux3)”を参照)
SDx2019_1_platform_49_191031.png

+アイコンをクリックして、Domain を選択した。
Name に linux_domain と入力した。
OS は Linux を選択した。
SDx2019_1_platform_50_191031.png

LinuxConfig の下に、linux_domain が入った。
linux_domain を選択して、Image の Browse... ボタンをクリックし、/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/images/linux/image ディレクトリを選択した。(”SDx 2019.1 のUltra96-V2 用プラットフォームを作る4(PetaLinux3)”を参照)
SDx2019_1_platform_51_191031.png

Ultra96V2_Platform1 -> sysconfig1 -> standalone on psu cortexa53_0 -> Board Suport Package をクリックした。
Board Suport Package の Modify BSP Settings... ボタンをクリックする。
SDx2019_1_platform_52_191031.png

stdin, stdout を psu_uart_1 に設定した。
SDx2019_1_platform_53_191031.png

Modify BSP Settings ダイアログが表示された。Yes ボタンをクリックする。
SDx2019_1_platform_54_191031.png

Ultra96V2_Platform1 プラットフォームがgenerate された。
SDx2019_1_platform_55_191031.png
  1. 2019年10月31日 04:39 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx 2019.1 のUltra96-V2 用プラットフォームを作る4(PetaLinux3)

SDx 2019.1 のUltra96-V2 用プラットフォームを作る3(PetaLinux2)”の続き。

前回は、カーネルの petalinux-config とRoot File System の petalinux-config を行って、プロジェクトをビルドした。今回は、boot, image ディレクトリを作り、boot.bif を作成し、mylib と mylib2 を作成する。

Ultra96V2_Platform1/images/linux に boot, image ディレクトリを生成した。

boot ディレクトリには、bl31.elf, pmufw.elf, u-boot.elf を上のディレクトリからコピーした。そして、zynqmp_fsbl.elf を fsbl.elf と名前を変えて boot ディレクトリにコピーした。

image ディレクトリには、上のディレクトリから、image.ub をコピーした。
SDx2019_1_platform_30_191028.png

PetaLinux/PetaL_Proj/Ultra96V2_Platform1/images/linux に boot.bif を生成した。
これはフルパスで書く必要があったので、フルパスで書いた。
SDx2019_1_platform_31_191028.png

tthe_ROM_image:
{
    [fsbl_config] a53_x64
    [bootloader] /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/images/linux/boot/fsbl.elf
    [pmufw_image] /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/images/linux/boot/pmufw.elf
    [destination_device=pl] /home/masaaki/HDL/Ultra96/SDx_platform/2019.1/Ultra96V2_Platform1/Ultra96V2_Platform1.runs/impl_1/Ultra96V2_Platform1_wrapper.bit
    [destination_cpu=a53-0, exception_level=el-3, trustzone] /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/images/linux/boot/bl31.elf
    [destination_cpu=a53-0, exception_level=el-2] /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/images/linux/boot/u-boot.elf
}


Linux user application を作成する。
petalinux-create -t apps --template install --name mylib --enable
SDx2019_1_platform_32_191028.png

Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib/files/ ディレクトリの mylib ファイルを削除した。
SDx2019_1_platform_35_191028.png

tools/Xilinx/SDx/2018.3/target/aarch64-linux/lib/libsds_lib.so を
SDx2019_1_platform_36_191028.png

Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib/files/ ディレクトリにコピーした。
SDx2019_1_platform_37_191028.png

PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib/mylib.bb を編集した。
SDx2019_1_platform_38_191028.png

mylib.bb の内容を示す。

#
# This file is the mylib recipe.
#

SUMMARY = "Simple mylib application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://libsds_lib.so \
 "

S = "${WORKDIR}"
TARGET_CC_ARCH += "${LDFLAGS}"
do_install() {
      install -d ${D}/${bindir}
      install -m 0755 ${S}/libsds_lib.so ${D}/${bindir}
}
FILES_${PN} += "${libdir}"
FILES_SOLIBSDEV = ""


ROOT FSをビルドした。
petalinux-build -c rootfs
SDx2019_1_platform_39_191028.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1$ petalinux-build -c rootfs
[INFO] building rootfs
[INFO] sourcing bitbake
[INFO] generating user layers
INFO: bitbake petalinux-user-image -c do_image_complete
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3811 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2778 .bb files complete (2773 cached, 5 parsed). 3813 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:01
Checking sstate mirror object availability: 100% |###############| Time: 0:00:06
Sstate summary: Wanted 132 Found 32 Missed 200 Current 704 (24% match, 88% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: mylib-1.0-r0 do_package_qa: QA Issue: mylib-dbg: found library in wrong location: /usr/bin/.debug/libsds_lib.so
mylib: found library in wrong location: /usr/bin/libsds_lib.so [libdir]
NOTE: Tasks Summary: Attempted 2500 tasks of which 2477 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
INFO: Copying Images from deploy to images
NOTE: Failed to copy built images to tftp dir:  /tftpboot
[INFO] successfully built rootfs


今回は、ワーニングが出ている。

libsds_lib_dbg.so についても手順を繰り返す。
petalinux-create -t apps --template install --name mylib2 --enable
SDx2019_1_platform_40_191028.png

Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib2/files/ ディレクトリの mylib2 ファイルを削除した。
tools/Xilinx/SDx/2018.3/target/aarch64-linux/lib/libsds_lib_dbg.so を Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib2/files/ ディレクトリにコピーした。
SDx2019_1_platform_41_191028.png

PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib2/mylib2.bb を編集した。

#
# This file is the mylib2 recipe.
#

SUMMARY = "Simple mylib2 application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://libsds_lib_dbg.so \
 "

S = "${WORKDIR}"
TARGET_CC_ARCH += "${LDFLAGS}"
do_install() {
      install -d ${D}/${bindir}
      install -m 0755 ${S}/libsds_lib_dbg.so ${D}/${bindir}
}
FILES_${PN} += "${libdir}"
FILES_SOLIBSDEV = ""


petalinux-build -c rootfs
SDx2019_1_platform_42_191028.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1$ petalinux-build -c rootfs
[INFO] building rootfs
[INFO] sourcing bitbake
[INFO] generating user layers
INFO: bitbake petalinux-user-image -c do_image_complete
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3812 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2779 .bb files complete (2774 cached, 5 parsed). 3814 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:01
Checking sstate mirror object availability: 100% |###############| Time: 0:00:05
Sstate summary: Wanted 116 Found 16 Missed 200 Current 725 (13% match, 88% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: mylib2-1.0-r0 do_package_qa: QA Issue: mylib2: found library in wrong location: /usr/bin/libsds_lib_dbg.so
mylib2-dbg: found library in wrong location: /usr/bin/.debug/libsds_lib_dbg.so [libdir]
NOTE: Tasks Summary: Attempted 2512 tasks of which 2491 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
INFO: Copying Images from deploy to images
NOTE: Failed to copy built images to tftp dir:  /tftpboot
[INFO] successfully built rootfs

  1. 2019年10月30日 04:47 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx 2019.1 のUltra96-V2 用プラットフォームを作る3(PetaLinux2)

SDx 2019.1 のUltra96-V2 用プラットフォームを作る2(PetaLinux1)”の続き。

前回は、PetaLinux のプロジェクトを生成して、petalinux-config を行った。今回は、カーネルの petalinux-config とRoot File System の petalinux-config を行って、プロジェクトをビルドしていこう。

まずは、カーネルの petalinux-config を行って、設定をしていく。
petalinux-config -c kernel
SDx2019_1_platform_17_191025.png

端末の別タブに設定画面が表示された。
設定を行う。
Device Drivers -> Generic Driver Options -> Size in MB(1024)に変更する。
SDx2019_1_platform_18_191025.png

Device Drivers -> Staging drivers (ON) はすでにON されていた。

Device Drivers -> Staging drivers -> Xilinx APF Accelerator driver (ON) した。
SDx2019_1_platform_19_191025.png

Device Drivers -> Staging drivers -> Xilinx APF Accelerator driver -> Xilinx APF DMA engines support (ON)
SDx2019_1_platform_20_191025.png

CPU Power Management -> CPU idle -> CPU idle PM support (OFF)
SDx2019_1_platform_21_191025.png

CPU Power Management -> CPU Frequency scaling -> CPU Frequency scaling (OFF)
SDx2019_1_platform_22_191025.png

設定終了。セーブしてExit した。
SDx2019_1_platform_23_191025.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1$ petalinux-config -c kernel
[INFO] generating Kconfig for project
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating user layers
[INFO] generating machine configuration
[INFO] configuring: kernel
[INFO] generating kernel configuration files
[INFO] bitbake virtual/kernel -c menuconfig
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3810 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2777 .bb files complete (2766 cached, 11 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:00
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3811 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2777 .bb files complete (2775 cached, 2 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:00
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00
Sstate summary: Wanted 49 Found 45 Missed 8 Current 0 (91% match, 0% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 376 tasks of which 366 didn't need to be rerun and all succeeded.
bitbake -c diffconfig virtual/kernel
Loading cache...done.
Loaded 3811 entries from dependency cache.
Parsing recipes...done.
Parsing of 2777 .bb files complete (2775 cached, 2 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks...done.
Checking sstate mirror object availability...done.
Sstate summary: Wanted 13 Found 9 Missed 8 Current 25 (69% match, 89% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 286 of 286 (/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/2019.1/components/yocto/source/aarch64/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2019.1.bb:do_diffconfig)
NOTE: recipe linux-xlnx-4.19-xilinx-v2019.1+gitAUTOINC+9811303824-r0: task do_diffconfig: Started
Config fragment has been dumped into:
 /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+gitAUTOINC+9811303824-r0/fragment.cfg
NOTE: recipe linux-xlnx-4.19-xilinx-v2019.1+gitAUTOINC+9811303824-r0: task do_diffconfig: Succeeded
NOTE: Tasks Summary: Attempted 286 tasks of which 285 didn't need to be rerun and all succeeded.

generate_bbappend /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+gitAUTOINC+9811303824-r0/user_2019-10-25-21-15-00.cfg /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/project-spec/meta-user/
recipetool appendsrcfile -wW /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/project-spec/meta-user/ virtual/kernel /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+gitAUTOINC+9811303824-r0/user_2019-10-25-21-15-00.cfg
NOTE: Starting bitbake server...
Loading cache...done.
Loaded 3811 entries from dependency cache.
Parsing recipes...done.
Parsing of 2777 .bb files complete (2775 cached, 2 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Writing append file /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/project-spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend
NOTE: Copying /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+gitAUTOINC+9811303824-r0/user_2019-10-25-21-15-00.cfg to /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/user_2019-10-25-21-15-00.cfg

Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3811 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2777 .bb files complete (2774 cached, 3 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:00
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.
[INFO] successfully configured kernel


ワーニングは出ていないようだ。

次に、Root FS を設定する。
petalinux-config -c rootfs

Filesystem Packages -> misc -> gcc-runtime -> libstdc++ (ON)
SDx2019_1_platform_24_191026.png

設定をセーブして、Exit した。
SDx2019_1_platform_25_191026.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1$ petalinux-config -c rootfs
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating user layers
[INFO] generating machine configuration
[INFO] configuring: rootfs
[INFO] generating kconfig for Rootfs
[INFO] menuconfig rootfs
configuration written to /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/project-spec/configs/rootfs_config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] generating petalinux-user-image.bb
[INFO] successfully configured rootfs


~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-bsp/device-tree/files ディレクトリの system-user.dtsi を編集した。
SDx2019_1_platform_26_191026.png

SDx2019_1_platform_27_191026.png

system-user.dtsi の内容を示す。

/include/ "system-conf.dtsi"
/ {
    xlnk {
    compatible = "xlnx,xlnk-1.0";
    };    
};

&sdhci0 {
    disable-wp;
};


プロジェクトをビルドする。
petalinux-build
SDx2019_1_platform_28_191026.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
[INFO] generating user layers
INFO: bitbake petalinux-user-image
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3811 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2777 .bb files complete (2774 cached, 3 parsed). 3812 targets, 150 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:03
Checking sstate mirror object availability: 100% |###############| Time: 0:00:11
Sstate summary: Wanted 865 Found 645 Missed 440 Current 36 (74% match, 75% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 3234 tasks of which 2236 didn't need to be rerun and all succeeded.
INFO: Copying Images from deploy to images
INFO: Creating images/linux directory
NOTE: Failed to copy built images to tftp dir:  /tftpboot
[INFO] successfully built project


今まで、ワーニング出ていない。

ビルドで、PetaL_Proj/2019.1/Ultra96V2_Platform1/images/linux にPetaLinux 用の elf ファイルやイメージ・ファイルが生成された。
SDx2019_1_platform_29_191028.png
  1. 2019年10月28日 05:01 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

Vivado HLS 2019.1 の tgamma 関数をテストする

Vivado HLS 2019.1 の tgamma 関数がおかしいというツィートが流れてきたので、自分でもやってみた。

@lp6m2 さんのツィートを示す。


tgamma 関数を知らなかったので、調べてみた。
tgamma, tgammaf, tgammal - 本当のガンマ ... - Ubuntu Manpage
C/C++でガンマ関数tgamma()
どうやら tgamma 関数は階乗を整数から整数以外に拡張したもので、(n-1)! ということのようだ。つまり、tgamma(3) = 2 ということらしい?

コードも一部ツィートから引用した。
テストベンチを示す。

// tgamma_tb.cpp
// 2019/10/27 by marsee

#include <cmath>
#include <hls_math.h>
#include <ap_fixed.h>
using namespace std;

int tgamma_ip(ap_fixed<10,5> x, ap_fixed<10,5> &result);

int main(){
    ap_fixed<10,5> x, result;
    ap_fixed<10,5> x_soft, result_soft;

    x = ap_fixed<10,5>(3.0);
    tgamma_ip(x, result);

    x_soft = ap_fixed<10,5>(3.0);
    result_soft = hls::tgamma(x_soft);

    printf("result = %f\n", (float)result);
    printf("result_soft = %f\n", (float)result_soft);
    printf("%d\n", hls::tgamma((int)3));
    printf("%e\n", hls::tgamma((float)3.0));
    printf("%e\n", hls::tgamma((double)3.0));
    printf("%e\n", hls::tgamma((float)(-3.0)));

}


ソースコードを示す。

// tgamma.cpp
// 2019/10/27 by marsee

#include <cmath>
#include <hls_math.h>
#include <ap_fixed.h>
using namespace std;

int tgamma_ip(ap_fixed<10,5> x, ap_fixed<10,5> &result){
    result = hls::tgamma(x);

    return(0);
}


tgamma_1_191027.png

C シミュレーションを行った。
tgamma_2_191027.png

INFO: [SIM 2] *************** CSIM start ***************
INFO: [SIM 4] CSIM will launch GCC as the compiler.
   Compiling ../../../tgamma_tb.cpp in debug mode
   Compiling ../../../tgamma.cpp in debug mode
   Generating csim.exe
result = 0.000000
result_soft = 0.000000
0
inf
inf
0.000000e+00
INFO: [SIM 1] CSim done with 0 errors.
INFO: [SIM 3] *************** CSIM finish ***************


やはり値がおかしい。

C コードの合成を行ってみた。
tgamma_3_191027.png

Ultra96 では、DSP48E とLUT が 100 % をオーバーしている。相当リソースを消費している。
  1. 2019年10月27日 05:43 |
  2. Vivado HLS
  3. | トラックバック:0
  4. | コメント:0

SDx 2019.1 のUltra96-V2 用プラットフォームを作る2(PetaLinux1)

SDx 2019.1 のUltra96-V2 用プラットフォームを作る1(DSA ファイルを作成)”の続き。

前回は、Vivado 2018.3 で作ってあったSDx のハードウェア・プラットフォームをVivado 2019.1 に変換し、DSA ファイルを生成した。今回は、PetaLinux をコンフィギュレーションして、ビルドしていこう。

SDx のUltra96-V2 用プラットフォームを作る5(PetaLinuxプロジェクト1)”では、AVNET 社からダウンロードしたPetaLinux 2018.3 の Ultra96-V2 用のBSP を使用して、PetaLinux 2018.3 のプロジェクトを生成した。PetaLinux 2019.1 の Ultra96-V2 用のBSP は無いのでBSP を使用しない方法を使用する。
ZynqMP 用のPetaLinux 2019.1 プロジェクトを生成しよう。
petalinux-create --type project --template zynqMP --name Ultra96V2_Platform1
SDx2019_1_platform_9_191025.png

ハードウェア・プラットフォームについて、コンフィギュレーションをしていこう。
cd Ultra96V2_Platform1/
petalinux-config --get-hw-description=Ultra96V2_Platform1.sdk

SDx2019_1_platform_10_191025.png

Image Packaging Configuration -> Root filesystem type -> SDカードを選択する
SDx2019_1_platform_11_191025.png

Yocto Settings -> Enable Debug Tweaks を有効にする (Spaceキーを押す)
SDx2019_1_platform_12_191025.png

Subsystem AUTO Hardware Settings -> Serial Settings -> Primary stdin/stdout を psu_uart_1 に変更する。
SDx2019_1_platform_13_191025.png

設定をセーブしたら、エラーだった。
SDx2019_1_platform_14_191025.png

これは、やはり、Python 3.6.5 でやっているのがダメなんだな。Python 2.7 に切り替える。”pythonのバージョンを切り替える(anaconda使用の場合)”を参照する。
そしてもう一度、petalinux-config を行う。
source activate py27
petalinux-config --get-hw-description=Ultra96V2_Platform1.sdk

SDx2019_1_platform_15_191025.png

今度は成功した。やはり、Python 2系でないとダメなようだ。
SDx2019_1_platform_16_191025.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1$ petalinux-config --get-hw-description=Ultra96V2_Platform1.sdk
INFO: Getting hardware description...
INFO: Rename Ultra96V2_Platform1_wrapper.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] menuconfig project
configuration written to /media/masaaki/Ubuntu_Disk/tools/Xilinx/PetaLinux/PetaL_Proj/2019.1/Ultra96V2_Platform1/project-spec/configs/config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating user layers
[INFO] generating machine configuration
[INFO] generating bbappends for project . This may take time ! 
[INFO] generating u-boot configuration files
[INFO] generating kernel configuration files
[INFO] generating kconfig for Rootfs
[INFO] silentconfig rootfs
[INFO] generating petalinux-user-image.bb


SDx のUltra96-V2 用プラットフォームを作る6(PetaLinuxプロジェクト2)”と比べてエラーメッセージが無いのが良さそうだ。
  1. 2019年10月26日 05:21 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx 2019.1 のUltra96-V2 用プラットフォームを作る1(DSA ファイルを作成)

SDx のUltra96-V2 用プラットフォームを作る13(Linuxでは失敗した)”で SDx 2018.3 で Linux 用のプラットフォームを使用して、アプリケーション・プロジェクトを作成し、PetaLinux 上で実行させたところ途中で止まってしまって、実行することができなかった。使用したPetaLinux 2018.3 は私が使用しているUbuntu 18.04 に未対応ということも合って規格外の使用ということになってしまった。よって、Ubuntu 18.04 に対応しているPetaLinux 2019.1 で試してみたいと思う。

SDx 2019.1 と PetaLinux 2019.1 をインストールした。

~/HDL/Ultra96/SDx_platform/ ディレクトリに 2019.1 ディレクトリを作成した。
そのディレクトリに、Vivado 2018.3 のUltra96V2_Platform1 プロジェクトをコピーした。
SDx2019_1_platform_1_191024.png

Ultra96V2_Platform1 ディレクトリに入って、DSA ファイルを削除した。
SDx2019_1_platform_2_191024.png

Ultra96-V2 用のボード・ファイルを実装してあるVivado 2019.1 を立ち上げて、プロジェクトを旧プロジェクトから 2019.1 プロジェクト用に変換した。Vivado 2018.3 で行った前回の記事は”SDx のUltra96-V2 用プラットフォームを作る2(ブロックデザインの作成)”だ。
SDx2019_1_platform_3_191024.png

前回の”SDx のUltra96-V2 用プラットフォームを作る2(Platform Hardware Interfacesの宣言)”の設定は、すでに終了しているので、Flow Navigator 上でGenerate Bitstream をクリックしてビットストリームの生成を行う。

Generate Bitstream が終了した。Project Summary を表示させた。
SDx2019_1_platform_4_191024.png

Vivado のFile メニューからExport -> Export Hardware... を選択する。

Export Hardware ダイアログ表示された。
Include bitstream にチェックを入れて、OKボタンをクリックする。
overwrite を警告するダイアログが出るが、OK ボタンをクリックする。
SDx2019_1_platform_5_191024.png

SDx のUltra96-V2 用プラットフォームを作る4(DSA ファイルの生成)”に従って DSA ファイルを作成する。

まずは、TCL コンソールを出して、/home/masaaki/HDL/Ultra96/SDx_platform/2019.1/Ultra96V2_Platform1/ ディレクトリに移動する。
cd /home/masaaki/HDL/Ultra96/SDx_platform/2019.1/Ultra96V2_Platform1/

DSA ファイルを作成する。
write_dsa -force -include_bit Ultra96V2_Platform1.dsa
SDx2019_1_platform_6_191024.png

ログを示す。

cd /home/masaaki/HDL/Ultra96/SDx_platform/2019.1/Ultra96V2_Platform1/
write_dsa -force -include_bit Ultra96V2_Platform1.dsa
INFO: [Vivado 12-4895] Creating DSA: Ultra96V2_Platform1.dsa ...
INFO: [Vivado 12-4896] Successfully created DSA: /home/masaaki/HDL/Ultra96/SDx_platform/2019.1/Ultra96V2_Platform1/Ultra96V2_Platform1.dsa
write_dsa: Time (s): cpu = 00:00:16 ; elapsed = 00:00:15 . Memory (MB): peak = 7966.305 ; gain = 54.004 ; free physical = 6365 ; free virtual = 38343
/home/masaaki/HDL/Ultra96/SDx_platform/2019.1/Ultra96V2_Platform1/Ultra96V2_Platform1.dsa


DSA ファイルが作成できた。
SDx2019_1_platform_7_191024.png

DSA ファイルを検証する。
validate_dsa Ultra96V2_Platform1.dsa
SDx2019_1_platform_8_191024.png

ログを示す。

validate_dsa Ultra96V2_Platform1.dsa
INFO: [Vivado 12-6074] Validating DSA: 'Ultra96V2_Platform1.dsa'
INFO: [Vivado 12-4468] Found XML metadata file: dsa.xml
INFO: [Vivado 12-6078] Validating platform properties...
INFO: [Vivado 12-6079] Validating unified platform...
INFO: [Vivado 12-6073] Validating 'pre_synth' platform state...
INFO: [Vivado 12-6077] Validating platform files...
INFO: [Vivado 12-6067] Found file 'emu/emu.xml' of type 'EMU_XML' in the DSA.
INFO: [Vivado 12-6067] Found file 'Ultra96V2_Platform1.bit' of type 'FULL_BIT' in the DSA.
INFO: [Vivado 12-6067] Found file 'Ultra96V2_Platform1.hpfm' of type 'HPFM' in the DSA.
INFO: [Vivado 12-6067] Found file 'prj/rebuild.tcl' of type 'REBUILD_TCL' in the DSA.
INFO: [Vivado 12-6066] Finished running validate_dsa for file: 'Ultra96V2_Platform1.dsa'


  1. 2019年10月25日 05:04 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

高位合成言語+ツールのKaruta を使ってみる4(AXIインターフェースのサンプル1)

高位合成言語+ツールのKaruta を使ってみる3(生成されたVerilog ファイルをシミュレーション)”の続き。

前回は、Karuta で生成したVerilog ファイルをシミュレーションして、動作するのに 20 クロックかかるのが分かった。今回は、AXIインターフェースのサンプルをやってみよう。

FPGA向け論理回路設計のためのプログラミング言語処理系 Karuta の紹介”の”アクセラレータを作れるか?”から AXI インターフェースのサンプルをやってみる。

FPGA向け論理回路設計のためのプログラミング言語処理系 Karuta の紹介”の”アクセラレータを作れるか?”からソースコードを引用する。ファイル名は AXI_example.karuta とした。

@AxiSlave()
shared regs int[4]

@AxiMaster()
shared buf int[4]

func main() {
  // slave側へのアクセスを待つ
  regs.waitAccess()
  // slaveの0ワード目の値をアドレスとして使う
  var addr int = regs[0]
  // メモリ上のaddrから2ワードをbuf[0]以降に読み込む
  buf.load(addr, 2, 0)
  buf[2] = buf[0] * buf[0] + buf[1] * buf[1]
  // メモリ上のaddr + 8に1ワード分buf[2]以降から書き込む
  buf.store(addr + 8, 1, 2)
}


karuta AXI_example.karuta --compile
コマンドで、Verilog ファイルを生成した。
karuta_16_191023.png

AXI_example.v が生成された。AXI Slave とAXI Master のポートが確認できる。
karuta_17_191023.png

RTL シミュレーションしてみたいが、Verilog ファイルベースで接続を書くのがとっても面倒だ。
なんとかして、ソースコードレベルでAXIインターフェースの接続を書きたい。
配列のアドレスを取得できれば、そのアドレスをAXI Slave でセットしてDMA できるのだが、独自言語なので、アドレスの取得の仕方が分からない?そもそも配列のアドレスが取得できるのだろうか?

@neonlightdev さんから、”--compile --with_shell --vcd”オプションを教えてもらったので、やってみた。
karuta AXI_example.karuta --compile --with_shell --vcd
karuta_18_191023.png

生成された AXI_example.v はシミュレーション用のテストベンチが付いていたが、やはり、トランザクションは自分で書く必要があるかも知れない?
karuta_19_191023.png

一応、Vivado 2019.1 で AXI_example プロジェクトを作成して、AXI_example.v を入れた。
karuta_20_191023.png

PROJECT MANAGER から SIMULATION -> Run Simulation -> Run Behavioral Simulation を選択した。
更に、Run All (F3) ボタンをクリックして、$finish まで実行した。
karuta_21_191023.png

AXI のトランザクションは無かった。
karuta_22_191023.png

配列のアドレスの書き方覚えて、ソースコード上でスティミュラスを書きたい。。。
  1. 2019年10月23日 04:56 |
  2. Karuta
  3. | トラックバック:0
  4. | コメント:0

高位合成言語+ツールのKaruta を使ってみる3(生成されたVerilog ファイルをシミュレーション)

高位合成言語+ツールのKaruta を使ってみる2(Verilog ファイルを生成)”の続き。

前回は、Karuta でサンプルコードをコンパイルして、Verilog ファイルを生成した。今回は、Karuta で生成したVerilog ファイルをシミュレーションしてみよう。

シミュレーションはVivado 2019.1 でVivaoSim を使用してRTL シミュレーションを行う。
calc.v は clk と rst のみの外部端子なので、リセットを外して、クロックを入れれば動作するはずだ。
まずは calc プロジェクトを作成して、テストベンチの calc_tb.v を作成した。
calc_tb.v を貼っておく。

// calc_tb.v
// 2019/10/22 by marsee

`default_nettype none
`timescale 1ns / 1ps

module calc_tb;
    wire clk;
    wire rst;
    
    calc calc_inst(
        .clk(clk),
        .rst(rst)
    );
    
    // clk_gen のインスタンス(clk)
    clk_gen #(
        .CLK_PERIOD(10),    // 10 nsec, 100 MHz
        .CLK_DUTY_CYCLE(0.5),
        .CLK_OFFSET(0),
        .START_STATE(1'b0)
    ) ACLKi (
        .clk_out(clk)
    );

    // rst のインスタンス
    reset_gen #(
        .RESET_STATE(1'b1),
        .RESET_TIME(100)    // 100nsec
    ) RESETi (
        .reset_out(rst),
        .init_done()
    );
endmodule

module clk_gen #(
    parameter         CLK_PERIOD = 100,
    parameter real    CLK_DUTY_CYCLE = 0.5,
    parameter        CLK_OFFSET = 0,
    parameter        START_STATE    = 1'b0 )
(
    output    reg        clk_out
);
    begin
        initial begin
            #CLK_OFFSET;
            forever
            begin
                clk_out = START_STATE;
                #(CLK_PERIOD-(CLK_PERIOD*CLK_DUTY_CYCLE)) clk_out = ~START_STATE;
                #(CLK_PERIOD*CLK_DUTY_CYCLE);
            end
        end
    end
endmodule

module reset_gen #(
    parameter    RESET_STATE = 1'b1,
    parameter    RESET_TIME = 100 )
(
    output    reg        reset_out,
    output    reg        init_done
);
    begin
        initial begin
            reset_out = RESET_STATE;
            init_done = 1'b0;
            #RESET_TIME;
            reset_out = ~RESET_STATE;
            init_done = 1'b1;
        end
    end
endmodule

`default_nettype wire


karuta_12_191022.png

PROJECT MANAGER から SIMULATION -> Run Simulation -> Run Behavioral Simulation を選択した。
論理シミュレーションが成功した。
karuta_13_191022.png

波形をFloat した。
karuta_14_191022.png

リセットが外れたクロックの立ち上がりから sram_wdate_en5 が 1 になって、SRAM に 25 を書くまでの実行している部分を拡大した。この間は 200 ns なので、 20 クロック分ということになる。
karuta_15_191022.png
  1. 2019年10月22日 20:25 |
  2. Karuta
  3. | トラックバック:0
  4. | コメント:0

高位合成言語+ツールのKaruta を使ってみる2(Verilog ファイルを生成)

高位合成言語+ツールのKaruta を使ってみる1(Karuta をインストール)”の続き。

前回は、Karuta をインストールして、”FPGA向け論理回路設計のためのプログラミング言語処理系 Karuta の紹介”からサンプルコードを動作させてみた。今回は、そのサンプルコードをコンパイルして、Verilog ファイルを生成してみよう。

FPGA向け論理回路設計のためのプログラミング言語処理系 Karuta の紹介”から引用したソースコードを示す。

shared x int[4]

func main() {
  var t int = 0
  for var i int = 0; i < 2; ++i {
    t += x[i] * x[i]
  }
  x[2] = t
}
x[0] = 3
x[1] = 4
main()
print(x[2])


これを calc.karuta としてセーブしてある。前回、動作することを確認してある。

さて、コンパイルして、Verilog ファイルを生成しよう。
karuta calc.karuta --complie
を実行した。
karuta_11_191022.png

calc.iroha と calc.v が生成されている。
calc.iroha を貼っておく。

(PARAMS
 (RESET-POLARITY true))
(PLATFORM default
  (DEF
    (COND (AND))
    (VALUE (DELAY 1))))
(ARRAY-IMAGE 1 ()
 (3 4 25 0))
(MODULE 1 main
  (PARAMS)
  (TABLE 1 $thr_main
    (REGISTERS
      (REGISTER 1 anon_1
        CONST (UINT 32) 0
      )
      (REGISTER 2 anon_2
        CONST (UINT 32) 0
      )
      (REGISTER 3 anon_3
        CONST (UINT 32) 2
      )
      (REGISTER 4 anon_4
        CONST (UINT 32) 1
      )
      (REGISTER 5 anon_5
        CONST (UINT 32) 2
      )
      (REGISTER 7 main_t_1_8
        REG (UINT 32) ()
      )
      (REGISTER 8 main_i_2_9
        REG (UINT 32) ()
      )
      (REGISTER 9 main_3_10
        REG (UINT 0) ()
      )
      (REGISTER 10 main_4_11
        REG (UINT 32) ()
      )
      (REGISTER 11 main_5_12
        REG (UINT 32) ()
      )
      (REGISTER 12 main_6_13
        REG (UINT 32) ()
      )
      (REGISTER 13 main_7_14
        REG (UINT 32) ()
      )
      (REGISTER 6 main_5_12_w0i23
        WIRE (UINT 32) ()
      )
    )
    (RESOURCES
      (RESOURCE 1 tr
        () ()
        (PARAMS)
      )
      (RESOURCE 3 set
        () ()
        (PARAMS)
      )
      (RESOURCE 4 gt
        ((UINT 32) (UINT 32)) ((UINT 0))
        (PARAMS)
      )
      (RESOURCE 5 array
        () ()
        (PARAMS)
        (ARRAY 2 (UINT 32) INTERNAL RAM 1)
      )
      (RESOURCE 6 mul
        ((UINT 32) (UINT 32)) ((UINT 32))
        (PARAMS)
      )
      (RESOURCE 7 add
        ((UINT 32) (UINT 32)) ((UINT 32))
        (PARAMS)
      )
    )
    (INITIAL 1)
    (STATE 1
      (PROFILE 1 17)
      (INSN 1 tr 1 () (8) () () ())
      (INSN 4 set 3 () () (1) (7) ())
      (INSN 7 set 3 () () (2) (8) ())
    )
    (STATE 8
      (PROFILE 1 17)
      (INSN 11 tr 1 () (9) () () ())
      (INSN 10 gt 4 () () (3 8) (9) ())
    )
    (STATE 9
      (PROFILE 1 17)
      (INSN 12 tr 1 () (26 12) (9) () ())
    )
    (STATE 12
      (PROFILE 1 17)
      (INSN 16 tr 1 () (13) () () ())
      (INSN 15 array 5 (sram_read_address) () (8) () ())
    )
    (STATE 13
      (PROFILE 1 17)
      (INSN 18 tr 1 () (16) () () ())
      (INSN 17 array 5 (sram_read_data) () () (10) ())
    )
    (STATE 16
      (PROFILE 1 17)
      (INSN 22 tr 1 () (17) () () ())
      (INSN 21 array 5 (sram_read_address) () (8) () ())
    )
    (STATE 17
      (PROFILE 1 17)
      (INSN 24 tr 1 () (18) () () ())
      (INSN 23 array 5 (sram_read_data) () () (6) ())
      (INSN 25 mul 6 () () (10 6) (12) ())
      (INSN 31 add 7 () () (8 4) (8) ())
      (INSN 2 set 3 () () (6) (11) ())
    )
    (STATE 18
      (PROFILE 1 17)
      (INSN 26 tr 1 () (19) () () ())
      (INSN 27 add 7 () () (7 12) (13) ())
    )
    (STATE 19
      (PROFILE 1 17)
      (INSN 28 tr 1 () (8) () () ())
      (INSN 29 set 3 () () (13) (7) ())
    )
    (STATE 26
      (PROFILE 1 17)
      (INSN 38 tr 1 () (29) () () ())
      (INSN 37 array 5 (sram_write) () (5 7) () ())
    )
    (STATE 29
      (PROFILE 1 17)
    )
  )
)


次に calc.v を貼っておく。

// Generated from iroha-0.0.1.

// SRAM(1 port(s))
`ifndef SRAM_2_32_defined
 `define SRAM_2_32_defined
module SRAM_2_32(
  input clk,
  input rst,
  input [1:0] addr_i,
  output reg [31:0] rdata_o,
  input [31:0] wdata_i,
  input write_en_i);

  reg [31:0] data [0:3];

  always @(posedge clk) begin
    if (rst) begin
      data[0] <= 3;
      data[1] <= 4;
      data[2] <= 25;
      data[3] <= 0;
    end else begin
      if (write_en_i) begin
        data[addr_i] <= wdata_i;
      end
    end
  end
  // Read
  always @(addr_i or clk) begin
    rdata_o = data[addr_i];
  end
endmodule
`endif  // SRAM_2_32_defined


// Module 1;
module calc_main(
  input clk,
  input rst);

  // State decls
  // state names
  localparam S_1_1 = 1;
  localparam S_1_8 = 8;
  localparam S_1_9 = 9;
  localparam S_1_12 = 12;
  localparam S_1_13 = 13;
  localparam S_1_16 = 16;
  localparam S_1_17 = 17;
  localparam S_1_18 = 18;
  localparam S_1_19 = 19;
  localparam S_1_26 = 26;
  localparam S_1_29 = 29;
  reg [5:0] st_1;

  // Shared wires
  // Shared insn wires
  // Shared insn assigns

  // Registers for table 1
  reg  [31:0] main_t_1_8; // main_t_1_8
  reg  [31:0] main_i_2_9; // main_i_2_9
  reg  main_3_10; // main_3_10
  reg  [31:0] main_4_11; // main_4_11
  reg  [31:0] main_5_12; // main_5_12
  reg  [31:0] main_6_13; // main_6_13
  reg  [31:0] main_7_14; // main_7_14
  wire  [31:0] main_5_12_w0i23; // main_5_12_w0i23

  // Insn wires for table 1
  wire  [31:0] insn_o_1_4_0;
  wire  [31:0] insn_o_1_7_0;
  wire  insn_o_1_10_0;
  wire  [31:0] insn_o_1_17_0;
  wire  [31:0] insn_o_1_23_0;
  wire  [31:0] insn_o_1_25_0;
  wire  [31:0] insn_o_1_31_0;
  wire  [31:0] insn_o_1_2_0;
  wire  [31:0] insn_o_1_27_0;
  wire  [31:0] insn_o_1_29_0;

  // Insn values for table 1
  assign insn_o_1_10_0 = gt_1_4_d0;
  assign insn_o_1_17_0 = sram_rdata_5;
  assign insn_o_1_23_0 = sram_rdata_5;
  assign main_5_12_w0i23 = insn_o_1_23_0;
  assign insn_o_1_25_0 = mul_1_6_d0;
  assign insn_o_1_31_0 = add_1_7_d0;
  assign insn_o_1_27_0 = add_1_7_d0;

  // Resources for table 1
  // gt:4
  wire [31:0] gt_1_4_s0;
  assign gt_1_4_s0 = 32'd2;
  wire [31:0] gt_1_4_s1;
  assign gt_1_4_s1 = main_i_2_9;
  wire gt_1_4_d0;
  assign gt_1_4_d0 = gt_1_4_s0 > gt_1_4_s1;
  reg [1:0] sram_addr_5;
  wire [31:0] sram_rdata_5;
  reg [31:0] sram_wdata_5;
  reg sram_wdata_en_5;
  // mul:6
  wire [31:0] mul_1_6_s0;
  assign mul_1_6_s0 = main_4_11;
  wire [31:0] mul_1_6_s1;
  assign mul_1_6_s1 = main_5_12_w0i23;
  wire [31:0] mul_1_6_d0;
  assign mul_1_6_d0 = mul_1_6_s0 * mul_1_6_s1;
  // add:7
  wire [31:0] add_1_7_s0;
  assign add_1_7_s0 = (st_1 == S_1_18) ? main_t_1_8 : (main_i_2_9);
  wire [31:0] add_1_7_s1;
  assign add_1_7_s1 = (st_1 == S_1_18) ? main_6_13 : (32'd1);
  wire [31:0] add_1_7_d0;
  assign add_1_7_d0 = add_1_7_s0 + add_1_7_s1;

  // Table 1
  always @(posedge clk) begin
    if (rst) begin
      st_1 <= S_1_1;
    end else begin
      sram_wdata_en_5 <= (st_1 == 26);
      case (st_1)
        S_1_1: begin
          main_t_1_8 <= 32'd0;
          main_i_2_9 <= 32'd0;
          st_1 <= S_1_8;
        end
        S_1_8: begin
          main_3_10 <= insn_o_1_10_0;
          st_1 <= S_1_9;
        end
        S_1_9: begin
          if (main_3_10) begin
            st_1 <= S_1_12;
          end else begin
            st_1 <= S_1_26;
          end
        end
        S_1_12: begin
          sram_addr_5 <= main_i_2_9;
          st_1 <= S_1_13;
        end
        S_1_13: begin
          main_4_11 <= insn_o_1_17_0;
          st_1 <= S_1_16;
        end
        S_1_16: begin
          sram_addr_5 <= main_i_2_9;
          st_1 <= S_1_17;
        end
        S_1_17: begin
          main_5_12 <= main_5_12_w0i23;
          main_6_13 <= insn_o_1_25_0;
          main_i_2_9 <= insn_o_1_31_0;
          st_1 <= S_1_18;
        end
        S_1_18: begin
          main_7_14 <= insn_o_1_27_0;
          st_1 <= S_1_19;
        end
        S_1_19: begin
          main_t_1_8 <= main_7_14;
          st_1 <= S_1_8;
        end
        S_1_26: begin
          sram_addr_5 <= 32'd2;
          sram_wdata_5 <= main_t_1_8;
          st_1 <= S_1_29;
        end
        S_1_29: begin
        end
      endcase
    end
  end
  SRAM_2_32 SRAM_2_32_inst_5(.clk(clk), .rst(rst), .addr_i(sram_addr_5), .rdata_o(sram_rdata_5), .wdata_i(sram_wdata_5), .write_en_i(sram_wdata_en_5));

endmodule // main
module calc(
  input clk,
  input rst);
  calc_main calc_main_inst(.clk(clk), .rst(rst));

endmodule

// NOTE: Please copy the follwoing line to your design.
// calc calc_inst(.clk(), .rst());
// NOTE: This can be used by your script to auto generate the instantiation and connections.
// :connection: calc:calc_inst input:0::clk,input:0::rst

  1. 2019年10月22日 05:39 |
  2. Karuta
  3. | トラックバック:0
  4. | コメント:0

高位合成言語+ツールのKaruta を使ってみる1(Karuta をインストール)

高位合成言語+ツールのKaruta を使ってみようと思う。
Karuta の記事としては、次のものがある。
FPGA向け論理回路設計のためのプログラミング言語処理系 Karuta の紹介
Karuta言語でLチカ(LED点滅)を書いてみる

Karuta のGitHub が nlsynth/karuta にある。

まずは、私のパソコンのOS はUbutnu 18.04 なので、GitHub で紹介されている様にインストールする。
sudo snap install karuta
karuta_1_191021.png

インストールはとても簡単だ。

Karuta のソースコードや生成物を置くために Karuta_work を作った。
mkdir Karuta_work
cd Karuta_work


Karuta_work に”FPGA向け論理回路設計のためのプログラミング言語処理系 Karuta の紹介”からコードを引用する。まずは、hello.karuta を引用する。コードをコピー&ペーストした。
karuta_2_191021.png

func main() {
  print(“Hello, world!”)
}
main()


ターミナルで、次のコマンドを実行した。
karuta hello.karuta
karuta_3_191021.png

シンタックスエラーだった。
え〜。なんで? print 文だけにしてやってみた。
karuta_4_191021.png

print(“Hello, world!”)


やはりシンタックスエラーだった。
karuta_5_191021.png

ソースコードを見ているうちに、”がおかしいことに気がついた。あ〜、”が全角だ。。。すかさず半角に修正した。
karuta_6_191021.png

もう一度
karuta hello.karuta
を実行すると、”Hello, world!”が表示された。やはり、”が全角なのが問題のようだ。
karuta_7_191021.png

func main() {
    print("Hello, world!")
}
main()

も、”を全角から半角に変更したら、”Hello, world!”が表示された。

FPGA向け論理回路設計のためのプログラミング言語処理系 Karuta の紹介”の次の演算のチュートリアルをやってみよう。
calc.karuta とファイル名を付けた。ソースコードを引用する。
karuta_8_191021.png

shared x int[4]

func main() {
  var t int = 0
  for (var i int = 0; i < 2; ++i) {
    t += x[i] * x[i]
  }
  x[2] = t
}
x[0] = 3
x[1] = 4
main()
print(x[2])


karuta calc.karuta
を実行した。5行目でエラーになった。今度は何でエラーになるのだろう?
karuta_9_191021.png

(2019/10/22:追記)
Karuta の開発者の @neonlightdev さんに教えてもらったのですが、( ) が要らないそうです。

shared x int[4]

func main() {
  var t int = 0
  for var i int = 0; i < 2; ++i {
    t += x[i] * x[i]
  }
  x[2] = t
}
x[0] = 3
x[1] = 4
main()
print(x[2])


これで
karuta calc.karuta
すると、 25 という結果がでました。
karuta_10_191022.png
  1. 2019年10月21日 05:21 |
  2. Karuta
  3. | トラックバック:0
  4. | コメント:0

Ultra96-V2 の高速、低速コネクタ用PMOD 拡張基板9(フットプリントを確認)

Ultra96-V2 の高速、低速コネクタ用PMOD 拡張基板8(基板到着)”の続き。

Ultra96 の高速コネクタに勘合する TE5179031-2 が届いたのでフットプリントを確かめてみた。
取り付け穴もバッチリ入って問題ない。パッドも合っている。良かった。。。
Ultra96V2_HL_exp_board_34_191020.jpg

Ultra96V2_HL_exp_board_35_191020.jpg

次に 8 個入り集合抵抗チップネットワーク抵抗器 CND2A10Y 1kΩ のフットプリントを確かめてみた。
こっちも問題ない。
問題はないのだが、目ではんだ付けするパッドが見えない。。。うまくはんだ付けできるかどうか?とっても不安だ。。。フラックスを塗りたくれば行ける???
Ultra96V2_HL_exp_board_32_191020.jpg

Ultra96V2_HL_exp_board_33_191020.jpg

1.2V の電源モジュールの TRACO Power TSR 1-0512SMのフットプリントも確認してみたが、行けそうだ。

ちゃんとした 0.3 mm の糸ハンダ買ったほうが良さそう。
以前購入した”uxcell ソリッドはんだ ハンダ リール 0.3mm径 フラックスコア63%錫37%鉛ロングワイヤーリール”だと 0.3 mm と書いてはあっても、実際の太さは 0.4 mm 程度なので、太い感じだ。
  1. 2019年10月20日 08:35 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:2

SDx のUltra96-V2 用プラットフォームを作る13(Linuxでは失敗した)

SDx のUltra96-V2 用プラットフォームを作る12(トラブルシューティング)”の続き。

前回は、Linux のSDx アプリケーション・プロジェクトを作成したが、Root FS が起動しなかった原因を究明した。今回は、LinuxConfig で作成したSDx アプリケーション・プロジェクトの実行ファイルを動作させたい。結論から言うとSDx アプリケーション・プロジェクトの実行ファイルの動作に失敗した。

前回の対処によって、PetaLinux が起動した。良かった。。。
SDx_platform_143_191019.png

Micro SD カードの第1パーティションは、/run/media/mmcblk0p1/ ディレクトリにマウントされていた。そこに cd する。
cd /run/media/mmcblk0p1/

SDx アプリケーション・プロジェクトの実行ファイルを実行した。
./sdx_app1_linux.elf
すると、libsds_lib.so がオープンできないというエラーになった。

./sdx_app1_linux.elf: error while loading shared libraries: libsds_lib.so: cannot open shared object file: No such file or directory


aarch64-linux ディレクトリにある libsds_lib.so を /lib ディレクトリにコピーした。
cp aarch64-linux/libsds_lib.so /lib

再度、SDx アプリケーション・プロジェクトの実行ファイルを実行した。
./sdx_app1_linux.elf
途中から、どこかに行って帰ってこない。

root@Ultra96V2_Platform1:/run/media/mmcblk0p1# ./sdx_app1_linux.elf 
[  108.348099] xlnk_eng_probe ...
[  108.351179] uio name xilinx-xlnk-eng.0
[  108.354954] xilinx-xlnk-eng xilinx-xlnk-eng.0: physical base : 0xa0000000
[  108.361737] xilinx-xlnk-eng xilinx-xlnk-eng.0: register range : 0x10000
[  108.368343] xilinx-xlnk-eng xilinx-xlnk-eng.0: base remapped to: 0xffffff800c3a0000
[  108.376181] xilinx-xlnk-eng xilinx-xlnk-eng.0: xilinx-xlnk-eng uio registered


sDx アプリケーション・プロジェクトの実行ファイルの実行に失敗した。
もしかして、PetaLinux 2018.3 はUbuntu 18.04 に対応していないので、まずいのかも知れない?
うまく、行っているようだったが、コンフィグやビルドの途中でワーニング出ていた。

最後にLinux の起動メッセージを貼っておく。

Xilinx Zynq MP First Stage Boot Loader 
Release 2018.3   Oct  8 2019  -  12:00:21
PMUFW: v1.1


U-Boot 2018.01 (Oct 17 2019 - 19:54:36 +0000) Xilinx ZynqMP ZCU102 rev1.0

I2C:   ready
DRAM:  2 GiB
usb dr_mode not found
usb dr_mode not found
EL Level: EL2
Chip ID: zu3eg
MMC:   Card did not respond to voltage select!
mmc_init: -95, time 27
mmc@ff170000 - probe failed: -95
mmc@ff160000: 0 (SD)Card did not respond to voltage select!
mmc_init: -95, time 28

*** Warning - bad CRC, using default environment

In:    serial@ff010000
Out:   serial@ff010000
Err:   serial@ff010000
Board: Xilinx ZynqMP
Bootmode: SD_MODE
U-BOOT for Ultra96V2_Platform1

Hit any key to stop autoboot:  0 
Device: mmc@ff160000
Manufacturer ID: 74
OEM: 4a60
Name: USD   
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
7101232 bytes read in 518 ms (13.1 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x10000104
     Data Size:    7067378 Bytes = 6.7 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   f05bfca5208455fad771d8f0bd19e09ea74e0e4b
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x106bd8fc
     Data Size:    31933 Bytes = 31.2 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   2ca03e014afc4555b58d49bd4ec040ccba428ae3
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x106bd8fc
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 0000000007ff5000, end 0000000007fffcbc ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.3 (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 SMP Thu Oct 17 19:55:49 UTC 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: xlnx,zynqmp
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 1024 MiB at 0x000000003fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe76000 s45976 r8192 d31848 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516867
[    0.000000] Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 998268K/2096128K available (10108K kernel code, 662K rwdata, 3212K rodata, 512K init, 2360K bss, 49284K reserved, 1048576K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a60000   ( 10112 KB)
[    0.000000]     .rodata : 0xffffff8008a60000 - 0xffffff8008d90000   (  3264 KB)
[    0.000000]       .init : 0xffffff8008d90000 - 0xffffff8008e10000   (   512 KB)
[    0.000000]       .data : 0xffffff8008e10000 - 0xffffff8008eb5a00   (   663 KB)
[    0.000000]        .bss : 0xffffff8008eb5a00 - 0xffffff8009103b30   (  2361 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024e7e0, max_idle_ns: 440795205315 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008397] Console: colour dummy device 80x25
[    0.012481] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.022840] pid_max: default: 32768 minimum: 301
[    0.027536] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.034095] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.041946] ASID allocator initialised with 65536 entries
[    0.046594] Hierarchical SRCU implementation.
[    0.051179] EFI services will not be available.
[    0.055386] zynqmp_plat_init Platform Management API v1.1
[    0.060728] zynqmp_plat_init Trustzone version v1.0
[    0.065676] smp: Bringing up secondary CPUs ...
[    0.070348] Detected VIPT I-cache on CPU1
[    0.070388] CPU1: Booted secondary processor [410fd034]
[    0.070687] Detected VIPT I-cache on CPU2
[    0.070705] CPU2: Booted secondary processor [410fd034]
[    0.070982] Detected VIPT I-cache on CPU3
[    0.071001] CPU3: Booted secondary processor [410fd034]
[    0.071042] smp: Brought up 1 node, 4 CPUs
[    0.101641] SMP: Total of 4 processors activated.
[    0.106314] CPU features: detected feature: 32-bit EL0 Support
[    0.112112] CPU: All CPU(s) started at EL2
[    0.116185] alternatives: patching kernel code
[    0.121665] devtmpfs: initialized
[    0.127664] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.133575] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.165080] xor: measuring software checksum speed
[    0.204048]    8regs     :  2303.000 MB/sec
[    0.244077]    8regs_prefetch:  2053.000 MB/sec
[    0.284109]    32regs    :  2830.000 MB/sec
[    0.324142]    32regs_prefetch:  2379.000 MB/sec
[    0.324173] xor: using function: 32regs (2830.000 MB/sec)
[    0.328570] pinctrl core: initialized pinctrl subsystem
[    0.334356] NET: Registered protocol family 16
[    0.339264] vdso: 2 pages (1 code @ ffffff8008a66000, 1 data @ ffffff8008e14000)
[    0.345444] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.352781] DMA: preallocated 256 KiB pool for atomic allocations
[    0.379639] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.381627] ARM CCI_400_r1 PMU driver probed
[    0.386251] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
[    0.400798] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.469933] raid6: int64x1  gen()   400 MB/s
[    0.537939] raid6: int64x1  xor()   446 MB/s
[    0.605945] raid6: int64x2  gen()   686 MB/s
[    0.674006] raid6: int64x2  xor()   603 MB/s
[    0.742066] raid6: int64x4  gen()  1042 MB/s
[    0.810116] raid6: int64x4  xor()   742 MB/s
[    0.878176] raid6: int64x8  gen()   980 MB/s
[    0.946186] raid6: int64x8  xor()   745 MB/s
[    1.014304] raid6: neonx1   gen()   727 MB/s
[    1.082323] raid6: neonx1   xor()   853 MB/s
[    1.150367] raid6: neonx2   gen()  1168 MB/s
[    1.218402] raid6: neonx2   xor()  1208 MB/s
[    1.286459] raid6: neonx4   gen()  1506 MB/s
[    1.354516] raid6: neonx4   xor()  1442 MB/s
[    1.422565] raid6: neonx8   gen()  1651 MB/s
[    1.490615] raid6: neonx8   xor()  1534 MB/s
[    1.490644] raid6: using algorithm neonx8 gen() 1651 MB/s
[    1.494611] raid6: .... xor() 1534 MB/s, rmw enabled
[    1.499540] raid6: using neon recovery algorithm
[    1.505246] SCSI subsystem initialized
[    1.508048] usbcore: registered new interface driver usbfs
[    1.513330] usbcore: registered new interface driver hub
[    1.518604] usbcore: registered new device driver usb
[    1.523654] media: Linux media interface: v0.10
[    1.528107] Linux video capture interface: v2.00
[    1.532709] pps_core: LinuxPPS API ver. 1 registered
[    1.537601] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.546694] PTP clock support registered
[    1.550594] EDAC MC: Ver: 3.0.0
[    1.554074] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.560735] FPGA manager framework
[    1.564012] fpga-region fpga-full: FPGA Region probed
[    1.569013] Advanced Linux Sound Architecture Driver Initialized.
[    1.575278] Bluetooth: Core ver 2.22
[    1.578537] NET: Registered protocol family 31
[    1.582927] Bluetooth: HCI device and connection manager initialized
[    1.589245] Bluetooth: HCI socket layer initialized
[    1.594086] Bluetooth: L2CAP socket layer initialized
[    1.599117] Bluetooth: SCO socket layer initialized
[    1.604607] clocksource: Switched to clocksource arch_sys_counter
[    1.610119] VFS: Disk quotas dquot_6.6.0
[    1.613942] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.625017] NET: Registered protocol family 2
[    1.625410] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.632339] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.639148] TCP: Hash tables configured (established 16384 bind 16384)
[    1.645398] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.651299] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.657806] NET: Registered protocol family 1
[    1.662230] RPC: Registered named UNIX socket transport module.
[    1.667876] RPC: Registered udp transport module.
[    1.672542] RPC: Registered tcp transport module.
[    1.677211] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.684238] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.691076] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.699200] audit: initializing netlink subsys (disabled)
[    1.703839] audit: type=2000 audit(1.648:1): state=initialized audit_enabled=0 res=1
[    1.704203] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.718582] NFS: Registering the id_resolver key type
[    1.722910] Key type id_resolver registered
[    1.727037] Key type id_legacy registered
[    1.731022] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.737692] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    1.767374] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.769125] io scheduler noop registered
[    1.773012] io scheduler deadline registered
[    1.777263] io scheduler cfq registered (default)
[    1.781921] io scheduler mq-deadline registered
[    1.786418] io scheduler kyber registered
[    1.791823] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.797102] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    1.803786] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    1.810703] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    1.817626] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    1.824538] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    1.831463] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    1.838380] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    1.845300] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    1.852298] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    1.859138] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    1.866062] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    1.872981] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    1.879899] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    1.886818] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    1.893741] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    1.900669] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    1.945386] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.949578] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.956982] brd: module loaded
[    1.961333] loop: module loaded
[    1.962248] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.967652] libphy: Fixed MDIO Bus: probed
[    1.970473] tun: Universal TUN/TAP device driver, 1.6
[    1.974588] CAN device driver interface
[    1.979055] usbcore: registered new interface driver asix
[    1.983563] usbcore: registered new interface driver ax88179_178a
[    1.989586] usbcore: registered new interface driver cdc_ether
[    1.995373] usbcore: registered new interface driver net1080
[    2.001000] usbcore: registered new interface driver cdc_subset
[    2.006877] usbcore: registered new interface driver zaurus
[    2.012425] usbcore: registered new interface driver cdc_ncm
[    2.018443] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    2.024750] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.030731] ehci-pci: EHCI PCI platform driver
[    2.035412] usbcore: registered new interface driver uas
[    2.040449] usbcore: registered new interface driver usb-storage
[    2.046948] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    2.053614] i2c /dev entries driver
[    2.057414] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 31
[    2.063136] IR NEC protocol handler initialized
[    2.067407] IR RC5(x/sz) protocol handler initialized
[    2.072421] IR RC6 protocol handler initialized
[    2.076920] IR JVC protocol handler initialized
[    2.081416] IR Sony protocol handler initialized
[    2.086002] IR SANYO protocol handler initialized
[    2.090672] IR Sharp protocol handler initialized
[    2.095343] IR MCE Keyboard/mouse protocol handler initialized
[    2.101139] IR XMP protocol handler initialized
[    2.106961] usbcore: registered new interface driver uvcvideo
[    2.111349] USB Video Class driver (1.1.1)
[    2.115954] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff800918d000 with timeout 60s
[    2.124504] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer at ffffff8009195000 with timeout 10s
[    2.133426] Bluetooth: HCI UART driver ver 2.3
[    2.137648] Bluetooth: HCI UART protocol H4 registered
[    2.142747] Bluetooth: HCI UART protocol BCSP registered
[    2.148044] Bluetooth: HCI UART protocol LL registered
[    2.153127] Bluetooth: HCI UART protocol ATH3K registered
[    2.158489] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.164755] Bluetooth: HCI UART protocol Intel registered
[    2.170084] Bluetooth: HCI UART protocol QCA registered
[    2.175305] usbcore: registered new interface driver bcm203x
[    2.180922] usbcore: registered new interface driver bpa10x
[    2.186457] usbcore: registered new interface driver bfusb
[    2.191905] usbcore: registered new interface driver btusb
[    2.197328] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    2.203000] usbcore: registered new interface driver ath3k
[    2.208530] EDAC MC: ECC not enabled
[    2.212085] EDAC DEVICE0: Giving out device to module edac controller cache_err: DEV edac (POLLED)
[    2.221028] EDAC DEVICE1: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    2.233195] sdhci: Secure Digital Host Controller Interface driver
[    2.239108] sdhci: Copyright(c) Pierre Ossman
[    2.243431] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.292616] mmc0: SDHCI controller on ff160000.mmc [ff160000.mmc] using ADMA 64-bit
[    2.338754] mmc0: new high speed SDHC card at address 59b4
[    2.339010] mmcblk0: mmc0:59b4 USD   7.51 GiB 
[    2.344056]  mmcblk0: p1 p2
[    2.345805] mmc1: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    2.359450] ledtrig-cpu: registered to indicate activity on CPUs
[    2.359979] usbcore: registered new interface driver usbhid
[    2.365349] usbhid: USB HID core driver
[    2.369287] xlnk xlnk: Major 244
[    2.372433] xlnk xlnk: xlnk driver loaded
[    2.376339] xlnk xlnk: xlnk_pdev is not null
[    2.382545] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    2.387381] usbcore: registered new interface driver snd-usb-audio
[    2.393963] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    2.396924] mmc1: new high speed SDIO card at address 0001
[    2.406291] Netfilter messages via NETLINK v0.30.
[    2.410904] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.416210] Initializing XFRM netlink socket
[    2.420347] NET: Registered protocol family 10
[    2.425126] Segment Routing with IPv6
[    2.428356] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    2.433811] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.439930] NET: Registered protocol family 17
[    2.443985] NET: Registered protocol family 15
[    2.448402] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.461278] Ebtables v2.0 registered
[    2.464915] can: controller area network core (rev 20170425 abi 9)
[    2.471000] NET: Registered protocol family 29
[    2.475377] can: raw protocol (rev 20170425)
[    2.479614] can: broadcast manager protocol (rev 20170425 t)
[    2.485239] can: netlink gateway (rev 20170425) max_hops=1
[    2.490745] Bluetooth: RFCOMM TTY layer initialized
[    2.495535] Bluetooth: RFCOMM socket layer initialized
[    2.500640] Bluetooth: RFCOMM ver 1.11
[    2.504349] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.509629] Bluetooth: BNEP filters: protocol multicast
[    2.514821] Bluetooth: BNEP socket layer initialized
[    2.519749] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.525634] Bluetooth: HIDP socket layer initialized
[    2.530695] 9pnet: Installing 9P2000 support
[    2.534819] Key type dns_resolver registered
[    2.539527] registered taskstats version 1
[    2.543476] Btrfs loaded, crc32c=crc32c-generic
[    2.553222] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 40, base_baud = 6249999) is a xuartps
�    2.557187] f�&��S�&SSi��k׋��+W/�*LW�Y�X��edf010000 (irq = 41, base_baud = 6249999) is a xuartps
[    2.571165] console [ttyPS0] enabled
[    2.574756] bootconsole [cdns0] disabled
[    2.574756] bootconsole [cdns0] disabled
[    2.583603] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes
[    2.594331] PLL: shutdown
[    2.597044] PLL: shutdown
[    2.600124] PLL: enable
[    2.602658] PLL: shutdown
[    2.606300] PLL: enable
[    2.608833] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    2.619526] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    2.627564] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    2.635966] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.648438] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.661169] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    2.671363] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[    2.678375] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.684981] [drm] No driver support for vblank timestamp query.
[    2.690973] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008b17768)
[    3.776618] [drm] Cannot find any crtc or sizes
[    3.781344] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
[    3.789447] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[    3.798353] dwc3-of-simple ff9d0000.usb0: dwc3_simple_set_phydata: Can't find usb3-phy
[    3.807298] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.812790] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.820675] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.829410] xhci-hcd xhci-hcd.0.auto: irq 47, io mem 0xfe200000
[    3.835457] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.842246] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.849465] usb usb1: Product: xHCI Host Controller
[    3.854332] usb usb1: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    3.861031] usb usb1: SerialNumber: xhci-hcd.0.auto
[    3.866214] hub 1-0:1.0: USB hub found
[    3.869981] hub 1-0:1.0: 1 port detected
[    3.874089] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.879574] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.887270] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.895432] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    3.902215] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.909427] usb usb2: Product: xHCI Host Controller
[    3.914295] usb usb2: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    3.920987] usb usb2: SerialNumber: xhci-hcd.0.auto
[    3.926102] hub 2-0:1.0: USB hub found
[    3.929868] hub 2-0:1.0: 1 port detected
[    3.933975] dwc3 fe200000.dwc3: couldn't register cable notifier
[    3.939981] dwc3 fe200000.dwc3: failed to initialize dual-role
[    3.945832] platform fe200000.dwc3: runtime PM trying to suspend device but active child
[    3.953917] dwc3: probe of fe200000.dwc3 failed with error -22
[    3.960160] dwc3-of-simple ff9e0000.usb1: dwc3_simple_set_phydata: Can't find usb3-phy
[    3.969234] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.974726] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    3.982683] xhci-hcd xhci-hcd.1.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.991411] xhci-hcd xhci-hcd.1.auto: irq 50, io mem 0xfe300000
[    3.997429] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    4.004213] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.011424] usb usb3: Product: xHCI Host Controller
[    4.016293] usb usb3: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    4.022985] usb usb3: SerialNumber: xhci-hcd.1.auto
[    4.028111] hub 3-0:1.0: USB hub found
[    4.031883] hub 3-0:1.0: 1 port detected
[    4.035975] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    4.041464] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    4.049157] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.057313] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
[    4.064096] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.071307] usb usb4: Product: xHCI Host Controller
[    4.076175] usb usb4: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    4.082867] usb usb4: SerialNumber: xhci-hcd.1.auto
[    4.087980] hub 4-0:1.0: USB hub found
[    4.091740] hub 4-0:1.0: 1 port detected
[    4.095857] dwc3 fe300000.dwc3: couldn't register cable notifier
[    4.101864] dwc3 fe300000.dwc3: failed to initialize dual-role
[    4.107719] platform fe300000.dwc3: runtime PM trying to suspend device but active child
[    4.115800] dwc3: probe of fe300000.dwc3 failed with error -22
[    4.122714] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01 00:00:07 UTC (7)
[    4.130806] of_cfs_init
[    4.133281] of_cfs_init: OK
[    4.136171] clk: Not disabling unused clocks
[    4.140668] ALSA device list:
[    4.143621]   #0: DisplayPort monitor
[    4.148999] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    5.080909] EXT4-fs (mmcblk0p2): recovery complete
[    5.121342] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    5.129446] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    5.135516] devtmpfs: mounted
[    5.138671] Freeing unused kernel memory: 512K
INIT: [    5.224630] [drm] Cannot find any crtc or sizes
version 2.88 booting
Starting udev
[    5.510307] udevd[1723]: starting version 3.2.2
[    5.557370] udevd[1724]: starting eudev-3.2.2
[    6.042197] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    6.078576] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Thu Oct 17 20:05:10 UTC 2019
Starting internet superserver: inetd.
INIT: Entering runlevel: 5
Configuring network interfaces... Cannot find device "eth0"
Starting Dropbear SSH server: dropbear.
Starting syslogd/klogd: done
Starting tcf-agent: OK

/bin/autologin: line 1: -e: command not found
Last login: Thu Oct 17 20:05:10 UTC 2019 on tty1
root@Ultra96V2_Platform1:~# 

  1. 2019年10月19日 05:04 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る12(トラブルシューティング)

SDx のUltra96-V2 用プラットフォームを作る11(LinuxのSDx アプリケーション・プロジェクトを作成)”の続き。

前回は、Linux のSDx アプリケーション・プロジェクトを作成したが、Root FS が起動しなかった。今回は、その原因を探っていこう。

いろいろと検索したのだが、どうもMicro SD カードのインターフェースのWrite Protection の問題のような気がする。
その問題は、ikwzm さんの”UltraZed で SD Card が書き込み不可になってしまう問題”に詳しく載っている。

UltraZed で SD Card が書き込み不可になってしまう問題”から引用させていただきます。

ZynqMP の SDIO I/F には WP(Write Protection) pin があります。この入力ピンを適切に設定していないと、何故か ZynqMP は Write Protection 状態と認識してしまいます。
この UI はちょっと紛らわしくて、普通は WP にチェックを入れないと Write Protection にならないと勘違いしてしまいますが、実はこの UI は単にピンの設定を行っているだけで、ピンの設定をしないとどうなるかは関係ないのです。で、何故か ZynqMP はこのピンを設定していないとWrite Protection 状態と認識してしまうのです。


そして、止まり方も”VFS: Unable to mount root fs on unknown-block(179,2)”で止まるということで、全く同じだ。

今回の私のVivado のブロックデザインのZynq UltraScale+ MPSoC の設定を出して見ると、WP はチェックが入っていない。
SDx_platform_138_191018.png

AVNET さんのUltra96-V2 の回路図、Ultra96-V2 Rev1 Schematic.pdf の 5 ページ目の uSD CARD INTERFACE を引用する。
SDx_platform_139_191018.png

するとWrite Protection のピンは接続されていないようだ。
よって、”UltraZed で SD Card が書き込み不可になってしまう問題”の”その3 Linux のデバイスツリーで Write Protection を無効にする”で対処しようと思う。
つまり、デバイスツリーの sdhci0 に対して、disable-wp; を追加すれば良いはず。

それには、PetaLinux のデバイスツリーを書き換える必要がある。PetaLinux のプロジェクトの dtsi ファイルを書き換えても、petalinux-build してしまうと再生成されてしまうのだが、だた1つ、自分で書き換えられる dtsi がある。それが、プロジェクト・ディレクトリ/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi だ。
その書き方は、”ZYBO (Zynq) 初心者ガイド (16) Linuxから自作IPをUIOで制御する”の”デバイスツリーを編集する”に詳しく載っている。
これを参考にさせていただいて system-user.dtsi を書き換えた。

/include/ "system-conf.dtsi"
/ {
    xlnk {
    compatible = "xlnx,xlnk-1.0";
    };    
};

&sdhci0 {
    disable-wp;
};  


なお、Xilinx フォームなどの関連記事を示す。
Beginners problems with Ultrazed-eg
ZynqMP: SD card is write protect
UltraZed IOCC SD Card RO
  1. 2019年10月18日 05:26 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る11(LinuxのSDx アプリケーション・プロジェクトを作成)

SDx のUltra96-V2 用プラットフォームを作る10(実機確認、Vivado HLS とVivado プロジェクト)”の続き。

前回は、実機確認をすると共に、Vivado HLS とVivado のプロジェクトを見た。今回は、Linux のSDx アプリケーション・プロジェクトを作成してみよう。しかし、Root FS が起動しなかった。

SDx のアプリケーション・プロジェクトを作成する。
File メニューから New -> SDx Application Project... を選択する。
New SDx Application Project ダイアログが開く。
Create a New SDx Application Project で、Project name に sdx_app1_linux を入力した。
SDx_platform_128_191015.png

Platform で Ultra96V2_Platform1 を選択した。
SDx_platform_129_191015.png

System Configuration では、System configuration に LinuxConfig を指定した。
SDx_platform_130_191015.png

Templates では、Array Partitioning を選択し、Finish ボタンをクリックする。
SDx_platform_131_191015.png

LinuxConfig の Array Partitioning アプリケーション・プロジェクトが生成された。
SDx_platform_132_191015.png

Assistant ウインドウの sdx_app1 のDebug を右クリックし、右クリックメニューからBuild を選択してビルドする。
Build が成功した。
SDx_platform_133_191016.png

Assistant ウインドウの sdx_app1_linux のDebug の下に SD Card Image ができていた。右クリックし、右クリックメニューからOpen -> Open in File Browser を選択すると、nautilus が開いて、SD Card Image のファイルが表示された。
それらのファイルをMicro SD カードの第1パーティション(FAT32 フォーマット)にコピーした。更に、libsds_lib.so と libsds_lib_dbg.so も一緒にコピーした。
SDx_platform_134_191016.png

Micro SD カードの第2パーティション(EXT4 フォーマット)には、Root FS をコピーした。(なお、sudo rm -r * の取扱にはくれぐれもご注意ください。他のディレクトリで実行して、痛い目をみないようにご注意ください。当方は責任は取れませんので、よろしくお願いします)(既存のRoot FS が入っていたので削除しました。フォーマット後でしたらこのコマンドは必要ありません)
cd /media/masaaki/ROOT_FS/
sudo rm -r *
cd ~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/images/linux/
sudo tar fxz rootfs.tar.gz -C /media/masaaki/rootfs/
sync


Micro SD カードをUltra96-V2 に挿して電源をON した。
Linux が起動したがRoot FS の読み込みのところでハングアップしてしまった。
SDx_platform_137_191016.png

起動メッセージを貼っておく。

Xilinx Zynq MP First Stage Boot Loader 
Release 2018.3   Oct  8 2019  -  12:00:21
PMUFW: v1.1


U-Boot 2018.01 (Oct 08 2019 - 11:59:09 +0000) Xilinx ZynqMP ZCU102 rev1.0

I2C:   ready
DRAM:  2 GiB
usb dr_mode not found
usb dr_mode not found
EL Level: EL2
Chip ID: zu3eg
MMC:   Card did not respond to voltage select!
mmc_init: -95, time 26
mmc@ff170000 - probe failed: -95
mmc@ff160000: 0 (SD)Card did not respond to voltage select!
mmc_init: -95, time 27

*** Warning - bad CRC, using default environment

In:    serial@ff010000
Out:   serial@ff010000
Err:   serial@ff010000
Board: Xilinx ZynqMP
Bootmode: SD_MODE
U-BOOT for Ultra96V2_Platform1

Hit any key to stop autoboot:  0 
Device: mmc@ff160000
Manufacturer ID: 74
OEM: 4a60
Name: USD   
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
7101200 bytes read in 522 ms (13 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x10000104
     Data Size:    7067370 Bytes = 6.7 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   ae816f355bfb7a88e676704d2729f895fe67bcb8
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x106bd8f4
     Data Size:    31910 Bytes = 31.2 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   081a4e04b04817b017f0138cc04e4188e6feaffe
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x106bd8f4
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 0000000007ff5000, end 0000000007fffca5 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.3 (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 SMP Tue Oct 8 12:03:49 UTC 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: xlnx,zynqmp
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 1024 MiB at 0x000000003fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe76000 s45976 r8192 d31848 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516867
[    0.000000] Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 998268K/2096128K available (10108K kernel code, 662K rwdata, 3212K rodata, 512K init, 2360K bss, 49284K reserved, 1048576K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a60000   ( 10112 KB)
[    0.000000]     .rodata : 0xffffff8008a60000 - 0xffffff8008d90000   (  3264 KB)
[    0.000000]       .init : 0xffffff8008d90000 - 0xffffff8008e10000   (   512 KB)
[    0.000000]       .data : 0xffffff8008e10000 - 0xffffff8008eb5a00   (   663 KB)
[    0.000000]        .bss : 0xffffff8008eb5a00 - 0xffffff8009103b30   (  2361 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024e7e0, max_idle_ns: 440795205315 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008388] Console: colour dummy device 80x25
[    0.012481] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.022840] pid_max: default: 32768 minimum: 301
[    0.027536] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.034095] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.041953] ASID allocator initialised with 65536 entries
[    0.046594] Hierarchical SRCU implementation.
[    0.051168] EFI services will not be available.
[    0.055385] zynqmp_plat_init Platform Management API v1.1
[    0.060728] zynqmp_plat_init Trustzone version v1.0
[    0.065676] smp: Bringing up secondary CPUs ...
[    0.070345] Detected VIPT I-cache on CPU1
[    0.070386] CPU1: Booted secondary processor [410fd034]
[    0.070687] Detected VIPT I-cache on CPU2
[    0.070706] CPU2: Booted secondary processor [410fd034]
[    0.070979] Detected VIPT I-cache on CPU3
[    0.070998] CPU3: Booted secondary processor [410fd034]
[    0.071039] smp: Brought up 1 node, 4 CPUs
[    0.101641] SMP: Total of 4 processors activated.
[    0.106314] CPU features: detected feature: 32-bit EL0 Support
[    0.112113] CPU: All CPU(s) started at EL2
[    0.116185] alternatives: patching kernel code
[    0.121664] devtmpfs: initialized
[    0.127668] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.133574] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.165121] xor: measuring software checksum speed
[    0.204042]    8regs     :  2303.000 MB/sec
[    0.244070]    8regs_prefetch:  2053.000 MB/sec
[    0.284103]    32regs    :  2830.000 MB/sec
[    0.324136]    32regs_prefetch:  2379.000 MB/sec
[    0.324168] xor: using function: 32regs (2830.000 MB/sec)
[    0.328571] pinctrl core: initialized pinctrl subsystem
[    0.334363] NET: Registered protocol family 16
[    0.339231] vdso: 2 pages (1 code @ ffffff8008a66000, 1 data @ ffffff8008e14000)
[    0.345457] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.352821] DMA: preallocated 256 KiB pool for atomic allocations
[    0.379746] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.381723] ARM CCI_400_r1 PMU driver probed
[    0.386370] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
[    0.400951] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.469929] raid6: int64x1  gen()   400 MB/s
[    0.537916] raid6: int64x1  xor()   447 MB/s
[    0.605940] raid6: int64x2  gen()   686 MB/s
[    0.673997] raid6: int64x2  xor()   603 MB/s
[    0.742073] raid6: int64x4  gen()  1042 MB/s
[    0.810113] raid6: int64x4  xor()   742 MB/s
[    0.878174] raid6: int64x8  gen()   980 MB/s
[    0.946189] raid6: int64x8  xor()   745 MB/s
[    1.014297] raid6: neonx1   gen()   727 MB/s
[    1.082319] raid6: neonx1   xor()   853 MB/s
[    1.150354] raid6: neonx2   gen()  1168 MB/s
[    1.218414] raid6: neonx2   xor()  1208 MB/s
[    1.286475] raid6: neonx4   gen()  1506 MB/s
[    1.354505] raid6: neonx4   xor()  1442 MB/s
[    1.422572] raid6: neonx8   gen()  1651 MB/s
[    1.490617] raid6: neonx8   xor()  1534 MB/s
[    1.490646] raid6: using algorithm neonx8 gen() 1651 MB/s
[    1.494610] raid6: .... xor() 1534 MB/s, rmw enabled
[    1.499541] raid6: using neon recovery algorithm
[    1.505254] SCSI subsystem initialized
[    1.508040] usbcore: registered new interface driver usbfs
[    1.513331] usbcore: registered new interface driver hub
[    1.518610] usbcore: registered new device driver usb
[    1.523655] media: Linux media interface: v0.10
[    1.528107] Linux video capture interface: v2.00
[    1.532707] pps_core: LinuxPPS API ver. 1 registered
[    1.537601] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.546695] PTP clock support registered
[    1.550595] EDAC MC: Ver: 3.0.0
[    1.554085] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.560787] FPGA manager framework
[    1.564013] fpga-region fpga-full: FPGA Region probed
[    1.569010] Advanced Linux Sound Architecture Driver Initialized.
[    1.575282] Bluetooth: Core ver 2.22
[    1.578537] NET: Registered protocol family 31
[    1.582928] Bluetooth: HCI device and connection manager initialized
[    1.589246] Bluetooth: HCI socket layer initialized
[    1.594087] Bluetooth: L2CAP socket layer initialized
[    1.599116] Bluetooth: SCO socket layer initialized
[    1.604627] clocksource: Switched to clocksource arch_sys_counter
[    1.610130] VFS: Disk quotas dquot_6.6.0
[    1.613944] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.625007] NET: Registered protocol family 2
[    1.625405] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.632342] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.639160] TCP: Hash tables configured (established 16384 bind 16384)
[    1.645394] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.651299] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.657806] NET: Registered protocol family 1
[    1.662236] RPC: Registered named UNIX socket transport module.
[    1.667877] RPC: Registered udp transport module.
[    1.672548] RPC: Registered tcp transport module.
[    1.677212] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.684237] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.691151] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.699137] audit: initializing netlink subsys (disabled)
[    1.703845] audit: type=2000 audit(1.648:1): state=initialized audit_enabled=0 res=1
[    1.704267] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.718612] NFS: Registering the id_resolver key type
[    1.722921] Key type id_resolver registered
[    1.727037] Key type id_legacy registered
[    1.731022] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.737691] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    1.767291] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.769048] io scheduler noop registered
[    1.772933] io scheduler deadline registered
[    1.777185] io scheduler cfq registered (default)
[    1.781843] io scheduler mq-deadline registered
[    1.786340] io scheduler kyber registered
[    1.791743] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.797033] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    1.803710] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    1.810624] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    1.817546] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    1.824466] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    1.831382] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    1.838309] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    1.845228] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    1.852219] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    1.859059] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    1.865980] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    1.872904] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    1.879825] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    1.886745] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    1.893669] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    1.900587] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    1.935103] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.939143] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.948055] brd: module loaded
[    1.952779] loop: module loaded
[    1.953617] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.959309] libphy: Fixed MDIO Bus: probed
[    1.961904] tun: Universal TUN/TAP device driver, 1.6
[    1.966088] CAN device driver interface
[    1.970424] usbcore: registered new interface driver asix
[    1.975011] usbcore: registered new interface driver ax88179_178a
[    1.981037] usbcore: registered new interface driver cdc_ether
[    1.986819] usbcore: registered new interface driver net1080
[    1.992441] usbcore: registered new interface driver cdc_subset
[    1.998323] usbcore: registered new interface driver zaurus
[    2.003878] usbcore: registered new interface driver cdc_ncm
[    2.009871] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    2.016298] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.022185] ehci-pci: EHCI PCI platform driver
[    2.026850] usbcore: registered new interface driver uas
[    2.031898] usbcore: registered new interface driver usb-storage
[    2.038412] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    2.045062] i2c /dev entries driver
[    2.048882] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 31
[    2.054585] IR NEC protocol handler initialized
[    2.058853] IR RC5(x/sz) protocol handler initialized
[    2.063867] IR RC6 protocol handler initialized
[    2.068365] IR JVC protocol handler initialized
[    2.072862] IR Sony protocol handler initialized
[    2.077447] IR SANYO protocol handler initialized
[    2.082118] IR Sharp protocol handler initialized
[    2.086789] IR MCE Keyboard/mouse protocol handler initialized
[    2.092584] IR XMP protocol handler initialized
[    2.098366] usbcore: registered new interface driver uvcvideo
[    2.102794] USB Video Class driver (1.1.1)
[    2.107401] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff800918d000 with timeout 60s
[    2.116144] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer at ffffff8009195000 with timeout 10s
[    2.124878] Bluetooth: HCI UART driver ver 2.3
[    2.129095] Bluetooth: HCI UART protocol H4 registered
[    2.134207] Bluetooth: HCI UART protocol BCSP registered
[    2.139491] Bluetooth: HCI UART protocol LL registered
[    2.144573] Bluetooth: HCI UART protocol ATH3K registered
[    2.149935] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.156200] Bluetooth: HCI UART protocol Intel registered
[    2.161527] Bluetooth: HCI UART protocol QCA registered
[    2.166754] usbcore: registered new interface driver bcm203x
[    2.172366] usbcore: registered new interface driver bpa10x
[    2.177902] usbcore: registered new interface driver bfusb
[    2.183353] usbcore: registered new interface driver btusb
[    2.188774] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    2.194445] usbcore: registered new interface driver ath3k
[    2.199979] EDAC MC: ECC not enabled
[    2.203533] EDAC DEVICE0: Giving out device to module edac controller cache_err: DEV edac (POLLED)
[    2.212473] EDAC DEVICE1: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    2.224644] sdhci: Secure Digital Host Controller Interface driver
[    2.230552] sdhci: Copyright(c) Pierre Ossman
[    2.234880] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.284631] mmc0: SDHCI controller on ff160000.mmc [ff160000.mmc] using ADMA 64-bit
[    2.330771] mmc0: new high speed SDHC card at address 59b4
[    2.331024] mmcblk0: mmc0:59b4 USD   7.51 GiB (ro)
[    2.336444]  mmcblk0: p1 p2
[    2.338166] mmc1: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    2.351796] ledtrig-cpu: registered to indicate activity on CPUs
[    2.352329] usbcore: registered new interface driver usbhid
[    2.357694] usbhid: USB HID core driver
[    2.361629] xlnk xlnk: Major 244
[    2.364791] xlnk xlnk: xlnk driver loaded
[    2.368682] xlnk xlnk: xlnk_pdev is not null
[    2.374878] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    2.379690] usbcore: registered new interface driver snd-usb-audio
[    2.386285] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    2.389255] mmc1: new high speed SDIO card at address 0001
[    2.398635] Netfilter messages via NETLINK v0.30.
[    2.403253] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.408539] Initializing XFRM netlink socket
[    2.412696] NET: Registered protocol family 10
[    2.417468] Segment Routing with IPv6
[    2.420712] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    2.426152] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.432267] NET: Registered protocol family 17
[    2.436329] NET: Registered protocol family 15
[    2.440748] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.453620] Ebtables v2.0 registered
[    2.457268] can: controller area network core (rev 20170425 abi 9)
[    2.463344] NET: Registered protocol family 29
[    2.467721] can: raw protocol (rev 20170425)
[    2.471958] can: broadcast manager protocol (rev 20170425 t)
[    2.477582] can: netlink gateway (rev 20170425) max_hops=1
[    2.483084] Bluetooth: RFCOMM TTY layer initialized
[    2.487880] Bluetooth: RFCOMM socket layer initialized
[    2.492985] Bluetooth: RFCOMM ver 1.11
[    2.496700] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.501974] Bluetooth: BNEP filters: protocol multicast
[    2.507166] Bluetooth: BNEP socket layer initialized
[    2.512094] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.517978] Bluetooth: HIDP socket layer initialized
[    2.523042] 9pnet: Installing 9P2000 support
[    2.527164] Key type dns_resolver registered
[    2.531872] registered taskstats version 1
[    2.535817] Btrfs loaded, crc32c=crc32c-generic
[    2.545583] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 40, base_baud = 6249999) is a xuartps
�    2.549556] f�&��Ӧ�&Si��k׋��+W/�*LW�Y�X��edff010000 (irq = 41, base_baud = 6249999) is a xuartps
[    2.563526] console [ttyPS0] enabled
[    2.567118] bootconsole [cdns0] disabled
[    2.567118] bootconsole [cdns0] disabled
[    2.576036] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes
[    2.586679] PLL: shutdown
[    2.589386] PLL: shutdown
[    2.592443] PLL: enable
[    2.594974] PLL: shutdown
[    2.598616] PLL: enable
[    2.601140] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    2.611817] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    2.619844] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    2.628278] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.640747] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.653476] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    2.663666] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[    2.670710] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.677316] [drm] No driver support for vblank timestamp query.
[    2.683310] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008b17768)
[    3.768639] [drm] Cannot find any crtc or sizes
[    3.773371] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
[    3.781477] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[    3.790376] dwc3-of-simple ff9d0000.usb0: dwc3_simple_set_phydata: Can't find usb3-phy
[    3.799376] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.804876] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.812756] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.821486] xhci-hcd xhci-hcd.0.auto: irq 47, io mem 0xfe200000
[    3.827534] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.834322] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.841541] usb usb1: Product: xHCI Host Controller
[    3.846409] usb usb1: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    3.853101] usb usb1: SerialNumber: xhci-hcd.0.auto
[    3.858287] hub 1-0:1.0: USB hub found
[    3.862059] hub 1-0:1.0: 1 port detected
[    3.866168] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.871659] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.879355] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.887516] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    3.894299] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.901512] usb usb2: Product: xHCI Host Controller
[    3.906380] usb usb2: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    3.913071] usb usb2: SerialNumber: xhci-hcd.0.auto
[    3.918188] hub 2-0:1.0: USB hub found
[    3.921953] hub 2-0:1.0: 1 port detected
[    3.926060] dwc3 fe200000.dwc3: couldn't register cable notifier
[    3.932065] dwc3 fe200000.dwc3: failed to initialize dual-role
[    3.937918] platform fe200000.dwc3: runtime PM trying to suspend device but active child
[    3.946003] dwc3: probe of fe200000.dwc3 failed with error -22
[    3.952237] dwc3-of-simple ff9e0000.usb1: dwc3_simple_set_phydata: Can't find usb3-phy
[    3.961357] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.966847] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    3.974816] xhci-hcd xhci-hcd.1.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.983546] xhci-hcd xhci-hcd.1.auto: irq 50, io mem 0xfe300000
[    3.989556] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    3.996341] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.003552] usb usb3: Product: xHCI Host Controller
[    4.008421] usb usb3: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    4.015113] usb usb3: SerialNumber: xhci-hcd.1.auto
[    4.020251] hub 3-0:1.0: USB hub found
[    4.024022] hub 3-0:1.0: 1 port detected
[    4.028118] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    4.033602] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    4.041295] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.049447] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
[    4.056234] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.063451] usb usb4: Product: xHCI Host Controller
[    4.068322] usb usb4: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    4.075014] usb usb4: SerialNumber: xhci-hcd.1.auto
[    4.080119] hub 4-0:1.0: USB hub found
[    4.083878] hub 4-0:1.0: 1 port detected
[    4.087982] dwc3 fe300000.dwc3: couldn't register cable notifier
[    4.093982] dwc3 fe300000.dwc3: failed to initialize dual-role
[    4.099831] platform fe300000.dwc3: runtime PM trying to suspend device but active child
[    4.107911] dwc3: probe of fe300000.dwc3 failed with error -22
[    4.114817] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01 00:00:07 UTC (7)
[    4.122907] of_cfs_init
[    4.125383] of_cfs_init: OK
[    4.128274] clk: Not disabling unused clocks
[    4.132769] ALSA device list:
[    4.135723]   #0: DisplayPort monitor
[    4.140111] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -30
[    4.148113] Please append a correct "root=" boot option; here are the available partitions:
[    4.156464] 0100           65536 ram0 
[    4.156465]  (driver?)
[    4.162561] 0101           65536 ram1 
[    4.162563]  (driver?)
[    4.168654] 0102           65536 ram2 
[    4.168656]  (driver?)
[    4.174739] 0103           65536 ram3 
[    4.174741]  (driver?)
[    4.180823] 0104           65536 ram4 
[    4.180825]  (driver?)
[    4.186908] 0105           65536 ram5 
[    4.186910]  (driver?)
[    4.192992] 0106           65536 ram6 
[    4.192994]  (driver?)
[    4.199072] 0107           65536 ram7 
[    4.199074]  (driver?)
[    4.205162] 0108           65536 ram8 
[    4.205163]  (driver?)
[    4.211251] 0109           65536 ram9 
[    4.211252]  (driver?)
[    4.217348] 010a           65536 ram10 
[    4.217350]  (driver?)
[    4.223515] 010b           65536 ram11 
[    4.223517]  (driver?)
[    4.229691] 010c           65536 ram12 
[    4.229693]  (driver?)
[    4.235858] 010d           65536 ram13 
[    4.235860]  (driver?)
[    4.242034] 010e           65536 ram14 
[    4.242036]  (driver?)
[    4.248201] 010f           65536 ram15 
[    4.248203]  (driver?)
[    4.254380] b300         7879680 mmcblk0 
[    4.254382]  driver: mmcblk
[    4.261166]   b301          102400 mmcblk0p1 10aae2eb-01
[    4.261168] 
[    4.267949]   b302         7776256 mmcblk0p2 10aae2eb-02
[    4.267950] 
[    4.274736] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[    4.283159] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx-v2018.3 #1
[    4.290366] Hardware name: xlnx,zynqmp (DT)
[    4.294534] Call trace:
[    4.296977] [<ffffff8008088c58>] dump_backtrace+0x0/0x368
[    4.302365] [<ffffff8008088fd4>] show_stack+0x14/0x20
[    4.307404] [<ffffff8008a3b2f8>] dump_stack+0x9c/0xbc
[    4.312444] [<ffffff800809bd48>] panic+0x11c/0x274
[    4.317226] [<ffffff8008d91124>] mount_block_root+0x1a8/0x27c
[    4.322961] [<ffffff8008d91430>] mount_root+0x11c/0x134
[    4.328169] [<ffffff8008d915b4>] prepare_namespace+0x16c/0x1b4
[    4.333985] [<ffffff8008d90d44>] kernel_init_freeable+0x1b8/0x1d8
[    4.340063] [<ffffff8008a4d648>] kernel_init+0x10/0x100
[    4.345278] [<ffffff8008084a90>] ret_from_fork+0x10/0x18
[    4.350574] SMP: stopping secondary CPUs
[    4.354479] Kernel Offset: disabled
[    4.357950] CPU features: 0x002004
[    4.361334] Memory Limit: none
[    4.364377] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

  1. 2019年10月17日 04:41 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

Ultra96-V2 の高速、低速コネクタ用PMOD 拡張基板8(基板到着)

Ultra96-V2 の高速、低速コネクタ用PMOD 拡張基板7(基板完成、発注)”の続き。

高速、低速コネクタ用PMOD 拡張基板が10月14日にFusionPCB より到着した。台風で遅れていた。
まだ、高速コネクタなどがMOUSER から届いていないので、お預け。高速コネクタの出っ張りが穴に勘合するか?が心配だ。
Ultra96V2_HL_exp_board_31_191016.jpg

(2019/10/17:追記)
高速コネクタに勘合するコネクタが届いて、基板に当てて見たところ、問題なく取り付け出来そうです。後は、秋月電子に頼んでいる部品が来たら部品を実装してみます。
  1. 2019年10月16日 04:26 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:2

SDx のUltra96-V2 用プラットフォームを作る10(実機確認、Vivado HLS とVivado プロジェクト)

SDx のUltra96-V2 用プラットフォームを作る9(SDxでアプリケーション・プロジェクトを生成)”の続き。

前回は、サンプルのアプリケーション・プロジェクトを作成しビルドできた。今回は、実機確認をすると共に、Vivado HLS とVivado のプロジェクトを見ていこう。

まずは、”SDx のUltra96-V2 用プラットフォームを作る9(SDxでアプリケーション・プロジェクトを生成)”で作成した sd_card ディレクトリのファイルを Micro SD カードの第1パーティションの boot ドライブに書いてUltra96-V2 の電源をON した。
gtkterm (115200 bps, 8 bit, no paritty, 1 stop bit に設定してある)にレポートが表示された。問題なく動作しているようだ。
SDx_platform_120_191014.png

Vivado HLS のプロジェクトは、sdx_app1/Debug/_sds/vhls/matmul_partition_accel/ ディレクトリにある。
SDx_platform_121_191015.png

Vivado HLS で今回のプロジェクトを開いた。
SDx_platform_122_191015.png

合成レポートを示す。
SDx_platform_123_191015.png

次に、Vivado のプロジェクトは、sdx_app1/Debug/_sds/p0/vivado/prj/ ディレクトリにある。
SDx_platform_124_191015.png

Vivado プロジェクトを示す。
SDx_platform_125_191015.png

Summary を示す。
SDx_platform_126_191015.png

積和演算回路をハードウェアにオフロードしているようなので、DSP がかなり使用されている。
Timing も問題ない。

ブロックデザインを示す。
SDx_platform_127_191015.png

ハードウェア・プラットフォームに Vivado HLS で生成された matmul_partition_accel_1 モジュールとそれとのインターフェースを行う matmul_partition_accel_1_if モジュールが追加されているのが分かる。その他、AXI Interconnect などが追加されている。
  1. 2019年10月15日 04:57 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る9(SDxでアプリケーション・プロジェクトを生成)

SDx のUltra96-V2 用プラットフォームを作る8(SDxでプラットフォーム・プロジェクトを生成)”の続き。

前回は、SDx を立ち上げてプラットフォーム・プロジェクトを生成し、ビルドした。今回は、アプリケーション・プロジェクトを作成しビルドする。

今回参考にするのは、”2018.3 SDSoC™ Development Environment Tutorials”の”Lab 3: Using Your Custom Platform”だ。
更に”Building Custom SDSoC Platform with PetaLinux”の”Step 4. Applications: Building applications on custom platform”を参考にする。

さて、SDx のアプリケーション・プロジェクトを作成する。
File メニューから New -> SDx Application Project... を選択する。
New SDx Application Project ダイアログが開く。
Create a New SDx Application Project で、Project name に sdx_app1 を入力した。
SDx_platform_108_191014.png

Platform で Ultra96V2_Platform1 を選択した。
SDx_platform_109_191014.png

System Configuration では、ベアメタル・アプリケーションを選択した。つまり、System Configuration で sysconfig1 、Domain では、standalone on psu_cortex_a53 (たぶん)を選択した。
SDx_platform_110_191014.png

Template では、SDx Examples... ボタンをクリックして、SDx のExamples をダウンロードする。
SDx_platform_111_191014.png

SDSoC Examples Repository のDownload ボタンをクリックする。
SDx_platform_112_191014.png

ダウンロードできるExamples が表示された。OKボタンをクリックする。
SDx_platform_113_191014.png

Templates にダウンロードしたExamples が入る。
Array Partitioning を選択し、Finish ボタンをクリックする。
SDx_platform_114_191014.png

Array Partitioning アプリケーション・プロジェクトが生成された。
SDx_platform_115_191014.png

Assistant ウインドウの sdx_app1 のDebug を右クリックし、右クリックメニューからBuild を選択してビルドする。
するとエラーが発生した。
SDx_platform_116_191014.png

ERROR: [Common 17-70] Application Exception: Not found in path: gmake


gmake が無いと言っている。検索すると、”[Ubuntu 16.04 LTS] Ubuntuでgmakeが見つかりませんとエラーが出たら”が見つかった。そのブログによると、gmake は make をシンボリックリンクすれば良いようだ。
sudo ln -s /usr/bin/make /usr/bin/gmake
SDx_platform_117_191014.png

もう一度、Assistant ウインドウの sdx_app1 のDebug を右クリックし、右クリックメニューからBuild を選択してビルドすると成功した。
SDx_platform_118_191014.png

Assistant ウインドウの sdx_app1 のDebug の下に SD Card Image ができていた。右クリックし、右クリックメニューからOpen -> Open in File Browser を選択すると、nautilus が開いて、SD Card Image のファイルが表示された。
SDx_platform_119_191014.png
  1. 2019年10月14日 09:08 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る8(SDxでプラットフォーム・プロジェクトを生成)

SDx のUltra96-V2 用プラットフォームを作る8(PetaLinuxプロジェクト4)”の続き。

前回は、PetaLinux 2018.3 からスタテック・リンクされていたライブラリ(libsds_lib.so)がダイナミック・リンクに変更になっているので、その処理を行った。今回は、PetaLinux での作業は終了したので、SDx を立ち上げてプラットフォーム・プロジェクトを生成し、ビルドしていこう。

今回参考にさせていただくのは、”2018.3 SDSoC™ Development Environment Tutorials”の”Lab 2: Creating the SDSoC Platform” の”Step 1: Launching the SDx™ IDE”と”Step 2: Creating a New Platform Project”と”Step 3: Defining the System Configuration and Generating the Platform”だけど、Ultra96V2 用なので、アレンジを加えていく。

SDx を立ち上げた。
まずは、source コマンドで、SDx のsettings64.sh を起動して、環境を整えた。
sdx でSDx を起動した。
ワークスペースを聞かれるので、適当なディレクトリを指定した。
SDx_platform_94_191011.png

SDx が立ち上がった。
SDx_platform_95_191011.png

SDx の File メニューから New -> SDx Platform Project... を選択した。

New Platform Project ダイアログが表示された。
Create new platform project 画面でProject name に Ultra96V2_Platform1 を設定した。
SDx_platform_96_191011.png

platform project 画面で、デフォルトのCreate from hardware specification のラジオボタンが選択されているのを確認する。
SDx_platform_97_191011.png

Platform Project Specification 画面では、Platform Project Specification 画面では、Hardware Specification のDSA/HDF file: に /home/masaaki/HDL/Ultra96/SDx_platform/Ultra96V2_Platform1/Ultra96V2_Platform1.dsa を指定した。
SDx_platform_98_191011.png

Ultra96V2_Platform1 プラットフォーム・プロジェクトが作られた。
SDx_platform_99_191011.png

Generate prebuilt data にラジオボタンをクリックする。
+アイコンをクリックして、System Configuration を選択する。
New System Configuration ダイアログが表示された。
Name にLinuxConfig と入力した。
SDx_platform_100_191012.png

Use pre-built software components ラジオボタンをクリックする。
Boot Directory のBrows ボタンをクリックして、”SDx のUltra96-V2 用プラットフォームを作る7(PetaLinuxプロジェクト3)”で作成した ~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/images/linux/boot/ ディレクトリを選択した。
Bif File のBrows ボタンをクリックして、”SDx のUltra96-V2 用プラットフォームを作る7(PetaLinuxプロジェクト3)”で作成した ~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/images/linux/ の boot.bif を選択した。
SDx_platform_101_191012.png

+アイコンをクリックして、Domain を選択した。
Name に linux_domain と入力した。
OS は Linux を選択した。
SDx_platform_102_191012.png

LinuxConfig の下に、linux_domain が入った。
linux_domain を選択して、Image の Browse... ボタンをクリックし、”SDx のUltra96-V2 用プラットフォームを作る7(PetaLinuxプロジェクト3)”で作成した ~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/images/linux/images/ ディレクトリを選択した。
SDx_platform_103_191012.png

Ultra96V2_Platform1 -> sysconfig1 -> standalone on psu cortexa53_0 -> Board Suport Package をクリックした。
Board Suport Package の Modify BSP Settings... ボタンをクリックする。
SDx_platform_104_191012.png

stdin, stdout を psu_uart_1 に設定した。
SDx_platform_105_191012.png

Modify BSP Settings ダイアログが表示された。Yes ボタンをクリックする。
SDx_platform_106_191012.png

Ultra96V2_Platform1 プラットフォームがgenerate された。
SDx_platform_107_191012.png
  1. 2019年10月12日 08:59 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る8(PetaLinuxプロジェクト4)

SDx のUltra96-V2 用プラットフォームを作る7(PetaLinuxプロジェクト3)”の続き。

前回は、petalinux-build を行って、elf ファイルやLinux イメージを生成し、それらをSDx で利用しやすいように環境を整えた。今回は、PetaLinux 2018.3 からスタテック・リンクされていたライブラリ(libsds_lib.so)がダイナミック・リンクに変更になっているので、その処理を行う。

”プラットフォーム開発の際には、以前にスタティックにリンクされていたライブラリがダイナミックにリンクされる
ようになり (libsds_lib.so)、ボードで実行する Linux ファイル システムに含める必要があることに注意してくだ
さい。”UG1146 (v2018.3) 2019 年 1 月 24 日 プラットフォーム開発ガイド” 77 ページ(v2018.3からダイナミック・リンク・ライブラリになったようです)

今回も”Building Custom SDSoC Platform with PetaLinux”の”Step 2: Creating Petalinux for SDSoC”の”For SDSoC 2018.3 and above with PetaLinux”から設定方法を引用させていただいた。

Linux user application を作成する。
petalinux-create -t apps --template install --name mylib --enable
SDx_platform_85_191010.png

mylib ファイルを削除して、libsds_lib.so を同じディレクトリにコピーした。
rm ~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib/files/mylib

cp /tools/Xilinx/SDx/2018.3/target/aarch64-linux/lib/libsds_lib.so ~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib/files/

SDx_platform_86_191010.png

SDx_platform_87_191010.png

~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib/mylib.bb を編集した。
SDx_platform_88_191010.png

mylib.bb の内容を示す。

#
# This file is the mylib recipe.
#

SUMMARY = "Simple mylib application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://libsds_lib.so \
 "

S = "${WORKDIR}"
TARGET_CC_ARCH += "${LDFLAGS}"
do_install() {
      install -d ${D}/${bindir}
      install -m 0755 ${S}/libsds_lib.so ${D}/${bindir}
}
FILES_${PN} += "${libdir}"
FILES_SOLIBSDEV = ""


ROOT FSをビルドした。
petalinux-build -c rootfs
SDx_platform_89_191011.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1$ petalinux-build -c rootfs
[INFO] building rootfs
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image -c do_image_complete
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3460 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2570 .bb files complete (2534 cached, 36 parsed). 3462 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:05
Checking sstate mirror object availability: 100% |###############| Time: 0:00:06
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: petalinux-user-image-1.0-r0 do_rootfs: [log_check] petalinux-user-image: found 1 warning message in the logfile:
[log_check] warning: %post(sysvinit-inittab-2.88dsf-r10.plnx_zynqmp) scriptlet failed, exit status 1

NOTE: Tasks Summary: Attempted 2325 tasks of which 2303 didn't need to be rerun and all succeeded.

Summary: There were 2 WARNING messages shown.
INFO: Copying Images from deploy to images
NOTE: Failed to copy built images to tftp dir:  /tftpboot
[INFO] successfully built rootfs



次に、libsds_lib_dbg.so についても手順を繰り返す。
petalinux-create -t apps --template install --name mylib2 --enable

rm ~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib2/files/mylib2

cp /tools/Xilinx/SDx/2018.3/target/aarch64-linux/lib/libsds_lib_dbg.so ~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib2/files/

SDx_platform_90_191011.png

SDx_platform_91_191011.png

~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-apps/mylib2/mylib2.bb を編集した。
SDx_platform_92_191011.png

#
# This file is the mylib2 recipe.
#

SUMMARY = "Simple mylib2 application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://libsds_lib_dbg.so \
 "

S = "${WORKDIR}"
TARGET_CC_ARCH += "${LDFLAGS}"
do_install() {
      install -d ${D}/${bindir}
      install -m 0755 ${S}/libsds_lib_dbg.so ${D}/${bindir}
}
FILES_${PN} += "${libdir}"
FILES_SOLIBSDEV = ""


petalinux-build -c rootfs
SDx_platform_93_191011.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1$ petalinux-build -c rootfs
[INFO] building rootfs
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image -c do_image_complete
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3461 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2571 .bb files complete (2535 cached, 36 parsed). 3463 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:05
Checking sstate mirror object availability: 100% |###############| Time: 0:00:05
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: petalinux-user-image-1.0-r0 do_rootfs: [log_check] petalinux-user-image: found 1 warning message in the logfile:
[log_check] warning: %post(sysvinit-inittab-2.88dsf-r10.plnx_zynqmp) scriptlet failed, exit status 1

NOTE: Tasks Summary: Attempted 2336 tasks of which 2316 didn't need to be rerun and all succeeded.

Summary: There were 2 WARNING messages shown.
INFO: Copying Images from deploy to images
NOTE: Failed to copy built images to tftp dir:  /tftpboot
[INFO] successfully built rootfs

  1. 2019年10月11日 05:44 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

「蜜蜂と遠雷」(映画)を見てきました

昨日、「蜜蜂と遠雷」(映画)を見てきました。休暇を取って奥さんと見に行きました。
本を3回くらい読んでいて、楽しみにして見に行ったのですが、やはり、あのボリュームを2時間に収めるのは大変なんでしょう。ハリーポッター・シリーズの映画と同じ感じでした。本を読まないで、映画だけ見に行った人は分かるのかな?
  1. 2019年10月11日 05:03 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る7(PetaLinuxプロジェクト3)

SDx のUltra96-V2 用プラットフォームを作る6(PetaLinuxプロジェクト2)”の続き。

前回は、PetaLinux 2018.3 のプロジェクトの petalinux-config を行った。今回は、petalinux-build を行って、elf ファイルやLinux イメージを生成し、それらをSDx で利用しやすいように環境を整える。

今回も”Building Custom SDSoC Platform with PetaLinux”の”Step 2: Creating Petalinux for SDSoC”から設定方法を引用させていただいた。

~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-bsp/device-tree/files ディレクトリの system-user.dtsi を編集した。
SDx_platform_78_191008.png

SDx_platform_79_191008.png

system-user.dtsi の内容を示す。

/include/ "system-conf.dtsi"
/ {
    xlnk {
    compatible = "xlnx,xlnk-1.0";
    };
};



さて、準備ができたので、ビルドする。
petalinux-build
SDx_platform_80_191008.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3460 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2569 .bb files complete (2534 cached, 35 parsed). 3461 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:06
Checking sstate mirror object availability: 100% |###############| Time: 0:00:11
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: petalinux-user-image-1.0-r0 do_rootfs: [log_check] petalinux-user-image: found 1 warning message in the logfile:
[log_check] warning: %post(sysvinit-inittab-2.88dsf-r10.plnx_zynqmp) scriptlet failed, exit status 1

NOTE: Tasks Summary: Attempted 3132 tasks of which 2275 didn't need to be rerun and all succeeded.

Summary: There were 2 WARNING messages shown.
INFO: Copying Images from deploy to images
INFO: Creating images/linux directory
NOTE: Failed to copy built images to tftp dir:  /tftpboot
[INFO] successfully built project


~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/images/linux に elf やイメージが生成された。
SDx_platform_81_191008.png

~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/images/linux に boot, image ディレクトリを生成した。

boot ディレクトリには、bl31.elf, pmufw.elf, u-boot.elf を上のディレクトリからコピーした。そして、zynqmp_fsbl.elf を fsbl.elf と名前を変えて boot ディレクトリにコピーした。

image ディレクトリには、上のディレクトリから、image.ub をコピーした。
SDx_platform_82_191010.png

~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/images/linux に boot.bif を生成した。
これはフルパスで書く必要があったので、フルパスで書いた。
SDx_platform_83_191010.png

SDx_platform_84_191010.png

boot.bif の内容を示す。

the_ROM_image:
{
    [fsbl_config] a53_x64
    [bootloader] /home/masaaki/Petalinux/PetaL_Proj/Ultra96V2_Platform1/images/linux/boot/fsbl.elf
    [pmufw_image] /home/masaaki/Petalinux/PetaL_Proj/Ultra96V2_Platform1/images/linux/boot/pmufw.elf
    [destination_device=pl] /home/masaaki/HDL/Ultra96/SDx_platform/Ultra96V2_Platform1/Ultra96V2_Platform1.runs/impl_1/Ultra96V2_Platform1_wrapper.bit
    [destination_cpu=a53-0, exception_level=el-3, trustzone] /home/masaaki/Petalinux/PetaL_Proj/Ultra96V2_Platform1/images/linux/boot/bl31.elf
    [destination_cpu=a53-0, exception_level=el-2] /home/masaaki/Petalinux/PetaL_Proj/Ultra96V2_Platform1/images/linux/boot/u-boot.elf
}

  1. 2019年10月10日 04:31 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る6(PetaLinuxプロジェクト2)

SDx のUltra96-V2 用プラットフォームを作る5(PetaLinuxプロジェクト1)”の続き。

前回は、PetaLinux 2018.3 のプロジェクトを作成し、petalinux-config を行ったが、Python が 3系だったので、エラーになってしまった。その対策として、”pythonのバージョンを切り替える(anaconda使用の場合)”で Python を 2系に切り替えた。今回は、再度、petalinux-config を行っていく。

今回も”Building Custom SDSoC Platform with PetaLinux”の”Step 2: Creating Petalinux for SDSoC”から設定方法を引用させていただいた。

早速、前回失敗した petalinux-config を行う。
petalinux-config --get-hw-description=Ultra96V2_Platform1.sdk
SDx_platform_64_191008.png

今度は成功したログを示す。

(py27) masaaki@masaaki-H110M4-M01:~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1$ petalinux-config --get-hw-description=Ultra96V2_Platform1.sdk
INFO: Getting hardware description...
INFO: Rename Ultra96V2_Platform1_wrapper.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] menuconfig project


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating machine configuration
[INFO] generating bbappends for project . This may take time ! 
rsync: change_dir "/home/masaaki/PetaLinux/2018.3/components/yocto/source/arm/layers/core/meta/recipes-core/init-ifupdown/init-ifupdown-1.0" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
rsync: change_dir "/home/masaaki/PetaLinux/2018.3/components/yocto/source/arm/layers/meta-petalinux/recipes-core/busybox/files" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
sed: /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-plnx-generated/recipes-core/busybox/files/inetd.conf を読み込めません: そのようなファイルやディレクトリはありません
sed: /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-plnx-generated/recipes-core/busybox/files/inetd.conf を読み込めません: そのようなファイルやディレクトリはありません
sed: /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-plnx-generated/recipes-core/busybox/files/inetd.conf を読み込めません: そのようなファイルやディレクトリはありません
[INFO] generating u-boot configuration files
[INFO] generating kernel configuration files
[INFO] generating kconfig for Rootfs
[INFO] oldconfig rootfs
[INFO] generating petalinux-user-image.bb


次はカーネルを構築する。
petalinux-config -c kernel
SDx_platform_65_191008.png

SDx_platform_66_191008.png

端末の別タブに設定画面が表示された。
設定を行う。
Device Drivers -> Generic Driver Options -> Size in MB(1024)に変更する。
SDx_platform_67_191008.png

Device Drivers -> Staging drivers (ON) はすでにON されていた。

Device Drivers -> Staging drivers -> Xilinx APF Accelerator driver (ON) した。
SDx_platform_68_191008.png

Device Drivers -> Staging drivers -> Xilinx APF Accelerator driver -> Xilinx APF DMA engines support (ON)
SDx_platform_69_191008.png

CPU Power Management -> CPU idle -> CPU idle PM support (OFF)
SDx_platform_70_191008.png

CPU Power Management -> CPU Frequency scaling -> CPU Frequency scaling (OFF)
SDx_platform_71_191008.png

設定終了。
SDx_platform_72_191008.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1$ petalinux-config -c kernel
[INFO] generating Kconfig for project
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating machine configuration
[INFO] configuring: kernel
[INFO] generating kernel configuration files
[INFO] bitbake virtual/kernel -c menuconfig
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100% |##########################################| Time: 0:01:15
Parsing of 2569 .bb files complete (0 cached, 2569 parsed). 3461 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:00
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3460 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2569 .bb files complete (2534 cached, 35 parsed). 3461 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:01
Checking sstate mirror object availability: 100% |###############| Time: 0:00:00
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 360 tasks of which 350 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
bitbake -c diffconfig virtual/kernel
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache...done.
Loaded 3460 entries from dependency cache.
Parsing recipes...done.
Parsing of 2569 .bb files complete (2534 cached, 35 parsed). 3461 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks...done.
Checking sstate mirror object availability...done.
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 254 of 254 (/home/masaaki/PetaLinux/2018.3/components/yocto/source/aarch64/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_diffconfig)
NOTE: recipe linux-xlnx-4.14-xilinx-v2018.3+gitAUTOINC+eeab73d120-r0: task do_diffconfig: Started
Config fragment has been dumped into:
 /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.14-xilinx-v2018.3+gitAUTOINC+eeab73d120-r0/fragment.cfg
NOTE: recipe linux-xlnx-4.14-xilinx-v2018.3+gitAUTOINC+eeab73d120-r0: task do_diffconfig: Succeeded
NOTE: Tasks Summary: Attempted 254 tasks of which 253 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.

generate_bbappend /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.14-xilinx-v2018.3+gitAUTOINC+eeab73d120-r0/user_2019-10-08-20-47-00.cfg /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/
recipetool appendsrcfile -wW /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/ virtual/kernel /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.14-xilinx-v2018.3+gitAUTOINC+eeab73d120-r0/user_2019-10-08-20-47-00.cfg
NOTE: Starting bitbake server...
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache...done.
Loaded 3460 entries from dependency cache.
Parsing recipes...done.
Parsing of 2569 .bb files complete (2534 cached, 35 parsed). 3461 targets, 137 skipped, 0 masked, 0 errors.

Summary: There was 1 WARNING message shown.
NOTE: Writing append file /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend
NOTE: Copying /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.14-xilinx-v2018.3+gitAUTOINC+eeab73d120-r0/user_2019-10-08-20-47-00.cfg to /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/meta-user/recipes-kernel/linux/linux-xlnx/user_2019-10-08-20-47-00.cfg

WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3460 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2569 .bb files complete (2533 cached, 36 parsed). 3461 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:00
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
[INFO] successfully configured kernel



ROOTFS を設定する。
petalinux-config -c rootfs
SDx_platform_73_191008.png

ROOTFS 設定ダイアログが表示された。
SDx_platform_74_191008.png

Filesystem Packages -> misc -> gcc-runtime -> libstdc++ (ON)
SDx_platform_75_191008.png

設定をセーブした。
SDx_platform_76_191008.png

SDx_platform_77_191008.png

ログを示す。

(py27) masaaki@masaaki-H110M4-M01:~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1$ petalinux-config -c rootfs
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating machine configuration
[INFO] configuring: rootfs
[INFO] generating kconfig for Rootfs
[INFO] menuconfig rootfs
configuration written to /home/masaaki/PetaLinux/PetaL_Proj/Ultra96V2_Platform1/project-spec/configs/rootfs_config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] generating petalinux-user-image.bb
[INFO] successfully configured rootfs


(py27) masaaki@masaaki-H110M4-M01:~/PetaLinux/PetaL_Proj/Ultra96V2_Platform1$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3460 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:03
Parsing of 2569 .bb files complete (2534 cached, 35 parsed). 3461 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:06
Checking sstate mirror object availability: 100% |###############| Time: 0:00:11
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: petalinux-user-image-1.0-r0 do_rootfs: [log_check] petalinux-user-image: found 1 warning message in the logfile:
[log_check] warning: %post(sysvinit-inittab-2.88dsf-r10.plnx_zynqmp) scriptlet failed, exit status 1

NOTE: Tasks Summary: Attempted 3132 tasks of which 2275 didn't need to be rerun and all succeeded.

Summary: There were 2 WARNING messages shown.
INFO: Copying Images from deploy to images
INFO: Creating images/linux directory
NOTE: Failed to copy built images to tftp dir:  /tftpboot
[INFO] successfully built project

  1. 2019年10月09日 04:56 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

FPGAの部屋のブログを https に変更しました

FPGAの部屋のブログのアドレスを https://marsee101.blog.fc2.com/ に変更しました。
SSL に対応したのですが、まだ未対応があるようです。警告出ています。どこだか分からないので、おいおい直していきたいです。よろしくお願いいたします。
  1. 2019年10月09日 04:03 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:0

pythonのバージョンを切り替える(anaconda使用の場合)

SDx のUltra96-V2 用プラットフォームを作る5(PetaLinuxプロジェクト1)”で petalinux-config がERROR になってしまったが、python がバージョン 3.6.5 だったためだった。
python で動作するpython は 2系にしないといけないようだが、PetaLinux 動作させる時以外は python は 3系にしたい。ということで、python コマンドを 2系と 3系で切り替えられるようにした。

今回、参考にさせていただくのは、”anacondaでpythonのバージョン切り替える”だ。

私のUbuntu 18.04 でも Anaconda 使っているので、このスキームで 2系と 3系で切り替える。

conda create -n py27 python=2.7 anaconda
SDx_platform_61_191008.png

585.1 MB ダウンロードするようだ。かなり容量を食う。

インストール済みのpythonのバージョンを確認する。
conda info -e
SDx_platform_62_191008.png

base と py27 がある。
py27 に切り替える。
source activate py27
SDx_platform_63_191008.png

python --version コマンドを実行すると、バージョンは 2.7.16 になっていた。これで大丈夫だと思う。
  1. 2019年10月08日 03:59 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る5(PetaLinuxプロジェクト1)

SDx のUltra96-V2 用プラットフォームを作る4(DSA ファイルの生成)”の続き。

前回、SDx でプラットフォームを作成する時に使用されるDSA ファイルを生成した。今回は、PetaLinuxのプロジェクトを作成しよう。

今回は、”Building Custom SDSoC Platform with PetaLinux”の”Step 2: Creating Petalinux for SDSoC”を参考にしてやっていく。

まずは、Ultra96V2の 2018.3 のBoard Support Package (BSP) は最近、ツィッターで流れていたこのツィートのリンクからダウンロードしよう。


このリンクを開くと、ultra96v2_oob_2018_3.zip をダウンロードすることができる。
Download ボタンをクリックして、ダウンロードした。
SDx_platform_51_191007.png

~/PetaLinux/PtaL_Porj/ ディレクトリにダウンロードした。
SDx_platform_52_191007.png

BSP を使用して、PetaLinux プロジェクトを作成する。名前は、Ultra96V2_Platform1 だ。
petalinux-create -t project -n Ultra96V2_Platform1 -s ultra96v2_oob_2018_3.bsp
SDx_platform_53_191007.png

SDx のUltra96-V2 用プラットフォームを作る3(ビットストリームの生成)”で生成した Ultra96V2_Platform1.sdk をPetaLinux のUltra96V2_Platform1 プロジェクトのディレクトリにコピー&ペーストした。
SDx_platform_54_191007.png

petalinux-config --get-hw-description=Ultra96V2_Platform1.sdk
SDx_platform_55_191007.png

SDx_platform_56_191007.png

Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドする1”の”petalinux-config --get-hw-description=”の設定はすべて済んでいたので、Exit した。

Yes を選択する。
SDx_platform_57_191007.png

SDx_platform_58_191007.png

petalinux-config はエラーになってしまった。。。
~/PetaLinux/PtaL_Porj/build/config.log を開くと理由が分かった。
SDx_platform_59_191007.png

python --version
を実行するとPython のバージョンは 3.6.5 だった。config.log によるとPython のバージョンは 2系でないとだめなようだ。
SDx_platform_60_191007.png
  1. 2019年10月08日 03:31 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る4(DSA ファイルの生成)

SDx のUltra96-V2 用プラットフォームを作る3(ビットストリームの生成)”の続き。

前回は、HDL Wrapperを生成して、論理合成、インプリメンテーション、ビットストリームの生成を行った。今回は、DSA ファイルを生成する。これは、SDx でプラットフォームを作成する時に使用される。

今回は、”2018.3 SDSoC™ Development Environment Tutorials”の”Step 5: Writing Out the DSA”を参考にしてやっていく。

Vivado 2018.3 の下のウインドウで、Tcl Console タブをクリックする。
最初に、Vivado プロジェクトに cd しよう。
cd /home/masaaki/HDL/Ultra96/SDx_platform/Ultra96V2_Platform1/

DSA ファイルを生成する。
write_dsa -force -include_bit Ultra96V2_Platform1.dsa
SDx_platform_48_191007.png

cd /home/masaaki/HDL/Ultra96/SDx_platform/Ultra96V2_Platform1/
write_dsa -force -include_bit Ultra96V2_Platform1.dsa
INFO: [Vivado 12-4895] Creating DSA: Ultra96V2_Platform1.dsa ...
INFO: [Vivado 12-4896] Successfully created DSA: /home/masaaki/HDL/Ultra96/SDx_platform/Ultra96V2_Platform1/Ultra96V2_Platform1.dsa
write_dsa: Time (s): cpu = 00:00:12 ; elapsed = 00:00:10 . Memory (MB): peak = 8352.102 ; gain = 0.000 ; free physical = 10754 ; free virtual = 34938
/home/masaaki/HDL/Ultra96/SDx_platform/Ultra96V2_Platform1/Ultra96V2_Platform1.dsa


DSA ファイルが生成できた。
SDx_platform_49_191007.png

DSA ファイルを検証する。
validate_dsa Ultra96V2_Platform1.dsa
SDx_platform_50_191007.png

validate_dsa Ultra96V2_Platform1.dsa
INFO: [Vivado 12-6074] Validating DSA: 'Ultra96V2_Platform1.dsa'
INFO: [Vivado 12-4468] Found XML metadata file: dsa.xml
INFO: [Vivado 12-6078] Validating platform properties...
INFO: [Vivado 12-6079] Validating unified platform...
INFO: [Vivado 12-6073] Validating 'pre_synth' platform state...
INFO: [Vivado 12-6077] Validating platform files...
INFO: [Vivado 12-6067] Found file 'emu/emu.xml' of type 'EMU_XML' in the DSA.
INFO: [Vivado 12-6067] Found file 'Ultra96V2_Platform1.bit' of type 'FULL_BIT' in the DSA.
INFO: [Vivado 12-6067] Found file 'Ultra96V2_Platform1.hpfm' of type 'HPFM' in the DSA.
INFO: [Vivado 12-6067] Found file 'prj/rebuild.tcl' of type 'REBUILD_TCL' in the DSA.
INFO: [Vivado 12-6066] Finished running validate_dsa for file: 'Ultra96V2_Platform1.dsa'


DSA ファイルが生成できたので、SDx でプラットフォームを生成していこう。
  1. 2019年10月07日 04:13 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る3(ビットストリームの生成)

SDx のUltra96-V2 用プラットフォームを作る2(Platform Hardware Interfacesの宣言)”の続き。

前回は、Platform Hardware Interfacesとして宣言するために、Vivado で Platform Interfaces を設定した。今回は、HDL Wrapperを生成して、論理合成、インプリメンテーション、ビットストリームの生成を行う。

今回は、”2018.3 SDSoC™ Development Environment Tutorials”の”Step 4: Generating HDL Design Files”を参考にしてやっていく。

最初にGenerate Output Products を行う。
Sources ウインドウタブをクリックする。
Design Sources の下の Ultra96V2_Platform1 ブロックデザインを右クリックし、右クリックメニューからGenerate Output Products... を選択する。
SDx_platform_39_191005.png

Generate Output Products ダイアログが表示される。Generate ボタンをクリックする。
SDx_platform_40_191005.png

Generate Output Products ダイアログが表示される。
OKボタンをクリックする。
SDx_platform_41_191005.png

その後、Generate していて、終了を確認してから、Design Sources の下の Ultra96V2_Platform1 ブロックデザインを右クリックし、右クリックメニューからCreate HDL Wrapper... をクリックする。
SDx_platform_42_191005.png

Create HDL Wrapper ダイアログが表示される。
OKボタンをクリックする。
SDx_platform_43_191005.png

プロジェクトのDesign Sources のトップにUltra96V2_Platform1_wrapper.v が入った。
SDx_platform_44_191005.png

Flow Navigator 上でGenerate Bitstream をクリックしてビットストリームの生成を行う。

2つほどダイアログが出るが、OKボタンをクリックする。

時間が経過してから、Bitstream Generation Completed ダイアログが表示される。
SDx_platform_45_191005.png

Cancel ボタンをクリックする。

Project Summary を表示した。
SDx_platform_46_191005.png

Utilization はポートが無いので、0 % のようだ。

Vivado のFile メニューからExport -> Export Hardware... を選択する。

Export Hardware ダイアログ表示された。
Include bitstream にチェックを入れて、OKボタンをクリックする。
SDx_platform_47_191005.png
  1. 2019年10月06日 03:42 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る2(Platform Hardware Interfacesの宣言)

SDx のUltra96-V2 用プラットフォームを作る2(ブロックデザインの作成)”の続き。

前回は、ハードウェア・プラットフォーム用のブロックデザインを作成した。今回は、Platform Hardware Interfacesとして宣言するために、Vivado で Platform Interfaces を設定する。

今回は、2018.3 SDSoC™ Development Environment Tutorials の Lab1: Creating the DSA for a Zynq UltraScale+ MPSoC Processor Design の Step 3: Declaring the Platform Hardware Interfaces を参考にする。

Step 3: Declaring the Platform Hardware Interfaces にはいろいろと書いてあったが、結局 SDSoC でアクセラレーションする時にどのポートやクロック、割り込みリソースを使うかを指定しているのだと思う。
それではやっていこう。

Vivado 2018.3 の Window メニューからPlatform Interfaces を選択する。
platform interfaces が開く。
SDx_platform_28_191005.png

Enable platform interfaces をクリックした。
すると、SDSoC で使用できるインターフェースの一覧が表示される。
SDx_platform_29_191005.png

これはハイドされているので、まだ選択されていないようだ。
Platform を選択すると、Platform Properties ウインドウでPlatform の情報を設定できる。
SDx_platform_31_191005.png

board を Ultra96V2 に変更した。
SDx_platform_38_191005.png

ダブルクリックか、項目を選択してEnable を選択することで有効化できる。
clk_wiz_0 の clk_out1 〜 clk_out7 までを有効化した。
SDx_platform_32_191005.png

clk_out2 をクリックして、Platform Interface Properties ウインドウで Option タブをクリックして、 is_default のチェックボックスにチェックを入れる。
SDx_platform_33_191005.png

次に zynq_ultra_ps_e_0 のインターフェースの内で、 pl_clk0, S_AXI_ACP_FPD, and S_AXI_LPD を除くインターフェースを有効にする。
SDx_platform_34_191005.png

xlconcat_0 の In0 〜 In7 を有効にする。
SDx_platform_35_191005.png

xlconcat_1 の In0 〜 In7 を有効にする。
SDx_platform_36_191005.png

xlconcat_0 をクリックして、Block Properties ウインドウのProperties タブをクリックする。
PFM を展開すると、IRQ のどこが有効になっているか?の PFM プロバティが見える。
SDx_platform_37_191005.png

これで Platform Hardware Interfaces の設定は終了だが、 Step 3: Declaring the Platform Hardware Interfaces に記載されているTCL での設定を引用する。

1. PFM NAME
    set_property PFM_NAME “vendor:lib:zcu102_board:1.0”\  
    [get_files [get_property FILE_NAME [get_bd_designs]]]
2. PFM CLOCK
    set_property PFM.CLOCK {\  
    clk_out1 {id “1” is_default “false”\  
    proc_sys_reset “proc_sys_reset_0”}\  
    clk_out2 {id “2” is_default “true”\
    proc_sys_reset “proc_sys_reset_1”}\  
    clk_out3 {id “3” is_default “false”\  
    proc_sys_reset “proc_sys_reset_2”}\  
    clk_out4 {id “4” is_default “false”\  
    proc_sys_reset “proc_sys_reset_3”}\  
    clk_out5 {id “5” is_default “false”\  
    proc_sys_reset “proc_sys_reset_4”}\  
    clk_out6 {id “6” is_default “false”\  
    proc_sys_reset “proc_sys_reset_5”}\  
    clk_out7 {id “7” is_default “false”\  
    proc_sys_reset “proc_sys_reset_6”}\  
    } [get_bd_cells /clk_wiz_0]
3. PFM AXI Ports
    set_property PFM.AXI_PORT {\  
    M_AXI_HPM0_FPD {memport “M_AXI_GP” sptag “” memory “”}\  
    M_AXI_HPM1_FPD {memport “M_AXI_GP” sptag “” memory “”}\  
    M_AXI_HPM0_LPD {memport “M_AXI_GP” sptag “” memory “”}\  
    S_AXI_HPC0_FPD {memport “S_AXI_HPC” sptag “” memory “”}\  
    S_AXI_HPC1_FPD {memport “S_AXI_HPC” sptag “” memory “”}\  
    S_AXI_HP0_FPD {memport “S_AXI_HP” sptag “” memory “”}\  
    S_AXI_HP1_FPD {memport “S_AXI_HP” sptag “” memory “”}\  
    S_AXI_HP2_FPD {memport “S_AXI_HP” sptag “” memory “”}\  
    S_AXI_HP3_FPD {memport “S_AXI_HP” sptag “” memory “”}\  
    } [get_bd_cells /zynq_ultra_ps_e_0]
4. PFM Interrupts
    set_property PFM.IRQ {\  
    In0 {} In1 {} In2 {} In3 {} In4 {} In5 {} In6 {} In7 {}\
    } [get_bd_cells {/xlconcat_0 /xclconcat_1}]

  1. 2019年10月05日 04:52 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る2(ブロックデザインの作成)

SDx のUltra96-V2 用プラットフォームを作る1(PetaLinux 2018.3 のインストール、Vivado プロジェクト作成)”の続き。

前回は、SDx 2018.3 でUltra96-V2 用のプラットフォームを作成することにしたということで、PetaLinux 2018.3 をインストールし、Vivado プロジェクト作成を行った。今回は、ハードウェア・プラットフォーム用のブロックデザインを作成する。

やり方は、”Lab1: Creating the DSA for a Zynq UltraScale+ MPSoC Processor Design”に丁寧に掲載されているので、この資料を参照した。

Vivado 2018.3 のFlow Navigator から IP INTEGRATOR -> Create Block Design をクリックして、ブロックデザインを作成する。
Design name をUltra96V2_Platform1 とした。
SDx_platform_7_191001.png

Zynq UltraScale+ MPSoC をAdd IP した。
SDx_platform_8_191001.png

Run Block Automation をクリックして、ボード・ファイルの設定を反映する。
Run Block Automation ダイアログが開くので、OKボタンをクリックする。
SDx_platform_9_191001.png

Clocking Wizard、 Concat、 Processor System Reset をAdd IP する。
SDx_platform_10_191001.png

設定を行う。
zynq_ultra_ps_e_0 をダブルクリックして、設定画面を開く。
SDx_platform_11_191001.png

Page Navigator から PS-PL Configuration を選択する。
Geraral -> Interrupts -> IRQ1[0-7] の値を 1 に変更する。
PS-PL Interfaces -> Master Interface のAXI HPM0 FPD と AXI HPM1 FPD をチェックを解除する。
OKボタンをクリックする。
SDx_platform_12_191001.png

clk_wiz_0 をダブルクリックする。
Reset Type を Active Low に変更する。
SDx_platform_14_191001.png

SDx_platform_15_191001.png

xlconcat_0 をダブルクリックする。
Number of Ports を 1 に設定する。
SDx_platform_16_191001.png

SDx_platform_17_191001.png

Run Connection Automation をクリックする。
clk_wiz_0 の clk_in1 と proc_sys_reset_0 の slowest_sync_clk を接続する。
ただし、 proc_sys_reset_0 の slowest_sync_clk の接続先を/clk_wiz_0/clk_out1 に変更する。
SDx_platform_18_191003.png

SDx_platform_19_191003.png

並べ替え、配線を行った。オレンジの配線が今回配線した部分だ。
SDx_platform_20_191003.png

Validate Design アイコンをクリックして、デザインを検証する。
問題なかった。
SDx_platform_21_191003.png

clk_wiz_0 をダブルクリックする。
Output Clocks タブをクリックし、clk_out7 までクロック出力を活かして、以下のように設定した。
clk_out1 -> 75
clk_out2 -> 100
clk_out3 -> 150
clk_out4 -> 200.000
clk_out5 -> 300.000
clk_out6 -> 400.000
clk_out7 -> 600.000
Lab1: Creating the DSA for a Zynq UltraScale+ MPSoC Processor Design”から引用。
SDx_platform_22_191003.png

SDx_platform_23_191003.png

proc_sys_reset_0 を 6 回コピー&ペーストして、6 個のコピーを作成した。

xlconcat_0 をコピー&ペーストして、 xlconcat_1 を生成した。

Run Connection Automation をクリックして、clk_wiz_0 の clk_out2 〜 clk_out7 と proc_sys_reset_1 〜 proc_sys_reset_6 の slowest_sync_clk を接続する。
SDx_platform_24_191003.png

接続表を”Lab1: Creating the DSA for a Zynq UltraScale+ MPSoC Processor Design”の Step 2: Create an IP Integrator Design から引用する。
SDx_platform_27_191004.png

SDx_platform_25_191003.png

proc_sys_reset_1 〜 proc_sys_reset_6 の dcm_locked と ext_reset_in を手動で接続した。
SDx_platform_26_191003.png

これでブロックデザインが完成した。セーブを行った。
  1. 2019年10月04日 06:30 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0

SDx のUltra96-V2 用プラットフォームを作る1(PetaLinux 2018.3 のインストール、Vivado プロジェクト作成)

以下の参考資料があるので、それに従ってSDx 2018.3 でUltra96-V2 用のプラットフォームを作成することにした。
2018.3 SDSoC™ Development Environment Tutorials”の
Lab1: Creating the DSA for a Zynq UltraScale+ MPSoC Processor Design
Lab 2: Creating the SDSoC Platform
Lab 3: Using Your Custom Platform
を参考にする。
また、”Building Custom SDSoC Platform with PetaLinux”も一緒に参考にしながらやっていこう。

SDx 2018.3 はインストール済みなので、Petalinux 2018.3 をXilinx のサイトからPetalinux 2018.3 のインストーラーの petalinux-v2018.3-final-installer.run をダウンロードした。
~/Petalinux ディレクトリに 2018.3 ディレクトリを作成した。そこに petalinux-v2018.3-final-installer.run をコピーして、実行権限を与えて、起動し、インストールを行った。

cd ~/Petalinux
mkdir 2018.3
mv petalinux-v2018.3-final-installer.run 2018.3
cd 2018.3
chmod +x petalinux-v2018.3-final-installer.run
./petalinux-v2018.3-final-installer.run


もうすでにPetaLinux の異なるバージョンはインストール済みなので、PetaLinux に必要なライブラリのインストールは済んでいる。
PetaLinux 2018.3 をインストールするのに必要なパッケージは”Docker上ののUbuntu 16.04にPetaLinux 2018.3をインストールする”を参照のこと。
SDx_platform_2_191001.png

~/Petalinux/2018.3 ディレクトリを示す。
SDx_platform_1_191001.png

PetaLinux 2018.3 がインストールできたので、”Lab1: Creating the DSA for a Zynq UltraScale+ MPSoC Processor Design”に従って、最初にVivado 2018.3 でハードウェアのプラットフォームを作成する。
詳しいVivado での操作方法は”Lab1: Creating the DSA for a Zynq UltraScale+ MPSoC Processor Design”に詳しく書いてあるので、踏襲しながらやっていこう。

最初に、Vivado 2018.3 でUltra96-V2 用のプロジェクト”Ultra96V2_Platform1”を作成していこう。
Vivado の起動画面で、Create Project をクリックしてプロジェクトを作成する。
New Project ダイアログのProject Name でProject name を”Ultra96V2_Platform1”に設定した。
SDx_platform_3_191001.png

New Project の Project Type ページはデフォルトのRTL Project のまま Next > ボタンをクリックする。

Add Sources ページでも Next > ボタンをクリックする。

Add Constraints ページでも Next > ボタンをクリックする。

Default Part ページでは、Boards をクリックし、Vendor: で”em.avnet.com”を選択し、Display Name が Ultra96v2 Evaluation Platform を選択する。
Next > ボタンをクリックする。
SDx_platform_4_191001.png

New Project Summary ページではサーマリが示される。Finish ボタンをクリックする。
SDx_platform_5_191001.png

”Ultra96V2_Platform1”Vivado 2018.3 プロジェクトが作成された。
SDx_platform_6_191001.png
  1. 2019年10月03日 04:55 |
  2. SDSoC
  3. | トラックバック:0
  4. | コメント:0
»