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

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

FPGAの部屋

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

ZUBoard 1CG の i4filters プロジェクトの回路を Petalinux で動作させる5

ZUBoard 1CG の i4filters プロジェクトの回路を Petalinux で動作させる4”の続き。

今まで ZUBoard 1CG の PYNQ Linux で動作させてきた i4filters プロジェクトの回路Petalinux で動作させてみようということで、前回は、sftp で ZUBoard 1CG で起動した Petalinux 2022.2 にログインできるように openssh-sftp-server パッケージをインストールしたら sftp でログインすることができた。pcmanfm を動作させることができた。今回は、Vitis 2022.2 を起動して、 zub1cg_i4filters_pf プラットフォーム・プロジェクトと zub1cg_i4filters_system アプリケーション・プロジェクトを作成した。

Vitis 2022.2 を起動する。
vitis &

Vitis IDE Launcher が起動した。
HDL/2023.1/zub1cg/i4filters/vitis_work を新規作成し、Workspace に指定した。
zub1cg_i4filters_35_230928.png

Vitis 2022.2 が起動した。
zub1cg_i4filters_36_230928.png

Create Application Project をクリックし、アプリケーション・プロジェクトを新規作成する。
New Application Project ダイアログの Create a New Application Project が表示された。
zub1cg_i4filters_37_230928.png

Platform
Create a new platform from hardware (XSA) タブをクリックした。
Hardware Specfication の XSA File に /media/masaaki/Ubuntu_Disk/HDL/2023.1/zub1cg/i4filters/i4filters_wrapper.xsa を指定した。
Platform name を zub1cg_i4filters_pf に書き換えた。
zub1cg_i4filters_38_230928.png

Application Project Details
Application project name に zub1cg_i4filters を指定した。
Select target processor for the Appliction project で psu_cortex53 SMP を選択した。
zub1cg_i4filters_39_230928.png

Domain
Application settings の Root FS には、ZUBoard1CG/Avnet_2022_2/petalinux/projects/zub1cg_i4filters/images/linux/rootfs.ext4 を指定した。
Application settings の Kernel Image には、ZUBoard1CG/Avnet_2022_2/petalinux/projects/zub1cg_i4filters/images/linux/Image を指定した。
zub1cg_i4filters_40_230928.png

Templates
Linux Empty Application を選択して、Finish ボタンをクリックした。
zub1cg_i4filters_41_230928.png

Explorer に zub1cg_i4filters_pf プラットフォーム・プロジェクトと zub1cg_i4filters_system アプリケーション・プロジェクトが生成された。
zub1cg_i4filters_42_230928.png
  1. 2023年09月29日 04:55 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

ZUBoard 1CG の i4filters プロジェクトの回路を Petalinux で動作させる4

ZUBoard 1CG の i4filters プロジェクトの回路を Petalinux で動作させる3”の続き。

今まで ZUBoard 1CG の PYNQ Linux で動作させてきた i4filters プロジェクトの回路Petalinux で動作させてみようということで、前回は、ZUBoard 1CG で起動した Petalinux 2022.2 で uio を確認した。sftp を試したところ、ZUBoard 1CG の Petalinux 2022.2 にログインできなかった。今回は、sftp で ZUBoard 1CG で起動した Petalinux 2022.2 にログインできるように openssh-sftp-server パッケージをインストールしたら sftp でログインすることができた。

/media/masaaki/Ubuntu_Disk/ZUBoard1CG/Avnet_2022_2/petalinux/projects/zub1cg_i4filters ディレクトリに入って、RootFS を編集した。
cd /media/masaaki/Ubuntu_Disk/ZUBoard1CG/Avnet_2022_2/petalinux/projects/zub1cg_i4filters
petalinux-config -c rootfs


Filesystem Package -> x11 -> pcmanfm の pcmanfm に * を付けた。
zub1cg_i4filters_28_230927.png

Filesystem Package -> console -> network -> openssh の openssh-sftp-server に * を付けた。
zub1cg_i4filters_29_230927.png

Filesystem Package -> misc -> l3afpad の l3afpad に * を付けた。
zub1cg_i4filters_30_230927.png

セーブして終了した。

ビルドを行った。
petalinux-build

BOOT.BIN を作成した。
cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit --force


ZUBoard1CG/at_2022_2/zub1cg_gpio/images/linux ディレクトリの BOOT.BIN, boot.scr, image.ub を FAT32 でフォーマットされた MicroSD カードに書き込んだ。
zub1cg_i4filters_31_230927.png

Micro SD カードを ZUBoard 1CG に挿入し電源ONした。
Petalinux 2022.2 が起動した。
zub1cg_i4filters_32_230927.png

IP アドレスが割り振られている。
zub1cg_i4filters_33_230927.png

割り振られた IP アドレスに FileZilla で SFTP ログインすることができた。
zub1cg_i4filters_34_230927.png

(追加)
この状態では pcmanfm を起動することができなかった。
そこで、petalinux-config -c rootfs をもう一度実行して、packagegroup-petalinux-x11 を追加した。
zub1cg_i4filters_43_230928.png

セーブして終了した。

ビルドを行った。
petalinux-build

BOOT.BIN を作成した。
cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit --force


ZUBoard1CG/at_2022_2/zub1cg_gpio/images/linux ディレクトリの BOOT.BIN, boot.scr, image.ub を FAT32 でフォーマットされた MicroSD カードに書き込んだ。
zub1cg_i4filters_31_230927.png

Micro SD カードを ZUBoard 1CG に挿入し電源ONした。
Petalinux 2022.2 が起動した。
zub1cg_i4filters_32_230927.png

Petalinux 2022.2 に ssh でログインして、
ssh 192.168.3.57 -X -l petalinux

pcmanfm を起動したら、起動できた。
pcmanfm &
zub1cg_i4filters_44_230928.png

(2023/09/29:追加)
dnf コマンドもうまく行かなかったのだが、良い方法をネットで見つけたので、試してみる。

cd /media/masaaki/Ubuntu_Disk/ZUBoard1CG/Avnet_2022_2/petalinux/projects/zub1cg_i4filters
petalinux-config -c rootfs


Image Features -> package-management に * を追加した。
zub1cg_i4filters_45_230929.png

ビルドして、手順を踏んで、Petalinux 2022.2 で sudo dnf install g++.cortexa72_cortexa53 コマンドを実行することができた。
zub1cg_i4filters_46_230929.png
  1. 2023年09月28日 04:39 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

ZUBoard 1CG の i4filters プロジェクトの回路を Petalinux で動作させる3

ZUBoard 1CG の i4filters プロジェクトの回路を Petalinux で動作させる2”の続き。

今まで ZUBoard 1CG の PYNQ Linux で動作させてきた i4filters プロジェクトの回路Petalinux で動作させてみようということで、前回は、異なるハードウェアだが、うまく行った”MicroZed Chronicles: UIO をやってみる3”の設定を使用してやってみたところ、ビルドが成功して、Micro SD カードに書いて ZUBoard 1CG でブートしたところ、Petalinux 2022.2 が起動した。今回は、ZUBoard 1CG で起動した Petalinux 2022.2 で uio を確認した。sftp を試したところ、ZUBoard 1CG の Petalinux 2022.2 にログインできなかった。

ZUBoard 1CG で起動した Petalinux 2022.2 で uio を確認する。
/sys/class/uio ディレクトリに行くと、uio0 〜 uio8 があった。
uio4 〜 uio8 が追加した uio だった。その対応を示す。

uio4: dma                   0xa0000000
uio5: color_converter_RGB24 0xa0040000
uio6: gaussian_axis_RGB24   0xa0030000
uio7: median_axis_RGB24     0xa0020000
uio8: sobel_axis_RGB24      0xa0010000


zub1cg_i4filters_23_230927.png
zub1cg_i4filters_25_230927.png

IP アドレスを確認して、ホストパソコンから FileZilla で ZUBoard 1CG に sftp でログインしてみたがエラーだった。
zub1cg_i4filters_24_230927.png

zub1cg_i4filters_26_230927.png

そこで、dnf で openssh-sftp-server をインストールしようとしたが、エラーだった。
sudo dnf install openssh-sftp-server.cortexa72_cortexa53
zub1cg_i4filters_27_230927.png
  1. 2023年09月27日 04:56 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

ZUBoard 1CG の i4filters プロジェクトの回路を Petalinux で動作させる2

ZUBoard 1CG の i4filters プロジェクトの回路を Petalinux で動作させる1”の続き。

今まで ZUBoard 1CG の PYNQ Linux で動作させてきた i4filters プロジェクトの回路Petalinux で動作させてみようということで、前回は、Petalinux 2022.2 で zub1cg_i4flilters プロジェクトを作成し、i4filters プロジェクトのハードウェアをインポートした。RootFS に sudo, dnf, OpenCV の設定を行ってから、ビルドを行って成功した。ファイルを MicroSD カードに書いて、ZUBoard 1CG でブートしたところ、ブートの途中でエラーで停止した。今回は、異なるハードウェアだが、うまく行った”MicroZed Chronicles: UIO をやってみる3”の設定を使用してやってみたところ、ビルドが成功して、Micro SD カードに書いて ZUBoard 1CG でブートしたところ、Petalinux 2022.2 が起動した。

前回の zub1cg_i4filters プロジェクトを削除した。

Petalinux 2022.2 の zub1cg_i4filters プロジェクトを作成した。
cd /media/masaaki/Ubuntu_Disk/ZUBoard1CG/Avnet_2022_2/petalinux/projects
petalinux-create -t project -n zub1cg_i4filters --template zynqMP


zub1cg_i4filters ディレクトリに行って、ハードウェアの XSA ファイルの設定を適用した。
cd zub1cg_i4filters
petalinux-config --get-hw-description=/media/masaaki/Ubuntu_Disk/HDL/2023.1/zub1cg/i4filters

misc/config System Configuration が起動した。
デフォルトのままとして、セーブして終了した。

ZUBoard1CG/Avnet_2022_2/petalinux/projects/zub1cg_i4filters/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi を書き換えて、UIO のエントリを追加した。

/include/ "system-conf.dtsi"
/ {
    chosen {
        bootargs = "uio_pdrv_genirq.of_id=generic-uio";
    };
};

    &axi_dma_0{
        compatible = "generic-uio";
    };
    
    &color_converter_RGB24_0{
        compatible = "generic-uio";
    };
    
    &gaussian_axis_RGB24_0{
        compatible = "generic-uio";
    };

    &median_axis_RGB24_0{
        compatible = "generic-uio";
    };
    
    &sobel_axis_RGB24_0{
        compatible = "generic-uio";
    };
    
    &sdhci1 {
        status = "okay";
        no-1-8-v;
        disable-wp;
    };


RootFS を設定した。
petalinux-config -c kernel

dnf を有効にした。
zub1cg_i4filters_6_230924.png

セーブして終了した。

ビルドを行って、成功した。
petalinux-build

BOOT.BIN を作成した。
cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit --force


images/linux/BOOT.BIN が生成された。

image/linux ディレクトリの BOOT.BIN, boot.scr, image.ub を FAT32 でフォーマットされた MicroSD カードに書き込んだ。
zub1cg_i4filters_21_230926.png

Micro SD カードを ZUBoard 1CG に挿入し電源ONした。
Petalinux 2022.2 が起動した。
zub1cg_i4filters_22_230926.png

起動ログを示す。

NOTICE:  BL31: v2.6(release):xlnx_rebase_v2.6_2022.1_update3-18-g0897efd45
NOTICE:  BL31: Built : 03:55:03, Sep  9 2022


U-Boot 2022.01 (Sep 20 2022 - 06:35:33 +0000)

CPU:   ZynqMP
Silicon: v3
Board: Xilinx ZynqMP
DRAM:  1023 MiB
PMUFW:  v1.1
PMUFW no permission to change config object
EL Level:   EL2
Chip ID:    zu1eg
NAND:  0 MiB
MMC:   mmc@ff170000: 0
Loading Environment from FAT... *** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment

In:    serial
Out:   serial
Err:   serial
Bootmode: SD_MODE1
Reset reason:   EXTERNAL 
Net:   FEC: can't find phy-handle

ZYNQ GEM: ff0d0000, mdio bus ff0d0000, phyaddr 7, interface rgmii-id

Warning: ethernet@ff0d0000 (eth0) using random MAC address - aa:aa:27:3c:23:3d
eth0: ethernet@ff0d0000
scanning bus for devices...
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
2777 bytes read in 14 ms (193.4 KiB/s)
## Executing script at 20000000
Trying to load boot images from mmc0
60844976 bytes read in 4402 ms (13.2 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf-system-top.dtb' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Created:      2022-10-03   7:50:07 UTC
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x100000fc
     Data Size:    9268952 Bytes = 8.8 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00200000
     Entry Point:  0x00200000
     Hash algo:    sha256
     Hash value:   ceb45115cf288af20ec2bbe12501d9929feeedada6fe836ad30ef86142a47a11
   Verifying Hash Integrity ... sha256+ OK
## Loading ramdisk from FIT Image at 10000000 ...
   Using 'conf-system-top.dtb' configuration
   Trying 'ramdisk-1' ramdisk subimage
     Description:  petalinux-image-minimal
     Created:      2022-10-03   7:50:07 UTC
     Type:         RAMDisk Image
     Compression:  uncompressed
     Data Start:   0x108e0aec
     Data Size:    51534666 Bytes = 49.1 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    sha256
     Hash value:   6b5b29e16e4c83d20c92f33e1a78bb67c8af28863abf87ce126d997cdd57f2a6
   Verifying Hash Integrity ... sha256+ 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
     Created:      2022-10-03   7:50:07 UTC
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x108d70e4
     Data Size:    39223 Bytes = 38.3 KiB
     Architecture: AArch64
     Hash algo:    sha256
     Hash value:   f7c8b5875bb51734ec5d4e2c015badfb626df1ed3bc97442d824c6f34b44ae08
   Verifying Hash Integrity ... sha256+ OK
   Booting using the fdt blob at 0x108d70e4
   Uncompressing Kernel Image
   Loading Ramdisk to 38ad5000, end 3bbfab4a ... OK
   Loading Device Tree to 0000000038ac8000, end 0000000038ad4936 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.36-xilinx-v2022.2 (oe-user@oe-host) (aarch64-xilinx-linux-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP Mon Oct 3 07:50:07 UTC 2022
[    0.000000] Machine model: xlnx,zynqmp
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000000000000-0x000000003fefffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003fefffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fefffff]
[    0.000000] On node 0, zone DMA32: 256 pages in unavailable ranges
[    0.000000] cma: Reserved 256 MiB at 0x0000000028800000
[    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] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 18 pages/cpu s34776 r8192 d30760 u73728
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 257796
[    0.000000] Kernel command line: uio_pdrv_genirq.of_id=generic-uio
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 693052K/1047552K available (13888K kernel code, 990K rwdata, 3916K rodata, 2176K init, 573K bss, 92356K reserved, 262144K cma-reserved)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=2.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x474/0x6d8 with crng_init=0
[    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.000000] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.000350] Console: colour dummy device 80x25
[    0.000588] printk: console [tty0] enabled
[    0.000624] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.000645] pid_max: default: 32768 minimum: 301
[    0.000911] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000932] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.002319] rcu: Hierarchical SRCU implementation.
[    0.002567] EFI services will not be available.
[    0.002681] smp: Bringing up secondary CPUs ...
[    0.003124] Detected VIPT I-cache on CPU1
[    0.003177] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.003263] smp: Brought up 1 node, 2 CPUs
[    0.003286] SMP: Total of 2 processors activated.
[    0.003296] CPU features: detected: 32-bit EL0 Support
[    0.003307] CPU features: detected: CRC32 instructions
[    0.003356] CPU: All CPU(s) started at EL2
[    0.003376] alternatives: patching kernel code
[    0.004401] devtmpfs: initialized
[    0.008771] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.008799] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.018571] pinctrl core: initialized pinctrl subsystem
[    0.019231] DMI not present or invalid.
[    0.019544] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.020806] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.020897] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.020958] audit: initializing netlink subsys (disabled)
[    0.021063] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.021476] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.021528] ASID allocator initialised with 65536 entries
[    0.021656] Serial: AMBA PL011 UART driver
[    0.039589] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.039624] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.039635] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.039646] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    1.109413] cryptd: max_cpu_qlen set to 1000
[    1.134748] DRBG: Continuing without Jitter RNG
[    1.237062] raid6: neonx8   gen()  2140 MB/s
[    1.305123] raid6: neonx8   xor()  1586 MB/s
[    1.373184] raid6: neonx4   gen()  2184 MB/s
[    1.441245] raid6: neonx4   xor()  1555 MB/s
[    1.509319] raid6: neonx2   gen()  2066 MB/s
[    1.577371] raid6: neonx2   xor()  1434 MB/s
[    1.645444] raid6: neonx1   gen()  1762 MB/s
[    1.713501] raid6: neonx1   xor()  1212 MB/s
[    1.781563] raid6: int64x8  gen()  1366 MB/s
[    1.849619] raid6: int64x8  xor()   773 MB/s
[    1.917684] raid6: int64x4  gen()  1600 MB/s
[    1.985739] raid6: int64x4  xor()   848 MB/s
[    2.053820] raid6: int64x2  gen()  1396 MB/s
[    2.121880] raid6: int64x2  xor()   747 MB/s
[    2.189944] raid6: int64x1  gen()  1032 MB/s
[    2.258008] raid6: int64x1  xor()   517 MB/s
[    2.258018] raid6: using algorithm neonx4 gen() 2184 MB/s
[    2.258027] raid6: .... xor() 1555 MB/s, rmw enabled
[    2.258037] raid6: using neon recovery algorithm
[    2.258651] iommu: Default domain type: Translated 
[    2.258663] iommu: DMA domain TLB invalidation policy: strict mode 
[    2.258938] SCSI subsystem initialized
[    2.259127] usbcore: registered new interface driver usbfs
[    2.259168] usbcore: registered new interface driver hub
[    2.259198] usbcore: registered new device driver usb
[    2.259280] mc: Linux media interface: v0.10
[    2.259307] videodev: Linux video capture interface: v2.00
[    2.259354] pps_core: LinuxPPS API ver. 1 registered
[    2.259364] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.259386] PTP clock support registered
[    2.259420] EDAC MC: Ver: 3.0.0
[    2.259765] zynqmp-ipi-mbox mailbox@ff990400: Registered ZynqMP IPI mbox with TX/RX channels.
[    2.260019] FPGA manager framework
[    2.260162] Advanced Linux Sound Architecture Driver Initialized.
[    2.260562] Bluetooth: Core ver 2.22
[    2.260593] NET: Registered PF_BLUETOOTH protocol family
[    2.260603] Bluetooth: HCI device and connection manager initialized
[    2.260619] Bluetooth: HCI socket layer initialized
[    2.260630] Bluetooth: L2CAP socket layer initialized
[    2.260647] Bluetooth: SCO socket layer initialized
[    2.261084] clocksource: Switched to clocksource arch_sys_counter
[    2.261257] VFS: Disk quotas dquot_6.6.0
[    2.261310] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    2.265821] NET: Registered PF_INET protocol family
[    2.265940] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    2.266588] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    2.266616] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    2.266684] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    2.266858] TCP: Hash tables configured (established 8192 bind 8192)
[    2.266976] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    2.267009] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    2.267121] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.267473] RPC: Registered named UNIX socket transport module.
[    2.267486] RPC: Registered udp transport module.
[    2.267495] RPC: Registered tcp transport module.
[    2.267503] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.267518] PCI: CLS 0 bytes, default 64
[    2.267694] Trying to unpack rootfs image as initramfs...
[    2.273944] armv8-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
[    2.274568] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    4.721404] Freeing initrd memory: 50324K
[    4.786149] Initialise system trusted keyrings
[    4.786302] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    4.787167] NFS: Registering the id_resolver key type
[    4.787189] Key type id_resolver registered
[    4.787199] Key type id_legacy registered
[    4.787224] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    4.787237] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    4.787265] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    4.824057] NET: Registered PF_ALG protocol family
[    4.824074] xor: measuring software checksum speed
[    4.828259]    8regs           :  2363 MB/sec
[    4.831796]    32regs          :  2799 MB/sec
[    4.836073]    arm64_neon      :  2308 MB/sec
[    4.836083] xor: using function: 32regs (2799 MB/sec)
[    4.836095] Key type asymmetric registered
[    4.836104] Asymmetric key parser 'x509' registered
[    4.836161] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    4.836177] io scheduler mq-deadline registered
[    4.836187] io scheduler kyber registered
[    4.865249] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.866582] Serial: AMBA driver
[    4.867405] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    4.872389] brd: module loaded
[    4.876000] loop: module loaded
[    4.876990] mtdoops: mtd device (mtddev=name/number) must be supplied
[    4.880132] tun: Universal TUN/TAP device driver, 1.6
[    4.880232] CAN device driver interface
[    4.880879] usbcore: registered new interface driver asix
[    4.880947] usbcore: registered new interface driver ax88179_178a
[    4.880980] usbcore: registered new interface driver cdc_ether
[    4.881010] usbcore: registered new interface driver net1080
[    4.881040] usbcore: registered new interface driver cdc_subset
[    4.881083] usbcore: registered new interface driver zaurus
[    4.881129] usbcore: registered new interface driver cdc_ncm
[    4.881892] usbcore: registered new interface driver uas
[    4.881938] usbcore: registered new interface driver usb-storage
[    4.882727] rtc_zynqmp ffa60000.rtc: registered as rtc0
[    4.882753] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01T00:00:07 UTC (7)
[    4.882825] i2c_dev: i2c /dev entries driver
[    4.884529] usbcore: registered new interface driver uvcvideo
[    4.884974] Bluetooth: HCI UART driver ver 2.3
[    4.884987] Bluetooth: HCI UART protocol H4 registered
[    4.884997] Bluetooth: HCI UART protocol BCSP registered
[    4.885022] Bluetooth: HCI UART protocol LL registered
[    4.885032] Bluetooth: HCI UART protocol ATH3K registered
[    4.885054] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    4.885116] Bluetooth: HCI UART protocol Intel registered
[    4.885142] Bluetooth: HCI UART protocol QCA registered
[    4.885177] usbcore: registered new interface driver bcm203x
[    4.885212] usbcore: registered new interface driver bpa10x
[    4.885245] usbcore: registered new interface driver bfusb
[    4.885278] usbcore: registered new interface driver btusb
[    4.885328] usbcore: registered new interface driver ath3k
[    4.885424] EDAC MC: ECC not enabled
[    4.885571] EDAC DEVICE0: Giving out device to module edac controller cache_err: DEV edac (POLLED)
[    4.885748] EDAC DEVICE1: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    4.886242] sdhci: Secure Digital Host Controller Interface driver
[    4.886253] sdhci: Copyright(c) Pierre Ossman
[    4.886261] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.886570] ledtrig-cpu: registered to indicate activity on CPUs
[    4.886704] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    4.886788] zynqmp_firmware_probe Platform Management API v1.1
[    4.886802] zynqmp_firmware_probe Trustzone version v1.0
[    4.914916] securefw securefw: securefw probed
[    4.915031] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: The zynqmp-aes driver shall be deprecated in 2022.2 and removed in 2023.1
[    4.915333] alg: No test for xilinx-zynqmp-aes (zynqmp-aes)
[    4.915365] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: AES Successfully Registered
[    4.915494] zynqmp-keccak-384 firmware:zynqmp-firmware:sha384: The zynqmp-sha-deprecated driver shall be deprecated in 2022.2 and removed in 2023.1 release
[    4.915592] alg: No test for xilinx-keccak-384 (zynqmp-keccak-384)
[    4.915790] alg: No test for xilinx-zynqmp-rsa (zynqmp-rsa)
[    4.915988] usbcore: registered new interface driver usbhid
[    4.916000] usbhid: USB HID core driver
[    4.919249] ARM CCI_400_r1 PMU driver probed
[    4.919911] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    4.920371] usbcore: registered new interface driver snd-usb-audio
[    4.921237] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    4.921814] Initializing XFRM netlink socket
[    4.921910] NET: Registered PF_INET6 protocol family
[    4.922493] Segment Routing with IPv6
[    4.922517] In-situ OAM (IOAM) with IPv6
[    4.922604] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.923009] NET: Registered PF_PACKET protocol family
[    4.923032] NET: Registered PF_KEY protocol family
[    4.923058] can: controller area network core
[    4.923102] NET: Registered PF_CAN protocol family
[    4.923113] can: raw protocol
[    4.923124] can: broadcast manager protocol
[    4.923136] can: netlink gateway - max_hops=1
[    4.923239] Bluetooth: RFCOMM TTY layer initialized
[    4.923268] Bluetooth: RFCOMM socket layer initialized
[    4.923292] Bluetooth: RFCOMM ver 1.11
[    4.923306] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.923316] Bluetooth: BNEP filters: protocol multicast
[    4.923328] Bluetooth: BNEP socket layer initialized
[    4.923338] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    4.923351] Bluetooth: HIDP socket layer initialized
[    4.923394] 8021q: 802.1Q VLAN Support v1.8
[    4.923513] 9pnet: Installing 9P2000 support
[    4.923547] Key type dns_resolver registered
[    4.923681] registered taskstats version 1
[    4.923692] Loading compiled-in X.509 certificates
[    4.925190] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
[    4.936307] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 59, base_baud = 6249999) is a xuartps
[    6.272447] printk: console [ttyPS0] enabled
[    6.277186] of-fpga-region fpga-full: FPGA Region probed
[    6.284490] xilinx-zynqmp-dma fd500000.dma-controller: ZynqMP DMA driver Probe success
[    6.292595] xilinx-zynqmp-dma fd510000.dma-controller: ZynqMP DMA driver Probe success
[    6.300696] xilinx-zynqmp-dma fd520000.dma-controller: ZynqMP DMA driver Probe success
[    6.308799] xilinx-zynqmp-dma fd530000.dma-controller: ZynqMP DMA driver Probe success
[    6.316911] xilinx-zynqmp-dma fd540000.dma-controller: ZynqMP DMA driver Probe success
[    6.325022] xilinx-zynqmp-dma fd550000.dma-controller: ZynqMP DMA driver Probe success
[    6.333135] xilinx-zynqmp-dma fd560000.dma-controller: ZynqMP DMA driver Probe success
[    6.341249] xilinx-zynqmp-dma fd570000.dma-controller: ZynqMP DMA driver Probe success
[    6.349416] xilinx-zynqmp-dma ffa80000.dma-controller: ZynqMP DMA driver Probe success
[    6.357519] xilinx-zynqmp-dma ffa90000.dma-controller: ZynqMP DMA driver Probe success
[    6.365621] xilinx-zynqmp-dma ffaa0000.dma-controller: ZynqMP DMA driver Probe success
[    6.373727] xilinx-zynqmp-dma ffab0000.dma-controller: ZynqMP DMA driver Probe success
[    6.381827] xilinx-zynqmp-dma ffac0000.dma-controller: ZynqMP DMA driver Probe success
[    6.389932] xilinx-zynqmp-dma ffad0000.dma-controller: ZynqMP DMA driver Probe success
[    6.398039] xilinx-zynqmp-dma ffae0000.dma-controller: ZynqMP DMA driver Probe success
[    6.406143] xilinx-zynqmp-dma ffaf0000.dma-controller: ZynqMP DMA driver Probe success
[    6.414854] zynqmp-qspi ff0f0000.spi: rx bus width not found
[    6.420521] zynqmp-qspi ff0f0000.spi: tx bus width not found
[    6.426289] spi_master spi0: cannot find modalias for /axi/spi@ff0f0000/flash@0
[    6.433618] spi_master spi0: Failed to create SPI device for /axi/spi@ff0f0000/flash@0
[    6.441879] macb ff0d0000.ethernet: Not enabling partial store and forward
[    6.454852] macb ff0d0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0d0000 irq 37 (aa:aa:27:3c:23:3d)
[    6.465258] zynqmp_pll_disable() clock disable failed for apll_int, ret = -13
[    6.472525] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    6.479151] xilinx-axipmon fd0b0000.perf-monitor: Probed Xilinx APM
[    6.485664] xilinx-axipmon fd490000.perf-monitor: Probed Xilinx APM
[    6.492186] xilinx-axipmon ffa10000.perf-monitor: Probed Xilinx APM
[    6.500963] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 39
[    6.507317] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer with timeout 60s
[    6.514790] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    6.526362] of_cfs_init
[    6.528854] of_cfs_init: OK
[    6.532924] ALSA device list:
[    6.535897]   No soundcards found.
[    6.556181] mmc0: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    6.564848] Freeing unused kernel memory: 2176K
[    6.569518] Run /init as init process
[    6.585968] systemd[1]: System time before build time, advancing clock.
[    6.596927] systemd[1]: systemd 249.7+ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid)
[    6.627299] systemd[1]: Detected architecture arm64.
[    6.640324] mmc0: Problem switching card into high-speed mode!
[    6.646757] mmc0: new SDHC card at address 0001

Welcome to PetaLinux 2022.2_update1_04022314 (honister)[    6.651952] mmcblk0: mmc0:0001 SPCC  29.0 GiB 
!

[    6.663881]  mmcblk0: p1 p2
[    6.673274] systemd[1]: Hostname set to <zub1cgi4filters>.
[    6.678945] random: systemd: uninitialized urandom read (16 bytes read)
[    6.685579] systemd[1]: Initializing machine ID from random generator.
[    6.741006] systemd-sysv-generator[217]: SysV service '/etc/init.d/watchdog-init' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    6.768129] systemd-sysv-generator[217]: SysV service '/etc/init.d/nfsserver' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    6.792203] systemd-sysv-generator[217]: SysV service '/etc/init.d/nfscommon' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    6.816643] systemd-sysv-generator[217]: SysV service '/etc/init.d/inetd.busybox' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    6.841747] systemd-sysv-generator[217]: SysV service '/etc/init.d/dropbear' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    7.063243] systemd[1]: Queued start job for default target Multi-User System.
[    7.071633] random: systemd: uninitialized urandom read (16 bytes read)
[    7.101210] systemd[1]: Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/getty.
[    7.121249] random: systemd: uninitialized urandom read (16 bytes read)
[    7.129367] systemd[1]: Created slice Slice /system/modprobe.
[  OK  ] Created slice Slice /system/modprobe.
[    7.150465] systemd[1]: Created slice Slice /system/serial-getty.
[  OK  ] Created slice Slice /system/serial-getty.
[    7.174272] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    7.197396] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[    7.221298] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[    7.245340] systemd[1]: Reached target Path Units.
[  OK  ] Reached target Path Units.
[    7.261184] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    7.281172] systemd[1]: Reached target Slice Units.
[  OK  ] Reached target Slice Units.
[    7.297199] systemd[1]: Reached target Swaps.
[  OK  ] Reached target Swaps.
[    7.313739] systemd[1]: Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[    7.337169] systemd[1]: Reached target RPC Port Mapper.
[  OK  ] Reached target RPC Port Mapper.
[    7.357461] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[    7.373347] systemd[1]: Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[    7.397695] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[    7.417403] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[    7.441484] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    7.457630] systemd[1]: Listening on Network Service Netlink Socket.
[  OK  ] Listening on Network Service Netlink Socket.
[    7.481498] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[    7.501394] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    7.521401] systemd[1]: Listening on User Database Manager Socket.
[  OK  ] Listening on User Database Manager Socket.
[    7.548206] systemd[1]: Mounting Huge Pages File System...
         Mounting Huge Pages File System...
[    7.572456] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[    7.600494] systemd[1]: Mounting Kernel Debug File System...
         Mounting Kernel Debug File System...
[    7.621611] systemd[1]: Condition check resulted in Kernel Trace File System being skipped.
[    7.633462] systemd[1]: Mounting Temporary Directory /tmp...
         Mounting Temporary Directory /tmp...
[    7.649527] systemd[1]: Condition check resulted in Create List of Static Device Nodes being skipped.
[    7.662503] systemd[1]: Starting Load Kernel Module configfs...
         Starting Load Kernel Module configfs...
[    7.681329] systemd[1]: Starting Load Kernel Module drm...
         Starting Load Kernel Module drm...
[    7.700855] systemd[1]: Starting Load Kernel Module fuse...
         Starting Load Kernel Module fuse...
[    7.720867] systemd[1]: Starting RPC Bind...
         Starting RPC Bind...
[    7.737368] systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
[    7.747299] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.
[    7.758190] systemd[1]: Mounting NFSD configuration filesystem...
         Mounting NFSD configuration filesystem...
[    7.780781] systemd[1]: Starting Remount Root and Kernel File Systems...
         Starting Remount Root and Kernel File Systems...
[    7.808971] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...
[    7.828883] systemd[1]: Starting Coldplug All udev Devices...
         Starting Coldplug All udev Devices...
[    7.850396] systemd[1]: Started RPC Bind.
[  OK  ] Started RPC Bind.
[    7.865887] systemd[1]: Mounted Huge Pages File System.
[  OK  ] Mounted Huge Pages File System.
[    7.889935] systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
[    7.913878] systemd[1]: Mounted Kernel Debug File System.
[  OK  ] Mounted Kernel Debug File System.
[    7.937880] systemd[1]: Mounted Temporary Directory /tmp.
[  OK  ] Mounted Temporary Directory /tmp.
[    7.962572] systemd[1]: modprobe@configfs.service: Deactivated successfully.
[    7.971197] systemd[1]: Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module configfs.
[    7.993994] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    8.001853] systemd[1]: Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module drm.
[    8.025908] systemd[1]: modprobe@fuse.service: Deactivated successfully.
[    8.033843] systemd[1]: Finished Load Kernel Module fuse.
[  OK  ] Finished Load Kernel Module fuse.
[    8.057506] systemd[1]: proc-fs-nfsd.mount: Mount process exited, code=exited, status=32/n/a
[    8.066041] systemd[1]: proc-fs-nfsd.mount: Failed with result 'exit-code'.
[    8.074590] systemd[1]: Failed to mount NFSD configuration filesystem.
[FAILED] Failed to mount NFSD configuration filesystem.
See 'systemctl status proc-fs-nfsd.mount' for details.
[    8.109171] systemd[1]: Dependency failed for NFS Mount Daemon.
[DEPEND] Dependency failed for NFS Mount Daemon.
[    8.129137] systemd[1]: Dependency failed for NFS server and services.
[DEPEND] Dependency failed for NFS server and services.
[    8.153122] systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
[    8.162739] systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
[    8.174094] systemd[1]: Finished Remount Root and Kernel File Systems.
[  OK  ] Finished Remount Root and Kernel File Systems.
[    8.198781] systemd[1]: Finished Apply Kernel Variables.
[  OK  ] Finished Apply Kernel Variables.
[    8.224687] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[    8.236797] systemd[1]: Mounting Kernel Configuration File System...
         Mounting Kernel Configuration File System...
[    8.261800] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
[    8.270748] systemd[1]: Condition check resulted in Platform Persistent Storage Archival being skipped.
[    8.284143] systemd[1]: Starting Create System Users...
         Starting Create System Users...
[    8.305760] systemd[1]: Mounted Kernel Configuration File System.
[  OK  ] Mounted Kernel Configuration File System.
[    8.335643] systemd[1]: Finished Create System Users.
[  OK  ] Finished Create System Users.
[    8.357634] systemd[1]: Starting Create Static Device Nodes in /dev...
         Starting Create Static Device Nodes in /dev...
[    8.388155] systemd[1]: Finished Create Static Device Nodes in /dev.
[  OK  ] Finished Create Static Device Nodes in /dev.
[    8.409726] systemd[1]: Reached target Preparation for Local File Systems.
[  OK  ] Reached target Preparation for Local File Systems.
[    8.436960] systemd[1]: Mounting /var/volatile...
         Mounting /var/volatile...
[    8.458061] systemd[1]: Started Entropy Daemon based on the HAVEGE algorithm.
[  OK  ] Started Entropy Daemon based on the HAVEGE algorithm.
[    8.482324] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[    8.504100] systemd[1]: (This warning is only shown for the first unit using IP firewalling.)
[    8.533763] systemd[1]: Starting Journal Service...
         Starting Journal Service...
[    8.562450] systemd[1]: Starting Rule-based Manager for Device Events and Files...
         Starting Rule-based Manage…for Device Events and Files...
[    8.605979] systemd[1]: Finished Coldplug All udev Devices.
[  OK  ] Finished Coldplug All udev Devices.
[    8.642050] systemd[1]: Mounted /var/volatile.
[  OK  ] Mounted /var/volatile.
[    8.657700] systemd[1]: Condition check resulted in Bind mount volatile /var/cache being skipped.
[    8.677375] systemd[1]: Condition check resulted in Bind mount volatile /var/lib being skipped.
[    8.701676] systemd[1]: Starting Load/Save Random Seed...
         Starting Load/Save Random Seed...
[    8.729365] systemd[1]: Condition check resulted in Bind mount volatile /var/spool being skipped.
[    8.745491] systemd[1]: Condition check resulted in Bind mount volatile /srv being skipped.
[    8.768055] systemd[1]: Reached target Local File Systems.
[  OK  ] Reached target Local File Systems.
[    8.807259] systemd[1]: Starting Rebuild Dynamic Linker Cache...
         Starting Rebuild Dynamic Linker Cache...
[    8.838671] systemd[1]: Started Journal Service.
[  OK  ] Started Journal Service.
[  OK  ] Started Rule-based Manager for Device Events and Files.
[  OK  ] Finished Rebuild Dynamic Linker Cache.
         Starting Flush Journal to Persistent Storage...
         Starting Network Configuration...
[    8.969273] systemd-journald[245]: Received client request to flush runtime journal.
[  OK  ] Finished Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Finished Create Volatile Files and Directories.
         Starting Rebuild Journal Catalog...
         Starting Network Time Synchronization...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
[  OK  ] Reached target Hardware activated USB gadget.
[  OK  ] Finished Rebuild Journal Catalog.
         Starting Update is Completed...
[    9.718317] random: fast init done
[  OK  ] Finished Update is Completed.
[  OK  ] Started Network Configuration.
[    9.938391] macb ff0d0000.ethernet eth0: PHY [ff0d0000.ethernet-ffffffff:07] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[    9.949884] macb ff0d0000.ethernet eth0: configuring for phy/rgmii-id link mode
[    9.967973] pps pps0: new PPS source ptp0
[    9.972628] macb ff0d0000.ethernet: gem-ptp-timer ptp clock registered.
         Starting Network Name Resolution...
[  OK  ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
[  OK  ] Created slice Slice /system/systemd-fsck.
         Starting File System Check on /dev/mmcblk0p1...
[  OK  ] Found device /dev/mmcblk0p2.
[  OK  ] Finished File System Check on /dev/mmcblk0p1.
[   11.429149] random: crng init done
[   11.432585] random: 7 urandom warning(s) missed due to ratelimiting
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Network.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target System Time Set.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on dropbear.socket.
[  OK  ] Reached target Socket Units.
[  OK  ] Reached target Basic System.
         Mounting /run/media/mmcblk0p1...
[  OK  ] Started Kernel Logging Service.
[  OK  ] Started System Logging Service.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started NFS status monitor for NFSv2/3 locking..
         Starting LSB: NFS support for both client and server...
         Starting File System Check on /dev/mmcblk0p2...
         Starting User Login Management...
         Starting Permit User Sessions...
         Starting Target Communication Framework agent...
[  OK  ] Started LSB: NFS support for both client and server.
[  OK  ] Mounted /run/media/mmcblk0p1.
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Getty on tty1.
         Starting inetd.busybox.service...
         Starting LSB: Kernel NFS server support...
[  OK  ] Started Serial Getty on ttyPS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Target Communication Framework agent.
[  OK  ] Started inetd.busybox.service.
[FAILED] Failed to start LSB: Kernel NFS server support.
See 'systemctl status nfsserver.service' for details.
[  OK  ] Finished File System Check on /dev/mmcblk0p2.
         Mounting /run/media/mmcblk0p2...
[  OK  ] Started User Login Management.
[  OK  ] Reached target Multi-User System.
         Starting Record Runlevel Change in UTMP...
[   12.999051] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[  OK  ] Mounted /run/media/mmcblk0p2.
[  OK  ] Finished Record Runlevel Change in UTMP.
[   13.582224] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   13.587800] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[   13.595670] xhci-hcd xhci-hcd.1.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x0000000002010090
[   13.605153] xhci-hcd xhci-hcd.1.auto: irq 63, io mem 0xfe300000
[   13.611370] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[   13.619658] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.626898] usb usb1: Product: xHCI Host Controller
[   13.631778] usb usb1: Manufacturer: Linux 5.15.36-xilinx-v2022.2 xhci-hcd
[   13.638572] usb usb1: SerialNumber: xhci-hcd.1.auto
[   13.643975] hub 1-0:1.0: USB hub found
[   13.647921] hub 1-0:1.0: 1 port detected
[   13.652197] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   13.657732] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[   13.665448] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[   13.672149] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   13.680461] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[   13.688746] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   13.695977] usb usb2: Product: xHCI Host Controller
[   13.700859] usb usb2: Manufacturer: Linux 5.15.36-xilinx-v2022.2 xhci-hcd
[   13.707647] usb usb2: SerialNumber: xhci-hcd.1.auto
[   13.713004] hub 2-0:1.0: USB hub found
[   13.716811] hub 2-0:1.0: 1 port detected
[   14.055496] macb ff0d0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   14.063236] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

PetaLinux 2022.2_update1_04022314 zub1cgi4filters ttyPS0

zub1cgi4filters login: 

  1. 2023年09月26日 05:12 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

ZUBoard 1CG の i4filters プロジェクトの回路を Petalinux で動作させる1

今まで ZUBoard 1CG の PYNQ Linux で動作させてきた i4filters プロジェクトの回路Petalinux で動作させてみよう。

Petalinux 2022.2 で zub1cg_i4flilters プロジェクトを作成した。
petalinux-create -t project -n zub1cg_i4filters --template zynqMP

zub1cg_i4filters ディレクトリに行って、ハードウェアの XSA ファイルの設定を適用した。
cd zub1cg_i4filters
petalinux-config --get-hw-description=/media/masaaki/Ubuntu_Disk/HDL/2023.1/zub1cg/i4filters


misc/config System Configuration が起動した。
デフォルトのままにした。
zub1cg_i4filters_2_230924.png

セーブして終了した。
zub1cg_i4filters_3_230924.png

ZUBoard1CG/Avnet_2022_2/petalinux/projects/zub1cg_i4filters/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi を書き換えて、UIO のエントリを追加した。
zub1cg_i4filters_4_230924.png

/include/ "system-conf.dtsi"
/ {
    chosen {
        bootargs = "uio_pdrv_genirq.of_id=generic-uio";
    };
};

    &axi_dma_0{
        compatible = "generic-uio";
    };
    
    &color_converter_RGB24_0{
        compatible = "generic-uio";
    };
    
    &gaussian_axis_RGB24_0{
        compatible = "generic-uio";
    };

    &median_axis_RGB24_0{
        compatible = "generic-uio";
    };
    
    &sobel_axis_RGB24_0{
        compatible = "generic-uio";
    };
    
    &sdhci1 {
        status = "okay";
        no-1-8-v;
        disable-wp;
    };


RootFS を設定した。
petalinux-config -c rootfs

sudo を有効にした。
zub1cg_i4filters_5_230924.png

dnf を有効にした。
zub1cg_i4filters_6_230924.png

opencv の pakagegroup を有効にした。
zub1cg_i4filters_7_230924.png

セーブして終了した。
zub1cg_i4filters_8_230924.png

ビルドを行った。
petalinux-build
zub1cg_i4filters_9_230924.png

images/linux ディレクトリにファイルが生成されていた。
zub1cg_i4filters_10_230924.png

BOOT.BIN を作成した。
cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit --force

zub1cg_i4filters_11_230924.png

images/linux/BOOT.BIN が生成された。
zub1cg_i4filters_12_230924.png

images/linux ディレクトリの BOOT.BIN, boot.scr, image.ub を FAT32 でフォーマットされた MicroSD カードに書き込んだ。
zub1cg_i4filters_13_230924.png

Micro SD カードを ZUBoard 1CG に挿入し電源ONした。
Petalinux 2022.2 の起動の途中で Kernel panic で終了した。
zub1cg_i4filters_14_230924.png
  1. 2023年09月25日 04:37 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

ZUBoard 1CG の PYNQ v3.0.1 で自作の 4 個のフィルタを動作させる4

ZUBoard 1CG の PYNQ v3.0.1 で自作の 4 個のフィルタを動作させる3”の続き。

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する2”で作成した color_converter_RGB24 IP を”ZUBoard 1CG の PYNQ v3.0.1 で自作のガウシアン・フィルタ、メディアン・フィルタとソーベル・フィルタを動作させる4”の回路に追加してみようということで、前回は、”メディアン・フィルタとガウシアン・フィルタが RBG 出力でバグっていた”で、median_axis_RGB24 IP と gaussian_axis_RGB24 IP がバグっているのがわかった。Vitis HLS 2023.1 を起動して、median_axis_RGB24 IP と gaussian_axis_RGB24 IP をバグを修正してから、C シミュレーション、C コードの合成、Export RTL を行った。できた IP を Vivado 2023.1 の i4filters プロジェクトの median_axis_RGB24 IP と gaussian_axis_RGB24 IP と入れ替えて、論理合成、インプリメンテーション、ビットストリームの生成を行って成功した。今回は、hwh ファイルと bit ファイルを ZUBoard 1CG の PYNQ Linux にアップロードし、i4filters.ipynb を作成した。i4filters.ipynb を実行したところ、無事に”Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する2”で作成した color_converter_RGB24 IP を動作させることができた。

HDL/2023.1/zub1cg/i4filters/i4filters.gen/sources_1/bd/i4filters/hw_handoff/i4filters.hwh ファイルと HDL/2023.1/zub1cg/i4filters/i4filters.runs/impl_1/i4filters_wrapper.bit ファイルを ZUBoard 1CG の PYNQ Linux の Jupter Notebook にアップロードした。

test2.jpg と blue.bmp, green.bmp, red.bmp ファイルを Jupter Notebook の i3filters ディレクトリからコピーした。

i4filters.ipynb を作成した。
zub1cg_pynq_286_230922.png

i4fitlers.ipynb を示す。

from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from pynq import allocate, Overlay

i4filters = Overlay("./i4filters.bit")

dma = i4filters.axi_dma_0
median = i4filters.median_axis_RGB24_0
sobel = i4filters.sobel_axis_RGB24_0
gaussian = i4filters.gaussian_axis_RGB24_0
color_conv = i4filters.color_converter_RGB24_0

image_path = "./test2.jpg"
#image_path = "./blue.bmp"
#image_path = "./green.bmp"
#image_path = "./red.bmp"
original_image = Image.open(image_path)

canvas = plt.gcf()
size = canvas.get_size_inches()
canvas.set_size_inches(size*2)

width, height = original_image.size
print("Image size: {}x{} pixels.".format(width, height))
plt.figure(figsize=(12, 10));
_ = plt.imshow(original_image)

in_buffer = allocate(shape=(height, width, 3), 
                           dtype=np.uint8, cacheable=1)
out_buffer = allocate(shape=(height, width, 3), 

in_buffer[:] = np.array(original_image)

def run_kernel():
    dma.sendchannel.transfer(in_buffer)
    dma.recvchannel.transfer(out_buffer) 
    gaussian.write(0x00,0x01) # start
    median.write(0x00,0x01) # start
    color_conv.write(0x00,0x01) #start
    sobel.write(0x00,0x01) # start
    dma.sendchannel.wait()
    dma.recvchannel.wait()

print(height)
print(width)

gaussian.register_map.row_size = height
gaussian.register_map.col_size = width
gaussian.register_map.function_r = 2 # ORG_IMGwAxiDma
#gaussian.register_map.function_r = 3 # GAUSSIANwAxiDma

median.register_map.row_size = height
median.register_map.col_size = width
#median.register_map.function_r = 2 # ORG_IMGwAxiDma
median.register_map.function_r = 3 # MEDIANwAxiDma

color_conv.register_map.row_size = height
color_conv.register_map.col_size = width
#color_conv.register_map.function_r = 2 # ORG_IMGwAxiDma
color_conv.register_map.function_r = 3 # COLOR_CONVwAxiDma
color_conv.register_map.red_mag = 0x2000 # 32.0, ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT>
color_conv.register_map.green_mag = 0x0100 # 1.0, ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> 
color_conv.register_map.blue_mag = 0x0100 # 1.0, ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> 

sobel.register_map.row_size = height
sobel.register_map.col_size = width
sobel.register_map.function_r = 2 # ORG_IMGwAxiDma
#sobel.register_map.function_r = 3 # SOBELwAxiDma

run_kernel()
sobel_image = Image.fromarray(out_buffer)

print("Image size: {}x{} pixels.".format(width, height))
plt.figure(figsize=(12, 10));
_ = plt.imshow(sobel_image)

del in_buffer
del out_buffer


i4filters.ipynb を実行した。
zub1cg_pynq_287_230922.png
zub1cg_pynq_288_230922.jpg
zub1cg_pynq_289_230922.png
zub1cg_pynq_290_230922.jpg
メディアン・フィルタでノイズを除去した後に color_converter_RGB24 IP で赤だけを 32 倍にした。
ガウシアン・フィルタとソーベル・フィルタはスルーに設定した。

メディアン・フィルタでノイズを除去した後に color_converter_RGB24 IP で緑だけを 32 倍にした。
zub1cg_pynq_291_230922.jpg

メディアン・フィルタでノイズを除去した後に color_converter_RGB24 IP で青だけを 32 倍にした。
zub1cg_pynq_292_230922.jpg
  1. 2023年09月23日 04:19 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

ZUBoard 1CG の PYNQ v3.0.1 で自作の 4 個のフィルタを動作させる3

ZUBoard 1CG の PYNQ v3.0.1 で自作の 4 個のフィルタを動作させる2”の続き。

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する2”で作成した color_converter_RGB24 IP を”ZUBoard 1CG の PYNQ v3.0.1 で自作のガウシアン・フィルタ、メディアン・フィルタとソーベル・フィルタを動作させる4”の回路に追加してみようということで、前回は、i4flilters ブロック・デザインのラッパーファイルを生成し、論理合成、インプリメンテーション、ビットストリームの生成を行って成功した。PYNQ で使用する hwh ファイルと、bit ファイルが生成された。今回は、”メディアン・フィルタとガウシアン・フィルタが RBG 出力でバグっていた”で、median_axis_RGB24 IP と gaussian_axis_RGB24 IP がバグっているのがわかった。Vitis HLS 2023.1 を起動して、median_axis_RGB24 IP と gaussian_axis_RGB24 IP をバグを修正してから、C シミュレーション、C コードの合成、Export RTL を行った。できた IP を Vivado 2023.1 の i4filters プロジェクトの median_axis_RGB24 IP と gaussian_axis_RGB24 IP と入れ替えて、論理合成、インプリメンテーション、ビットストリームの生成を行って成功した。

Vitis HLS 2023.1 を起動して、median_axis_RGB24 IP と gaussian_axis_RGB24 IP をバグを修正してから、C シミュレーション、C コードの合成、Export RTL を行った。
なお、新規に solution を作成し、solution2 で行った。

出来上がった median_axis_RGB24 IP と gaussian_axis_RGB24 IP を Vivado 2023.1 の i4filters プロジェクトの median_axis_RGB24 IP と gaussian_axis_RGB24 IP と入れ替える。

Vivado 2023.1 の i4filters プロジェクトのディレクトリに median_axis_RGB24 ディレクトリと gaussian_axis_RGB24 ディレクトリがあるが、それの内容を削除し、Vitis HLS のプロジェクトの solution2/impl/export.zip を展開したファイルをコピーした。

Vivado 2023.1 の i4filters プロジェクトを見ると、IP が更新されているメッセージが出ているので、Report IP Status をクリックした。
zub1cg_pynq_280_230921.png

IP Status 画面が表示された。
Upgrade Selected ボタンをクリックして、IP を更新する。
zub1cg_pynq_281_230921.png

IP が更新され、ダイアログが表示された後に、Generate Output Products ダイアログが表示された。
Generate ボタンをクリックした。
zub1cg_pynq_282_230921.png

生成が終了した Vivado プロジェクトを示す。
Rerun をクリックした。
zub1cg_pynq_283_230921.png

IP Status 画面が更新された。
zub1cg_pynq_284_230921.png

Flow Navigator -> PROGRAM AND DEBUG -> Generate Bitstream をクリックして、論理合成、インプリメンテーション、ビットストリームの生成を行って、成功した。
Project Summary を示す。
zub1cg_pynq_285_230921.png

HDL/2023.1/zub1cg/i4filters/i4filters.gen/sources_1/bd/i4filters/hw_handoff/i4filters.hwh ファイルが生成された。
zub1cg_pynq_265_230919.png

HDL/2023.1/zub1cg/i4filters/i4filters.runs/impl_1/i4filters_wrapper.bit ファイルが生成された。
zub1cg_pynq_266_230919.png
  1. 2023年09月22日 04:18 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

ガウシアン・フィルタの Vitis HLS 2023.1 を修正して、csim したらエラーになった

メディアン・フィルタとガウシアン・フィルタが RBG 出力でバグっていた”でガウシアン・フィルタのコードを修正したので、もう一度、Vitis HLS で C シミュレーションしようとしたらエラーになった。

ガウシアン・フィルタのコードを修正したので、もう一度、Vitis HLS で C シミュレーションしようとしたら libwebp.so.6 のエラーが発生した。

./csim.exe: error while loading shared libraries: libwebp.so.6: cannot open shared object file: No such file or directory


zub1cg_pynq_276_230921.png

ネットで検索したところ、”libwebp.so.6 Import error in Raspberry Pi 3b”が見つかった。
それによると、解決方法は、

sudo apt-get install libwebp-dev

だそうだ。

やってみたが、すでに最新バージョンだった。orz

一度、削除してからもう一度インストールしてみたが、やはりだめだった。
zub1cg_pynq_277_230921.png

Ubuntu 18.04 から Ubuntu 22.04 にアップグレードしてから色々と不具合が出ている。
Vitis 2023.1 をアンインストールしてから、もう一度インストールしたほうが良いかな?

苦肉の策で、/snap/gnome-3-38-2004/140/usr/lib/x86_64-linux-gnu/libwebp.so.6.0.2 を /usr/lib にコピーして、libwebp.so.6 にリンクを貼ったら Vitis HLS 2023.1 の C シミュレーションが通った。
sudo ln /usr/lib/libwebp.so.6.0.2 /usr/lib/libwebp.so.6
zub1cg_pynq_278_230921.png

zub1cg_pynq_279_230921.png
  1. 2023年09月21日 05:33 |
  2. Vitis HLS
  3. | トラックバック:0
  4. | コメント:0

メディアン・フィルタとガウシアン・フィルタが RBG 出力でバグっていた

ZUBoard 1CG の PYNQ v3.0.1 で自作の 4 個のフィルタを動作させる2”の次の課題の ZUBoard 1CG の PYNQ Linux の Jupyuter Notebook でテストしていたときに、どうにも色がおかしい事案が発生した。そこで、メディアン・フィルタとガウシアン・フィルタのコードを見たらフィルタの演算をして、出力するところで、RGB の順で出力するところ、RBG で出力するバグを発見した。これを修正する。

ガウシアン・フィルタ(gaussian_axis_RGB24)のフィルタの演算をする部分 madian_fil() で結果を出力する result 変数のコードを示す。

result = (y_r << 16) + (y_b << 8) + y_g;


zub1cg_pynq_273_230921.png

RBG になっていたので、RGB に変更した。

result = (y_r << 16) + (y_g << 8) + y_b;


zub1cg_pynq_274_230921.png

RGB 24 ビットの AXI4-Stream データ入出力対応のガウシアン・フィルタを Vitis HLS 2023.1 で作成する1”のコードを修正した。


メディアン・フィルタ(median_axis_RGB24)も同様に RBG になっていたので、RGB に修正した。
zub1cg_pynq_275_230921.png

RGB 24 ビット・データ入出力対応のメディアン・フィルタを Vitis HLS 2021.2 で作成する1”のコードを修正した。
  1. 2023年09月21日 04:47 |
  2. Vitis HLS
  3. | トラックバック:0
  4. | コメント:0

ZUBoard 1CG の PYNQ v3.0.1 で自作の 4 個のフィルタを動作させる2

ZUBoard 1CG の PYNQ v3.0.1 で自作の 4 個のフィルタを動作させる1”の続き。

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する2”で作成した color_converter_RGB24 IP を”ZUBoard 1CG の PYNQ v3.0.1 で自作のガウシアン・フィルタ、メディアン・フィルタとソーベル・フィルタを動作させる4”の回路に追加してみようということで、前回は、最初に Vivado 2023.1 の i4filters プロジェクトを新規作成した。また、i3filters プロジェクトでエクスポートしたブロック・デザイン作成 tcl ファイルを元に i4filters ブロック・デザインを作成し、color_converter_RGB24 IP を挿入した。今回は、i4flilters ブロック・デザインのラッパーファイルを生成し、論理合成、インプリメンテーション、ビットストリームの生成を行って成功した。PYNQ で使用する hwh ファイルと、bit ファイルが生成された。

最初に i4flilters ブロック・デザインのラッパーファイルを生成する。
Vivado 2023.1 の Source ウインドウの i4fitlers_i ブロック・デザインを右クリックし、右クリックメニューから Create HDL Wrapper... を選択して、i4filters_wrapper.v を生成した。
i4filters_wrapper.v がトップのファイルとなる。
zub1cg_pynq_263_230919.png

Flow Navigator -> PROGRAM AND DEBUG -> Generate Bitstream をクリックして、論理合成、インプリメンテーション、ビットストリームの生成を行って、成功した。
Project Summary を示す。
zub1cg_pynq_264_230919.png

HDL/2023.1/zub1cg/i4filters/i4filters.gen/sources_1/bd/i4filters/hw_handoff/i4filters.hwh ファイルが生成された。
zub1cg_pynq_265_230919.png

HDL/2023.1/zub1cg/i4filters/i4filters.runs/impl_1/i4filters_wrapper.bit ファイルが生成された。
zub1cg_pynq_266_230919.png
  1. 2023年09月20日 04:39 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

ZUBoard 1CG の PYNQ v3.0.1 で自作の 4 個のフィルタを動作させる1

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する2”で作成した color_converter_RGB24 IP を”ZUBoard 1CG の PYNQ v3.0.1 で自作のガウシアン・フィルタ、メディアン・フィルタとソーベル・フィルタを動作させる4”の回路に追加してみよう。

ZUBoard 1CG の PYNQ v3.0.1 で自作のガウシアン・フィルタ、メディアン・フィルタとソーベル・フィルタを動作させる4”の Vivado 2023.1 の i3filters ブロック・デザインをエクスポートする。

Vivado 2023.1 の i3filters プロジェクトを開いて、i3filters ブロック・デザインを表示し、File メニューの Export -> Export Block Design... を選択した。
Export Block Design ダイアログが表示された。
OK ボタンをクリックした。
zub1cg_pynq_249_230919.png

i3filters.tcl ファイルが出力された。
zub1cg_pynq_250_230919.png

新しく Vivado 2023.1 の i4filters プロジェクトを作成した。
Project Name 画面では、Project name に i4filters と入力した。
zub1cg_pynq_251_230919.png

Project Type 画面では、RTL Project を選択した。
zub1cg_pynq_252_230919.png

Default Part 画面では、Boards を選択し、Vender では avnet.com を選択して、ZUBoard 1CG Development Board を選択した。
zub1cg_pynq_253_230919.png

New Project Summary を示す。
zub1cg_pynq_254_230919.png

Vivado 2023.1 の i4filters プロジェクトが新規作成された。
zub1cg_pynq_255_230919.png

i3filters プロジェクトのディレクトリから、gaussian_axis_RGB24, median_axis_RGB24, sobel_axis_RGB24, i3filters.tcl を i4filters プロジェクトのディレクトリへコピーした。
zub1cg_pynq_256_230919.png

i3filters.tcl を編集して

set design_name i4filters

に変更した。
zub1cg_pynq_257_230919.png

i4filters プロジェクトのディレクトリに color_converter_RGB24 ディレクトリを新規作成し、”Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する2”の soloution1/impl/export.zip を展開した。
zub1cg_pynq_258_230919.png

IP Catlog を表示し、右クリックし右クリックメニューから Add Repository... を選択して、gaussian_axis_RGB24, median_axis_RGB24, sobel_axis_RGB24, color_converter_RGB24 を追加した。
zub1cg_pynq_259_230919.png

Vivado の Tcl Console で次のコマンドを入力して、i4fliters ブロック・デザインを作成した。
cd /media/masaaki/Ubuntu_Disk/HDL/2023.1/zub1cg/i4filters/
source i3filters.tcl

zub1cg_pynq_260_230919.png

i4fliters ブロック・デザインに color_converter_RGB24 を追加して、回路を完成させた。
zub1cg_pynq_261_230919.png

Address Editor 画面を示す。
zub1cg_pynq_262_230919.png
  1. 2023年09月20日 04:02 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

MicroZed Chronicles: UIO をやってみる9

MicroZed Chronicles: UIO をやってみる8”の続き。

MicroZed Chronicles: UIO Part One - Introduction and Set Up”と”MicroZed Chronicles: UIO Part Two - Creating Software Applications”をやってみよう。なお、関連する MicroZed Chronicles のブログの”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”も参考にしている。

前回は、root で Vitis を起動してやってみたが同様のエラーだった。次に、通常に Vitis を起動して、Remote Working Directory を /home/petalinux にしてみたところ、デバッグができて、ソフトウェアの動作がうまくいった。今回は、RAM ディスクでやっているのが煩わしいので、Rootfs を MicroSD カードの第 2 パーティションにしようとしたが、Petalinux が起動途中で Kernel panic で落ちてしまった。

今回は、”rootfs on SD card”を参考に Rootfs を SD カードの第 2 パーティションにしてみよう。

まずは、Petalinux で Rootfs を RAM ディスクから SD カードの第 2 パーティションに設定を変更する。

zub1cg_gpio ディレクトリに行って、ハードウェアをインポートした。
petalinux-config --get-hw-description=/media/masaaki/Ubuntu_Disk/ZUBoard1CG/at_2022_2/myproj

Image Packing Configuration -> Root filesystem typeEXT4 (SD/eMMC/SATA/USB) に変更した。
zub1cg_uio_70_230917.png

zub1cg_uio_71_230917.png

セーブして終了した。
zub1cg_uio_72_230917.png

ビルドする前の zub1cg_gpio/images/linux/image.ub の大きさは 76.5 MB だった。
zub1cg_uio_73_230917.png

ビルドを行って成功した。
petalinux-build
zub1cg_uio_74_230917.png

ビルド後の zub1cg_gpio/images/linux/image.ub の大きさは 9.3 MB で小さくなっていた。
zub1cg_uio_75_230917.png

rootfs.tar.gz も images/linux ディレクトリに生成された。
zub1cg_uio_76_230917.png

BOOT.BIN を作成した。
cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit --force

zub1cg_uio_77_230917.png

BOOT.BIN が生成された。
zub1cg_uio_78_230917.png

第 1 パーティションを 1 GB FAT32 フォーマット、第 2 パーティションを残りの約 31 GB EXT4 フォーマットに Micro SD カードをフォーマットする。

私のマシンでは、lsblk を実行すると /dev/sdf1 にマウントされていた。
sudo umount /dev/sdf1
sudo fdisk /dev/sdf


p コマンドでディスクの状態を表示した。

d コマンドでパーティションを削除した。
p コマンドでディスクの状態を表示した

n コマンドで新しいパーティションを作製した。
p で primary を指定した。
バーティション番号を 1 とした。
First sector の指定で Enter キーを押した。
Last sector で +1GB を入力した。第1パーティションに 954 MB の領域を確保した。

n コマンドで新しいパーティションを作製した。
p で primary を指定した。
バーティション番号を 2 とした。
First sector の指定で Enter キーを押した。
Last sector で Enter キーを押して、MicroSD カードの残りの領域を確保した(約 31 GB)。

第 1 パーティションをFAT32 にして、 bootable に設定する。
t コマンドを入力する。
パーティション番号に 1 を指定する。
Partition type に b を指定した。

a コマンドを入力する。
パーティション番号に 1 を入力した。

w コマンドで partition table の変更を保存して終了した。

sudo mkfs.msdos -n boot /dev/sdf1
sdf1 を mkfs.msdos で FAT32 でフォーマットした。
sudo mkfs.ext4 -L root /dev/sdf2
sdf2 を ext4 でフォーマットした。
zub1cg_uio_79_230917.png

フォーマットした microSD カードの boot と root をマウントした。

Micro SD カードの boot パーティションに BOOT.BIN, boot.scr, image.ub をコピーする。
zub1cg_uio_80_230917.png

rootfs.tar.gz を MicroSD カードの root パーティションに展開する。
sudo tar xfz rootfs.tar.gz -C /media/masaaki/root/
sync

zub1cg_uio_81_230917.png

MicroSD カードの root パーティションを示す。
zub1cg_uio_82_230917.png

これで、Micro SD カードの用意が完了した。
Micro SD カードを ZUBoard 1CG に挿入して、電源 ON して、SW7 を押した。
Petalinux が立ち上がりかけたが、Kernel Panic で立ち上がらなかった。
zub1cg_uio_83_230917.png

ログを示す。

NOTICE:  BL31: v2.6(release):xlnx_rebase_v2.6_2022.1_update3-18-g0897efd45
NOTICE:  BL31: Built : 03:55:03, Sep  9 2022


U-Boot 2022.01 (Sep 20 2022 - 06:35:33 +0000)

CPU:   ZynqMP
Silicon: v3
Board: Xilinx ZynqMP
DRAM:  1023 MiB
PMUFW:  v1.1
PMUFW no permission to change config object
EL Level:   EL2
Chip ID:    zu1eg
NAND:  0 MiB
MMC:   mmc@ff170000: 0
Loading Environment from FAT... *** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment

In:    serial
Out:   serial
Err:   serial
Bootmode: SD_MODE1
Reset reason:   EXTERNAL 
Net:   FEC: can't find phy-handle

ZYNQ GEM: ff0d0000, mdio bus ff0d0000, phyaddr 7, interface rgmii-id

Warning: ethernet@ff0d0000 (eth0) using random MAC address - de:ea:70:dd:ae:e5
eth0: ethernet@ff0d0000
scanning bus for devices...
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
2777 bytes read in 14 ms (193.4 KiB/s)
## Executing script at 20000000
Trying to load boot images from mmc0
9310760 bytes read in 688 ms (12.9 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf-system-top.dtb' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Created:      2022-10-03   7:50:07 UTC
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x100000fc
     Data Size:    9268952 Bytes = 8.8 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00200000
     Entry Point:  0x00200000
     Hash algo:    sha256
     Hash value:   f2afd779a2a59f6aedf7542cc1ccf87b4f7731c4417dfc201e2faabd78544253
   Verifying Hash Integrity ... sha256+ 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
     Created:      2022-10-03   7:50:07 UTC
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x108d70e4
     Data Size:    39897 Bytes = 39 KiB
     Architecture: AArch64
     Hash algo:    sha256
     Hash value:   2641e1fcdaec4ef539b9dd0f987f5ab3f5460ba26ba1f3a54fc0a24a619a8d69
   Verifying Hash Integrity ... sha256+ OK
   Booting using the fdt blob at 0x108d70e4
   Uncompressing Kernel Image
   Loading Device Tree to 000000003bbee000, end 000000003bbfabd8 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.36-xilinx-v2022.2 (oe-user@oe-host) (aarch64-xilinx-linux-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP Mon Oct 3 07:50:07 UTC 2022
[    0.000000] Machine model: xlnx,zynqmp
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000000000000-0x000000003fefffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003fefffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fefffff]
[    0.000000] On node 0, zone DMA32: 256 pages in unavailable ranges
[    0.000000] cma: Reserved 256 MiB at 0x000000002b800000
[    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] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 18 pages/cpu s34776 r8192 d30760 u73728
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 257796
[    0.000000] Kernel command line: uio_pdrv_genirq.of_id=generic-uio
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 743380K/1047552K available (13888K kernel code, 990K rwdata, 3916K rodata, 2176K init, 573K bss, 42028K reserved, 262144K cma-reserved)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=2.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x474/0x6d8 with crng_init=0
[    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.000001] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.000363] Console: colour dummy device 80x25
[    0.000600] printk: console [tty0] enabled
[    0.000635] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.000656] pid_max: default: 32768 minimum: 301
[    0.000927] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000949] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.002345] rcu: Hierarchical SRCU implementation.
[    0.002589] EFI services will not be available.
[    0.002702] smp: Bringing up secondary CPUs ...
[    0.003142] Detected VIPT I-cache on CPU1
[    0.003192] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.003276] smp: Brought up 1 node, 2 CPUs
[    0.003300] SMP: Total of 2 processors activated.
[    0.003311] CPU features: detected: 32-bit EL0 Support
[    0.003321] CPU features: detected: CRC32 instructions
[    0.003370] CPU: All CPU(s) started at EL2
[    0.003390] alternatives: patching kernel code
[    0.004398] devtmpfs: initialized
[    0.008833] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.008865] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.018697] pinctrl core: initialized pinctrl subsystem
[    0.019361] DMI not present or invalid.
[    0.019672] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.020962] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.021051] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.021117] audit: initializing netlink subsys (disabled)
[    0.021221] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.021639] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.021691] ASID allocator initialised with 65536 entries
[    0.021818] Serial: AMBA PL011 UART driver
[    0.040050] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.040083] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.040094] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.040105] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    1.109757] cryptd: max_cpu_qlen set to 1000
[    1.135026] DRBG: Continuing without Jitter RNG
[    1.237062] raid6: neonx8   gen()  2144 MB/s
[    1.305121] raid6: neonx8   xor()  1586 MB/s
[    1.373191] raid6: neonx4   gen()  2186 MB/s
[    1.441242] raid6: neonx4   xor()  1555 MB/s
[    1.509318] raid6: neonx2   gen()  2064 MB/s
[    1.577370] raid6: neonx2   xor()  1428 MB/s
[    1.645453] raid6: neonx1   gen()  1762 MB/s
[    1.713502] raid6: neonx1   xor()  1212 MB/s
[    1.781556] raid6: int64x8  gen()  1365 MB/s
[    1.849621] raid6: int64x8  xor()   773 MB/s
[    1.917685] raid6: int64x4  gen()  1599 MB/s
[    1.985748] raid6: int64x4  xor()   852 MB/s
[    2.053817] raid6: int64x2  gen()  1396 MB/s
[    2.121880] raid6: int64x2  xor()   747 MB/s
[    2.189943] raid6: int64x1  gen()  1033 MB/s
[    2.258006] raid6: int64x1  xor()   517 MB/s
[    2.258017] raid6: using algorithm neonx4 gen() 2186 MB/s
[    2.258026] raid6: .... xor() 1555 MB/s, rmw enabled
[    2.258036] raid6: using neon recovery algorithm
[    2.258661] iommu: Default domain type: Translated 
[    2.258673] iommu: DMA domain TLB invalidation policy: strict mode 
[    2.258962] SCSI subsystem initialized
[    2.259149] usbcore: registered new interface driver usbfs
[    2.259188] usbcore: registered new interface driver hub
[    2.259217] usbcore: registered new device driver usb
[    2.259304] mc: Linux media interface: v0.10
[    2.259330] videodev: Linux video capture interface: v2.00
[    2.259379] pps_core: LinuxPPS API ver. 1 registered
[    2.259389] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.259410] PTP clock support registered
[    2.259445] EDAC MC: Ver: 3.0.0
[    2.259788] zynqmp-ipi-mbox mailbox@ff990400: Registered ZynqMP IPI mbox with TX/RX channels.
[    2.260043] FPGA manager framework
[    2.260187] Advanced Linux Sound Architecture Driver Initialized.
[    2.260581] Bluetooth: Core ver 2.22
[    2.260612] NET: Registered PF_BLUETOOTH protocol family
[    2.260622] Bluetooth: HCI device and connection manager initialized
[    2.260637] Bluetooth: HCI socket layer initialized
[    2.260648] Bluetooth: L2CAP socket layer initialized
[    2.260664] Bluetooth: SCO socket layer initialized
[    2.261097] clocksource: Switched to clocksource arch_sys_counter
[    2.261248] VFS: Disk quotas dquot_6.6.0
[    2.261301] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    2.265952] NET: Registered PF_INET protocol family
[    2.266071] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    2.266712] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    2.266743] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    2.266810] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    2.266985] TCP: Hash tables configured (established 8192 bind 8192)
[    2.267086] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    2.267120] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    2.267224] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.267579] RPC: Registered named UNIX socket transport module.
[    2.267591] RPC: Registered udp transport module.
[    2.267600] RPC: Registered tcp transport module.
[    2.267609] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.267624] PCI: CLS 0 bytes, default 64
[    2.267956] armv8-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
[    2.268107] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    2.295512] Initialise system trusted keyrings
[    2.295648] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    2.296497] NFS: Registering the id_resolver key type
[    2.296520] Key type id_resolver registered
[    2.296529] Key type id_legacy registered
[    2.296556] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.296569] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    2.296597] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    2.332853] NET: Registered PF_ALG protocol family
[    2.332870] xor: measuring software checksum speed
[    2.337055]    8regs           :  2363 MB/sec
[    2.340592]    32regs          :  2799 MB/sec
[    2.344871]    arm64_neon      :  2308 MB/sec
[    2.344881] xor: using function: 32regs (2799 MB/sec)
[    2.344894] Key type asymmetric registered
[    2.344903] Asymmetric key parser 'x509' registered
[    2.344957] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    2.344972] io scheduler mq-deadline registered
[    2.344982] io scheduler kyber registered
[    2.374041] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    2.375365] Serial: AMBA driver
[    2.376223] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    2.381217] brd: module loaded
[    2.384762] loop: module loaded
[    2.385814] mtdoops: mtd device (mtddev=name/number) must be supplied
[    2.388915] tun: Universal TUN/TAP device driver, 1.6
[    2.389013] CAN device driver interface
[    2.389717] usbcore: registered new interface driver asix
[    2.389781] usbcore: registered new interface driver ax88179_178a
[    2.389811] usbcore: registered new interface driver cdc_ether
[    2.389843] usbcore: registered new interface driver net1080
[    2.389873] usbcore: registered new interface driver cdc_subset
[    2.389902] usbcore: registered new interface driver zaurus
[    2.389946] usbcore: registered new interface driver cdc_ncm
[    2.390718] usbcore: registered new interface driver uas
[    2.390760] usbcore: registered new interface driver usb-storage
[    2.391570] rtc_zynqmp ffa60000.rtc: registered as rtc0
[    2.391597] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01T00:01:35 UTC (95)
[    2.391671] i2c_dev: i2c /dev entries driver
[    2.393449] usbcore: registered new interface driver uvcvideo
[    2.393897] Bluetooth: HCI UART driver ver 2.3
[    2.393910] Bluetooth: HCI UART protocol H4 registered
[    2.393920] Bluetooth: HCI UART protocol BCSP registered
[    2.393946] Bluetooth: HCI UART protocol LL registered
[    2.393956] Bluetooth: HCI UART protocol ATH3K registered
[    2.393978] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.394024] Bluetooth: HCI UART protocol Intel registered
[    2.394047] Bluetooth: HCI UART protocol QCA registered
[    2.394081] usbcore: registered new interface driver bcm203x
[    2.394113] usbcore: registered new interface driver bpa10x
[    2.394148] usbcore: registered new interface driver bfusb
[    2.394182] usbcore: registered new interface driver btusb
[    2.394230] usbcore: registered new interface driver ath3k
[    2.394327] EDAC MC: ECC not enabled
[    2.394482] EDAC DEVICE0: Giving out device to module edac controller cache_err: DEV edac (POLLED)
[    2.394659] EDAC DEVICE1: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    2.395155] sdhci: Secure Digital Host Controller Interface driver
[    2.395166] sdhci: Copyright(c) Pierre Ossman
[    2.395174] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.395478] ledtrig-cpu: registered to indicate activity on CPUs
[    2.395609] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    2.395695] zynqmp_firmware_probe Platform Management API v1.1
[    2.395709] zynqmp_firmware_probe Trustzone version v1.0
[    2.423803] securefw securefw: securefw probed
[    2.423918] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: The zynqmp-aes driver shall be deprecated in 2022.2 and removed in 2023.1
[    2.424218] alg: No test for xilinx-zynqmp-aes (zynqmp-aes)
[    2.424252] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: AES Successfully Registered
[    2.424384] zynqmp-keccak-384 firmware:zynqmp-firmware:sha384: The zynqmp-sha-deprecated driver shall be deprecated in 2022.2 and removed in 2023.1 release
[    2.424485] alg: No test for xilinx-keccak-384 (zynqmp-keccak-384)
[    2.424684] alg: No test for xilinx-zynqmp-rsa (zynqmp-rsa)
[    2.424875] usbcore: registered new interface driver usbhid
[    2.424888] usbhid: USB HID core driver
[    2.428132] ARM CCI_400_r1 PMU driver probed
[    2.428821] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    2.429297] usbcore: registered new interface driver snd-usb-audio
[    2.430144] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    2.430734] Initializing XFRM netlink socket
[    2.430836] NET: Registered PF_INET6 protocol family
[    2.431471] Segment Routing with IPv6
[    2.431496] In-situ OAM (IOAM) with IPv6
[    2.431582] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.431985] NET: Registered PF_PACKET protocol family
[    2.432009] NET: Registered PF_KEY protocol family
[    2.432035] can: controller area network core
[    2.432083] NET: Registered PF_CAN protocol family
[    2.432093] can: raw protocol
[    2.432104] can: broadcast manager protocol
[    2.432117] can: netlink gateway - max_hops=1
[    2.432223] Bluetooth: RFCOMM TTY layer initialized
[    2.432241] Bluetooth: RFCOMM socket layer initialized
[    2.432269] Bluetooth: RFCOMM ver 1.11
[    2.432284] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.432294] Bluetooth: BNEP filters: protocol multicast
[    2.432306] Bluetooth: BNEP socket layer initialized
[    2.432316] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.432328] Bluetooth: HIDP socket layer initialized
[    2.432374] 8021q: 802.1Q VLAN Support v1.8
[    2.432498] 9pnet: Installing 9P2000 support
[    2.432535] Key type dns_resolver registered
[    2.432662] registered taskstats version 1
[    2.432672] Loading compiled-in X.509 certificates
[    2.434129] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
[    2.445110] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 59, base_baud = 6249999) is a xuartps
[    3.771781] printk: console [ttyPS0] enabled
[    3.776520] of-fpga-region fpga-full: FPGA Region probed
[    3.783825] xilinx-zynqmp-dma fd500000.dma-controller: ZynqMP DMA driver Probe success
[    3.791935] xilinx-zynqmp-dma fd510000.dma-controller: ZynqMP DMA driver Probe success
[    3.800059] xilinx-zynqmp-dma fd520000.dma-controller: ZynqMP DMA driver Probe success
[    3.808163] xilinx-zynqmp-dma fd530000.dma-controller: ZynqMP DMA driver Probe success
[    3.816279] xilinx-zynqmp-dma fd540000.dma-controller: ZynqMP DMA driver Probe success
[    3.824381] xilinx-zynqmp-dma fd550000.dma-controller: ZynqMP DMA driver Probe success
[    3.832483] xilinx-zynqmp-dma fd560000.dma-controller: ZynqMP DMA driver Probe success
[    3.840583] xilinx-zynqmp-dma fd570000.dma-controller: ZynqMP DMA driver Probe success
[    3.848752] xilinx-zynqmp-dma ffa80000.dma-controller: ZynqMP DMA driver Probe success
[    3.856862] xilinx-zynqmp-dma ffa90000.dma-controller: ZynqMP DMA driver Probe success
[    3.864963] xilinx-zynqmp-dma ffaa0000.dma-controller: ZynqMP DMA driver Probe success
[    3.873066] xilinx-zynqmp-dma ffab0000.dma-controller: ZynqMP DMA driver Probe success
[    3.881175] xilinx-zynqmp-dma ffac0000.dma-controller: ZynqMP DMA driver Probe success
[    3.889278] xilinx-zynqmp-dma ffad0000.dma-controller: ZynqMP DMA driver Probe success
[    3.897380] xilinx-zynqmp-dma ffae0000.dma-controller: ZynqMP DMA driver Probe success
[    3.905485] xilinx-zynqmp-dma ffaf0000.dma-controller: ZynqMP DMA driver Probe success
[    3.914163] zynqmp-qspi ff0f0000.spi: rx bus width not found
[    3.919829] zynqmp-qspi ff0f0000.spi: tx bus width not found
[    3.925586] spi_master spi0: cannot find modalias for /axi/spi@ff0f0000/flash@0
[    3.932906] spi_master spi0: Failed to create SPI device for /axi/spi@ff0f0000/flash@0
[    3.941184] macb ff0d0000.ethernet: Not enabling partial store and forward
[    3.951822] macb ff0d0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0d0000 irq 37 (de:ea:70:dd:ae:e5)
[    3.962026] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    3.968601] zynqmp_pll_disable() clock disable failed for apll_int, ret = -13
[    3.975837] xilinx-axipmon fd0b0000.perf-monitor: Probed Xilinx APM
[    3.982347] xilinx-axipmon fd490000.perf-monitor: Probed Xilinx APM
[    3.988861] xilinx-axipmon ffa10000.perf-monitor: Probed Xilinx APM
[    3.996835] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 39
[    4.004467] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer with timeout 60s
[    4.011930] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    4.024966] of_cfs_init
[    4.027486] of_cfs_init: OK
[    4.031639] ALSA device list:
[    4.034605]   No soundcards found.
[    4.055689] mmc0: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    4.063959] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    4.071462] Please append a correct "root=" boot option; here are the available partitions:
[    4.079819] 0100           65536 ram0 
[    4.079826]  (driver?)
[    4.085922] 0101           65536 ram1 
[    4.085927]  (driver?)
[    4.092018] 0102           65536 ram2 
[    4.092023]  (driver?)
[    4.098124] 0103           65536 ram3 
[    4.098129]  (driver?)
[    4.104221] 0104           65536 ram4 
[    4.104226]  (driver?)
[    4.110329] 0105           65536 ram5 
[    4.110333]  (driver?)
[    4.116426] 0106           65536 ram6 
[    4.116430]  (driver?)
[    4.122523] 0107           65536 ram7 
[    4.122528]  (driver?)
[    4.128621] 0108           65536 ram8 
[    4.128625]  (driver?)
[    4.134719] 0109           65536 ram9 
[    4.134723]  (driver?)
[    4.140816] 010a           65536 ram10 
[    4.140821]  (driver?)
[    4.147001] 010b           65536 ram11 
[    4.147006]  (driver?)
[    4.153191] 010c           65536 ram12 
[    4.153196]  (driver?)
[    4.159371] 010d           65536 ram13 
[    4.159376]  (driver?)
[    4.165559] 010e           65536 ram14 
[    4.165563]  (driver?)
[    4.171743] 010f           65536 ram15 
[    4.171747]  (driver?)
[    4.177942] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    4.186199] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.36-xilinx-v2022.2 #1
[    4.193504] Hardware name: xlnx,zynqmp (DT)
[    4.197678] Call trace:
[    4.200114]  dump_backtrace+0x0/0x190
[    4.203779]  show_stack+0x18/0x30
[    4.207085]  dump_stack_lvl+0x7c/0xa0
[    4.210739]  dump_stack+0x18/0x34
[    4.214046]  panic+0x14c/0x30c
[    4.217102]  mount_block_root+0x184/0x234
[    4.221112]  mount_root+0x204/0x240
[    4.224592]  prepare_namespace+0x130/0x170
[    4.228681]  kernel_init_freeable+0x26c/0x294
[    4.233030]  kernel_init+0x28/0x130
[    4.236510]  ret_from_fork+0x10/0x20
[    4.240080] SMP: stopping secondary CPUs
[    4.243998] Kernel Offset: disabled
[    4.247473] CPU features: 0x00002001,00000842
[    4.251822] Memory Limit: none
[    4.254873] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

  1. 2023年09月18日 09:48 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

MicroZed Chronicles: UIO をやってみる8

MicroZed Chronicles: UIO をやってみる7”の続き。

MicroZed Chronicles: UIO Part One - Introduction and Set Up”と”MicroZed Chronicles: UIO Part Two - Creating Software Applications”をやってみよう。なお、関連する MicroZed Chronicles のブログの”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”も参考にしている。

前回は、”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux” を参考に、前回作成した Vitis のアプリケーション・プロジェクトをデバッグ・モードで実行してみたが、エラーになって実行できなかった。今回は、root で Vitis を起動してやってみたが同様のエラーだった。次に、通常に Vitis を起動して、Remote Working Directory を /home/petalinux にしてみたところ、デバッグができて、ソフトウェアの動作がうまくいった。

エラーを検索したところ、”Vitis: TCF system debugger error: no such file or directory”が見つかった。
それによると root で Vitis を起動して、デバッグをするということだったので、やってみよう。

Vitis 2022.2 を落とした。
sudo su で root になって、環境を整備した。
source /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2022.2/settings64.sh

Vitis 2022.2 を起動した。
viitis &
zub1cg_uio_62_230917.png

Vitis 2022.2 が起動した。
zub1cg_uio_63_230917.png

Vitis 2022.2 の Explorer の zub1cg_gpio_system を右クリックし右クリックメニューから Debug As -> Debug Configurations... を選択した。
System Project Debug の下に SystemDebugger_zub1cg_gpio_system が表示された。

ZUBoard 1CG の電源を ON して、Petalinux 2022.2 を起動した。
ifconfig してみると、IP アドレスが変わっていた。

SystemDebugger_zub1cg_gpio_system の Linux TCF Agnet を変更された IP アドレス用に新規作成した。
zub1cg_uio_64_230917.png

Apply ボタンをクリックし、Debug ボタンをクリックして起動したが、やはり同様のエラーだった。
zub1cg_uio_65_230917.png

Vitis 2022.2 を落として、root から exit で抜けた。

もう一度、ユーザーで Vitis 2022.2 を起動して、設定を見ていこう。

Vivado 2022.2 で Tools メニューから Launch Vitis IDE を選択して、Vitis 2022.2 を起動した。
Vitis IDE Launcher ダイアログが表示された。
myproj ディレクトリの下の vitis_work ディレクトリを Workspace に指定して、Vitis を起動した。

Vitis 2022.2 の Explorer の zub1cg_gpio_system を右クリックし右クリックメニューから Debug As -> Debug Configurations... を選択した。
System Project Debug の下に SystemDebugger_zub1cg_gpio_system が表示された。

Remote Working Directory が /run/media/mmcblk0p1 になっていた。
ZUBoard 1CG の Petalinux 2022.2 の /run/media/mmcblk0p1 には、zub1cg_gpio.elf が無かった。これはアップロードされるはずだ。
Remote Working Directory に /home/petalinux を指定した。
zub1cg_uio_66_230917.png

これで、Apply ボタンをクリックし、Debug ボタンをクリックし、デバッグを起動したら、起動できた。
zub1cg_uio_67_230917.png

ZUBoard 1CG の Petalinux 2022.2 の /home/petalinux ディレクトリを見ると zub1cg_gpio.elf がアップロードされていた。
zub1cg_uio_68_230917.png

Resume ボタンをクリックし、ソフトウェアを走らせた。
最初に RGB LED の O4 が 10 回、赤点滅した。

SW3 のプッシュボタンを押すごとに、RGB LED の O4 が白に点灯しり、消えたりを繰り返した。
うまく動作した。。。
zub1cg_uio_69_230917.png
  1. 2023年09月17日 06:36 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

MicroZed Chronicles: UIO をやってみる7

MicroZed Chronicles: UIO をやってみる6”の続き。

MicroZed Chronicles: UIO Part One - Introduction and Set Up”と”MicroZed Chronicles: UIO Part Two - Creating Software Applications”をやってみよう。なお、関連する MicroZed Chronicles のブログの”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”も参考にしている。

前回は、”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux” を参考に Vitis プロジェクトを作成し、C ファイルを作成して、ビルドを行って成功した。今回は、”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux” を参考に、前回作成した Vitis のアプリケーション・プロジェクトをデバッグ・モードで実行してみたが、エラーになって実行できなかった。

Vitis 2022.2 の Explorer の zub1cg_gpio_system を右クリックし右クリックメニューから Debug As -> Debug Configurations... を選択した。
zub1cg_uio_54_230916.png

Debug Configurations ダイアログが開いた。
System Project Debug を右クリックし、右クリックメニューから New Configuration を選択した。
zub1cg_uio_55_230916.png

System Project Debug の下に SystemDebugger_zub1cg_gpio_system が生成された。
zub1cg_uio_56_230916.png

Linux TCF Agent の New ボタンをクリックして、新しい TCF Agent のエントリを作成する。
Target Connection Details ダイアログが表示された。
Host には ZUBoard 1CG の Petalinux の IP アドレスを入力した。
zub1cg_uio_57_230916.png

Test Connection ボタンをクリックした。
connection successful! ダイアログが表示された。
zub1cg_uio_58_230916.png

OK ボタンをクリックして、Target Connection Details ダイアログを閉じた。
Debug Configurations ダイアログに戻った。
Apply ボタンをクリックし、Debug ボタンをクリックした。
zub1cg_uio_59_230916.png

Vitis がデバッグ・モードになったが、ZUBoard 1CG にディスコネクトで、No such file or directory でエラーになってしまった。
zub1cg_uio_60_230916.png

Vitis で Design ボタンをクリックして、元の状態に戻しておく。
zub1cg_uio_61_230916.png
  1. 2023年09月16日 05:07 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

MicroZed Chronicles: UIO をやってみる6

MicroZed Chronicles: UIO をやってみる5”の続き。

MicroZed Chronicles: UIO Part One - Introduction and Set Up”と”MicroZed Chronicles: UIO Part Two - Creating Software Applications”をやってみよう。なお、関連する MicroZed Chronicles のブログの”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”も参考にしている。

前回は、”MicroZed Chronicles: UIO Part One - Introduction and Set Up”に沿って、devmem コマンドを使用して、SW3 の PL ボタンを使用した割り込みと D4 の RGB LED の動作を確認した。今回は、”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux” を参考に Vitis プロジェクトを作成し、C ファイルを作成して、ビルドを行って成功した。

Vivado 2022.2 で Tools メニューから Launch Vitis IDE を選択して、Vitis 2022.2 を起動した。
Vitis IDE Launcher ダイアログが表示された。
myproj ディレクトリの下に、vitis_work ディレクトリを作成して、vitis_work ディレクトリを Workspace に指定した。
zub1cg_uio_43_230914.png

Vitis 2022.2 が表示された。
zub1cg_uio_44_230914.png

Create Application Project をクリックして、プラットフォーム・プロジェクトとアプリケーション・プロジェクトを作成する。
New Application Project ダイアログの Create a New Application Project 画面が表示された。
zub1cg_uio_45_230914.png

Platform 画面では、Create a new platform from hardware (XSA) タブをクリックして、選択した。
Brows... ボタンをクリックして、Vivado の myproj ディレクトリの top_level_wrapper.xsa を選択した。
Platform name を zub1cg_gpio_pf に変更した。
zub1cg_uio_46_230914.png

Application Project Details 画面が表示された。
Application project name は zub1cg_gpio と入力した。
Select target processor for the Application project は psu_coretexa53 SMP を選択した。
zub1cg_uio_47_230914.png

Domain 画面が表示された。
Application settings の Root FS には、ZUBoard1CG/at_2022_2/zub1cg_gpio/images/linux/rootfs.ext4 を指定した。
Application settings の Kernel Image には、ZUBoard1CG/at_2022_2/zub1cg_gpio/images/linux/Image を指定した。
zub1cg_uio_48_230914.png

Templates 画面では、Linux Empty Application を選択して、Finish ボタンをクリックした。
zub1cg_uio_49_230914.png

Explorer に zub1cg_gpio_pf プラットフォーム・プロジェクトと zub1cg_gpio_system アプリケーション・プロジェクトが生成された。
zub1cg_uio_50_230914.png

zub1cg_gpio_system -> zub1cg_gpio -> src ディレクトリを右クリックし右クリックメニューから New -> File を選択した。
Create New File ダイアログが開いた。
File name に zub1cg_gpio.c と入力して、Finish ボタンをクリックした。
zub1cg_uio_51_230914.png

MicroZed Chronicles: UIO Part Two - Creating Software Applications”の C ソースコードをコピー&ペーストした。
zub1cg_uio_52_230914.png

Explorer で zub1cg_gpio_system をクリックし、トンカチ・ボタンをクリックして、ビルドを行って、成功した。
zub1cg_uio_53_230914.png
  1. 2023年09月15日 04:45 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

MicroZed Chronicles: UIO をやってみる5

MicroZed Chronicles: UIO をやってみる4”の続き。

MicroZed Chronicles: UIO Part One - Introduction and Set Up”と”MicroZed Chronicles: UIO Part Two - Creating Software Applications”をやってみよう。なお、関連する MicroZed Chronicles のブログの”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”も参考にしている。

今回は、”MicroZed Chronicles: UIO Part One - Introduction and Set Up”に沿ってやっていく。

前回は、生成された BOOT.BIN, boot.scr, image.ub を FAT32 でフォーマットされた MicroSD カードに書いて、ZUBoard 1CG に挿入し電源ONした。Petalinux 2022.2 が立ち上がって、I2C と UIO を確認することができた。今回は、uio にマップされた物理アドレスを確認してから、gpio_0 の GPIO の接続されている PL ボタンの割り込みを確認した。更に、gpio_0 の GPIO2 に接続された D4 の RGB LED の動作を確認した。

最初に /sys/class/uio/uio4/maps/map0/addr と /sys/class/uio/uio5/maps/map0/addr を確認した。
cat /sys/class/uio/uio4/maps/map0/addr
cat /sys/class/uio/uio5/maps/map0/addr

/sys/class/uio/uio4/maps/map0/addr は
0x00000000a0030000
だった。
/sys/class/uio/uio5/maps/map0/addr は
0x00000000a0040000
だった。
zub1cg_uio_37_230913.png

次に、gpio_0 の GPIO の接続されている PL ボタンを押したときの割り込みを確認する。
cat /proc/interrupts を実行した。
zub1cg_uio_38_230913.png

gpio_0 の割り込みを設定して、PL ボタンを押すと、割り込みが入ることを確認する。
gpio_0 の割り込みを設定する。
sudo devmem 0xa003011c 32 0x80000000
sudo devmem 0xa0030128 32 0x3


SW3 の PL ボタンをクリックしてから、cat /proc/interrupts を実行した。
63 の gpio の CPU0 が 1 になっているのが分かる。
zub1cg_uio_39_230913.png

gpio_0 の GPIO2 に接続された D4 の RGB LED の動作を確認する。
sudo devmem 0xa0030008 32 0x1 を実行すると D4 の RGB LED が青に点灯した。
zub1cg_uio_40_230913.jpg

sudo devmem 0xa0030008 32 0x2 を実行すると D4 の RGB LED が緑に点灯した。
zub1cg_uio_41_230913.jpg

sudo devmem 0xa0030008 32 0x4 を実行すると D4 の RGB LED が赤に点灯した。
zub1cg_uio_42_230913.jpg
  1. 2023年09月13日 05:29 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

MicroZed Chronicles: UIO をやってみる4

MicroZed Chronicles: UIO Part One - Introduction and Set Up”と”MicroZed Chronicles: UIO Part Two - Creating Software Applications”をやってみよう。なお、関連する MicroZed Chronicles のブログの”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”も参考にしている。

前回は、Petalinux 2022.2 を使用して、プロジェクトを作成し、設定を行ってからビルドをして成功した。BOOT.BIN を作成した。今回は、生成された BOOT.BIN, boot.scr, image.ub を FAT32 でフォーマットされた MicroSD カードに書いて、ZUBoard 1CG に挿入し電源ONした。Petalinux 2022.2 が立ち上がって、I2C と UIO を確認することができた。

ZUBoard1CG/at_2022_2/zub1cg_gpio/images/linux ディレクトリの BOOT.BIN, boot.scr, image.ub を FAT32 でフォーマットされた MicroSD カードに書き込んだ。
zub1cg_uio_32_230909.png

Micro SD カードを ZUBoard 1CG に挿入し電源ONした。
Petalinux 2022.2 が起動した。
zub1cg_uio_33_230909.png

ユーザーは petalinux でパスワードは初回起動時に入力した。

/dev ディレクトリを見ると、i2c-0, i2c-1, i2c-2, i2c-3 が見えた。
zub1cg_uio_34_230909.png

uio0 〜 uio5 も見えた。
zub1cg_uio_35_230909.png

名前が gpio の UIO は UIO4 と UIO5 だった。
zub1cg_uio_36_230909.png

Petalinux 2022.2 起動時のログを貼っておく。

U-Boot 2022.01 (Sep 20 2022 - 06:35:33 +0000)

CPU:   ZynqMP
Silicon: v3
Board: Xilinx ZynqMP
DRAM:  1023 MiB
PMUFW:  v1.1
PMUFW no permission to change config object
EL Level:   EL2
Chip ID:    zu1eg
NAND:  0 MiB
MMC:   mmc@ff170000: 0
Loading Environment from FAT... *** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment

In:    serial
Out:   serial
Err:   serial
Bootmode: SD_MODE1
Reset reason:   EXTERNAL 
Net:   FEC: can't find phy-handle

ZYNQ GEM: ff0d0000, mdio bus ff0d0000, phyaddr 7, interface rgmii-id

Warning: ethernet@ff0d0000 (eth0) using random MAC address - f2:50:92:7f:8b:61
eth0: ethernet@ff0d0000
scanning bus for devices...
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
2777 bytes read in 21 ms (128.9 KiB/s)
## Executing script at 20000000
Trying to load boot images from mmc0
76451156 bytes read in 5364 ms (13.6 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf-system-top.dtb' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Created:      2022-10-03   7:50:07 UTC
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x100000fc
     Data Size:    9268952 Bytes = 8.8 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00200000
     Entry Point:  0x00200000
     Hash algo:    sha256
     Hash value:   7d6c966ad0a6c7e9c87f5a27e4d55973247cd9f53b532a086213ba4588e9dc3d
   Verifying Hash Integrity ... sha256+ OK
## Loading ramdisk from FIT Image at 10000000 ...
   Using 'conf-system-top.dtb' configuration
   Trying 'ramdisk-1' ramdisk subimage
     Description:  petalinux-image-minimal
     Created:      2022-10-03   7:50:07 UTC
     Type:         RAMDisk Image
     Compression:  uncompressed
     Data Start:   0x108e0d90
     Data Size:    67140170 Bytes = 64 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    sha256
     Hash value:   a50e356ac26d1b3f1c66f2e102cf5bbb660e4c8f4c611cdd0b068e7f2d0c7e5b
   Verifying Hash Integrity ... sha256+ 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
     Created:      2022-10-03   7:50:07 UTC
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x108d70e4
     Data Size:    39897 Bytes = 39 KiB
     Architecture: AArch64
     Hash algo:    sha256
     Hash value:   2641e1fcdaec4ef539b9dd0f987f5ab3f5460ba26ba1f3a54fc0a24a619a8d69
   Verifying Hash Integrity ... sha256+ OK
   Booting using the fdt blob at 0x108d70e4
   Uncompressing Kernel Image
   Loading Ramdisk to 37bf3000, end 3bbfaa4a ... OK
   Loading Device Tree to 0000000037be6000, end 0000000037bf2bd8 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.36-xilinx-v2022.2 (oe-user@oe-host) (aarch64-xilinx-linux-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP Mon Oct 3 07:50:07 UTC 2022
[    0.000000] Machine model: xlnx,zynqmp
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000000000000-0x000000003fefffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003fefffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fefffff]
[    0.000000] On node 0, zone DMA32: 256 pages in unavailable ranges
[    0.000000] cma: Reserved 256 MiB at 0x0000000027800000
[    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] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 18 pages/cpu s34776 r8192 d30760 u73728
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 257796
[    0.000000] Kernel command line: uio_pdrv_genirq.of_id=generic-uio
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 677808K/1047552K available (13888K kernel code, 990K rwdata, 3916K rodata, 2176K init, 573K bss, 107600K reserved, 262144K cma-reserved)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=2.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x474/0x6d8 with crng_init=0
[    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.000000] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.000365] Console: colour dummy device 80x25
[    0.000604] printk: console [tty0] enabled
[    0.000641] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.000663] pid_max: default: 32768 minimum: 301
[    0.000930] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000952] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.002340] rcu: Hierarchical SRCU implementation.
[    0.002590] EFI services will not be available.
[    0.002703] smp: Bringing up secondary CPUs ...
[    0.003146] Detected VIPT I-cache on CPU1
[    0.003202] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.003291] smp: Brought up 1 node, 2 CPUs
[    0.003314] SMP: Total of 2 processors activated.
[    0.003324] CPU features: detected: 32-bit EL0 Support
[    0.003335] CPU features: detected: CRC32 instructions
[    0.003384] CPU: All CPU(s) started at EL2
[    0.003404] alternatives: patching kernel code
[    0.004407] devtmpfs: initialized
[    0.008852] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.008879] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.018613] pinctrl core: initialized pinctrl subsystem
[    0.019268] DMI not present or invalid.
[    0.019576] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.020831] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.020910] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.020972] audit: initializing netlink subsys (disabled)
[    0.021079] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.021490] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.021541] ASID allocator initialised with 65536 entries
[    0.021671] Serial: AMBA PL011 UART driver
[    0.039877] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.039910] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.039922] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.039933] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    1.109734] cryptd: max_cpu_qlen set to 1000
[    1.135016] DRBG: Continuing without Jitter RNG
[    1.237093] raid6: neonx8   gen()  2139 MB/s
[    1.305147] raid6: neonx8   xor()  1584 MB/s
[    1.373217] raid6: neonx4   gen()  2182 MB/s
[    1.441272] raid6: neonx4   xor()  1552 MB/s
[    1.509337] raid6: neonx2   gen()  2063 MB/s
[    1.577394] raid6: neonx2   xor()  1426 MB/s
[    1.645471] raid6: neonx1   gen()  1762 MB/s
[    1.713518] raid6: neonx1   xor()  1212 MB/s
[    1.781590] raid6: int64x8  gen()  1365 MB/s
[    1.849645] raid6: int64x8  xor()   773 MB/s
[    1.917708] raid6: int64x4  gen()  1600 MB/s
[    1.985772] raid6: int64x4  xor()   852 MB/s
[    2.053836] raid6: int64x2  gen()  1396 MB/s
[    2.121907] raid6: int64x2  xor()   749 MB/s
[    2.189975] raid6: int64x1  gen()  1033 MB/s
[    2.258030] raid6: int64x1  xor()   517 MB/s
[    2.258040] raid6: using algorithm neonx4 gen() 2182 MB/s
[    2.258050] raid6: .... xor() 1552 MB/s, rmw enabled
[    2.258059] raid6: using neon recovery algorithm
[    2.258683] iommu: Default domain type: Translated 
[    2.258695] iommu: DMA domain TLB invalidation policy: strict mode 
[    2.258973] SCSI subsystem initialized
[    2.259159] usbcore: registered new interface driver usbfs
[    2.259197] usbcore: registered new interface driver hub
[    2.259227] usbcore: registered new device driver usb
[    2.259314] mc: Linux media interface: v0.10
[    2.259340] videodev: Linux video capture interface: v2.00
[    2.259388] pps_core: LinuxPPS API ver. 1 registered
[    2.259398] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.259419] PTP clock support registered
[    2.259453] EDAC MC: Ver: 3.0.0
[    2.259805] zynqmp-ipi-mbox mailbox@ff990400: Registered ZynqMP IPI mbox with TX/RX channels.
[    2.260058] FPGA manager framework
[    2.260200] Advanced Linux Sound Architecture Driver Initialized.
[    2.260598] Bluetooth: Core ver 2.22
[    2.260628] NET: Registered PF_BLUETOOTH protocol family
[    2.260638] Bluetooth: HCI device and connection manager initialized
[    2.260654] Bluetooth: HCI socket layer initialized
[    2.260665] Bluetooth: L2CAP socket layer initialized
[    2.260682] Bluetooth: SCO socket layer initialized
[    2.261116] clocksource: Switched to clocksource arch_sys_counter
[    2.261287] VFS: Disk quotas dquot_6.6.0
[    2.261341] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    2.265944] NET: Registered PF_INET protocol family
[    2.266062] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    2.266722] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    2.266752] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    2.266819] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    2.266988] TCP: Hash tables configured (established 8192 bind 8192)
[    2.267089] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    2.267122] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    2.267226] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.267574] RPC: Registered named UNIX socket transport module.
[    2.267587] RPC: Registered udp transport module.
[    2.267596] RPC: Registered tcp transport module.
[    2.267604] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.267620] PCI: CLS 0 bytes, default 64
[    2.267787] Trying to unpack rootfs image as initramfs...
[    2.274021] armv8-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
[    2.274653] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    5.590297] Freeing initrd memory: 65564K
[    5.654837] Initialise system trusted keyrings
[    5.654985] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    5.655821] NFS: Registering the id_resolver key type
[    5.655846] Key type id_resolver registered
[    5.655855] Key type id_legacy registered
[    5.655880] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    5.655893] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    5.655921] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    5.691994] NET: Registered PF_ALG protocol family
[    5.692011] xor: measuring software checksum speed
[    5.696196]    8regs           :  2363 MB/sec
[    5.699735]    32regs          :  2799 MB/sec
[    5.704012]    arm64_neon      :  2308 MB/sec
[    5.704022] xor: using function: 32regs (2799 MB/sec)
[    5.704035] Key type asymmetric registered
[    5.704044] Asymmetric key parser 'x509' registered
[    5.704099] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    5.704114] io scheduler mq-deadline registered
[    5.704125] io scheduler kyber registered
[    5.733234] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    5.734565] Serial: AMBA driver
[    5.735415] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    5.740387] brd: module loaded
[    5.744008] loop: module loaded
[    5.745017] mtdoops: mtd device (mtddev=name/number) must be supplied
[    5.748166] tun: Universal TUN/TAP device driver, 1.6
[    5.748270] CAN device driver interface
[    5.748946] usbcore: registered new interface driver asix
[    5.749008] usbcore: registered new interface driver ax88179_178a
[    5.749039] usbcore: registered new interface driver cdc_ether
[    5.749068] usbcore: registered new interface driver net1080
[    5.749111] usbcore: registered new interface driver cdc_subset
[    5.749145] usbcore: registered new interface driver zaurus
[    5.749188] usbcore: registered new interface driver cdc_ncm
[    5.749959] usbcore: registered new interface driver uas
[    5.749999] usbcore: registered new interface driver usb-storage
[    5.750797] rtc_zynqmp ffa60000.rtc: registered as rtc0
[    5.750823] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01T00:00:08 UTC (8)
[    5.750896] i2c_dev: i2c /dev entries driver
[    5.752656] usbcore: registered new interface driver uvcvideo
[    5.753119] Bluetooth: HCI UART driver ver 2.3
[    5.753132] Bluetooth: HCI UART protocol H4 registered
[    5.753142] Bluetooth: HCI UART protocol BCSP registered
[    5.753168] Bluetooth: HCI UART protocol LL registered
[    5.753178] Bluetooth: HCI UART protocol ATH3K registered
[    5.753200] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    5.753243] Bluetooth: HCI UART protocol Intel registered
[    5.753268] Bluetooth: HCI UART protocol QCA registered
[    5.753304] usbcore: registered new interface driver bcm203x
[    5.753338] usbcore: registered new interface driver bpa10x
[    5.753371] usbcore: registered new interface driver bfusb
[    5.753406] usbcore: registered new interface driver btusb
[    5.753454] usbcore: registered new interface driver ath3k
[    5.753553] EDAC MC: ECC not enabled
[    5.753721] EDAC DEVICE0: Giving out device to module edac controller cache_err: DEV edac (POLLED)
[    5.753895] EDAC DEVICE1: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    5.754394] sdhci: Secure Digital Host Controller Interface driver
[    5.754405] sdhci: Copyright(c) Pierre Ossman
[    5.754413] sdhci-pltfm: SDHCI platform and OF driver helper
[    5.754731] ledtrig-cpu: registered to indicate activity on CPUs
[    5.754877] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    5.754960] zynqmp_firmware_probe Platform Management API v1.1
[    5.754975] zynqmp_firmware_probe Trustzone version v1.0
[    5.783176] securefw securefw: securefw probed
[    5.783291] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: The zynqmp-aes driver shall be deprecated in 2022.2 and removed in 2023.1
[    5.783585] alg: No test for xilinx-zynqmp-aes (zynqmp-aes)
[    5.783619] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: AES Successfully Registered
[    5.783747] zynqmp-keccak-384 firmware:zynqmp-firmware:sha384: The zynqmp-sha-deprecated driver shall be deprecated in 2022.2 and removed in 2023.1 release
[    5.783858] alg: No test for xilinx-keccak-384 (zynqmp-keccak-384)
[    5.784057] alg: No test for xilinx-zynqmp-rsa (zynqmp-rsa)
[    5.784249] usbcore: registered new interface driver usbhid
[    5.784262] usbhid: USB HID core driver
[    5.787497] ARM CCI_400_r1 PMU driver probed
[    5.788156] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    5.788607] usbcore: registered new interface driver snd-usb-audio
[    5.789488] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    5.790086] Initializing XFRM netlink socket
[    5.790185] NET: Registered PF_INET6 protocol family
[    5.790760] Segment Routing with IPv6
[    5.790783] In-situ OAM (IOAM) with IPv6
[    5.790870] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    5.791278] NET: Registered PF_PACKET protocol family
[    5.791301] NET: Registered PF_KEY protocol family
[    5.791328] can: controller area network core
[    5.791372] NET: Registered PF_CAN protocol family
[    5.791383] can: raw protocol
[    5.791393] can: broadcast manager protocol
[    5.791407] can: netlink gateway - max_hops=1
[    5.791512] Bluetooth: RFCOMM TTY layer initialized
[    5.791529] Bluetooth: RFCOMM socket layer initialized
[    5.791553] Bluetooth: RFCOMM ver 1.11
[    5.791568] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.791578] Bluetooth: BNEP filters: protocol multicast
[    5.791590] Bluetooth: BNEP socket layer initialized
[    5.791599] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    5.791612] Bluetooth: HIDP socket layer initialized
[    5.791652] 8021q: 802.1Q VLAN Support v1.8
[    5.791779] 9pnet: Installing 9P2000 support
[    5.791812] Key type dns_resolver registered
[    5.791940] registered taskstats version 1
[    5.791951] Loading compiled-in X.509 certificates
[    5.793417] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
[    5.804446] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 59, base_baud = 6249999) is a xuartps
[    7.140506] printk: console [ttyPS0] enabled
[    7.145256] of-fpga-region fpga-full: FPGA Region probed
[    7.152546] xilinx-zynqmp-dma fd500000.dma-controller: ZynqMP DMA driver Probe success
[    7.160658] xilinx-zynqmp-dma fd510000.dma-controller: ZynqMP DMA driver Probe success
[    7.168769] xilinx-zynqmp-dma fd520000.dma-controller: ZynqMP DMA driver Probe success
[    7.176866] xilinx-zynqmp-dma fd530000.dma-controller: ZynqMP DMA driver Probe success
[    7.184976] xilinx-zynqmp-dma fd540000.dma-controller: ZynqMP DMA driver Probe success
[    7.193079] xilinx-zynqmp-dma fd550000.dma-controller: ZynqMP DMA driver Probe success
[    7.201194] xilinx-zynqmp-dma fd560000.dma-controller: ZynqMP DMA driver Probe success
[    7.209298] xilinx-zynqmp-dma fd570000.dma-controller: ZynqMP DMA driver Probe success
[    7.217470] xilinx-zynqmp-dma ffa80000.dma-controller: ZynqMP DMA driver Probe success
[    7.225576] xilinx-zynqmp-dma ffa90000.dma-controller: ZynqMP DMA driver Probe success
[    7.233682] xilinx-zynqmp-dma ffaa0000.dma-controller: ZynqMP DMA driver Probe success
[    7.241787] xilinx-zynqmp-dma ffab0000.dma-controller: ZynqMP DMA driver Probe success
[    7.249886] xilinx-zynqmp-dma ffac0000.dma-controller: ZynqMP DMA driver Probe success
[    7.257989] xilinx-zynqmp-dma ffad0000.dma-controller: ZynqMP DMA driver Probe success
[    7.266114] xilinx-zynqmp-dma ffae0000.dma-controller: ZynqMP DMA driver Probe success
[    7.274212] xilinx-zynqmp-dma ffaf0000.dma-controller: ZynqMP DMA driver Probe success
[    7.282925] zynqmp-qspi ff0f0000.spi: rx bus width not found
[    7.288595] zynqmp-qspi ff0f0000.spi: tx bus width not found
[    7.294348] spi_master spi0: cannot find modalias for /axi/spi@ff0f0000/flash@0
[    7.301679] spi_master spi0: Failed to create SPI device for /axi/spi@ff0f0000/flash@0
[    7.309941] macb ff0d0000.ethernet: Not enabling partial store and forward
[    7.322918] macb ff0d0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0d0000 irq 37 (f2:50:92:7f:8b:61)
[    7.333310] zynqmp_pll_disable() clock disable failed for apll_int, ret = -13
[    7.340586] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    7.347209] xilinx-axipmon fd0b0000.perf-monitor: Probed Xilinx APM
[    7.353722] xilinx-axipmon fd490000.perf-monitor: Probed Xilinx APM
[    7.360230] xilinx-axipmon ffa10000.perf-monitor: Probed Xilinx APM
[    7.369035] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 39
[    7.376684] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer with timeout 60s
[    7.384155] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    7.395635] of_cfs_init
[    7.398148] of_cfs_init: OK
[    7.402236] ALSA device list:
[    7.405204]   No soundcards found.
[    7.426515] mmc0: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    7.435305] Freeing unused kernel memory: 2176K
[    7.439917] Run /init as init process
[    7.455775] systemd[1]: System time before build time, advancing clock.
[    7.466569] systemd[1]: systemd 249.7+ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid)
[    7.496856] systemd[1]: Detected architecture arm64.

Welcome to PetaLinux 2022.2_update1_04022314 (honister)!

[    7.533284] systemd[1]: Hostname set to <zub1cggpio>.
[    7.535665] mmc0: new ultra high speed SDR104 SDHC card at address 0001
[    7.538514] random: systemd: uninitialized urandom read (16 bytes read)
[    7.551603] systemd[1]: Initializing machine ID from random generator.
[    7.552037] mmcblk0: mmc0:0001 SPCC  29.0 GiB (ro)
[    7.564667]  mmcblk0: p1
[    7.617445] systemd-sysv-generator[219]: SysV service '/etc/init.d/watchdog-init' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    7.644419] systemd-sysv-generator[219]: SysV service '/etc/init.d/nfsserver' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    7.668468] systemd-sysv-generator[219]: SysV service '/etc/init.d/nfscommon' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    7.692827] systemd-sysv-generator[219]: SysV service '/etc/init.d/inetd.busybox' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    7.718009] systemd-sysv-generator[219]: SysV service '/etc/init.d/dropbear' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[    7.939790] systemd[1]: Queued start job for default target Multi-User System.
[    7.948166] random: systemd: uninitialized urandom read (16 bytes read)
[    7.978716] systemd[1]: Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/getty.
[    8.001317] random: systemd: uninitialized urandom read (16 bytes read)
[    8.009493] systemd[1]: Created slice Slice /system/modprobe.
[  OK  ] Created slice Slice /system/modprobe.
[    8.034494] systemd[1]: Created slice Slice /system/serial-getty.
[  OK  ] Created slice Slice /system/serial-getty.
[    8.058301] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    8.081448] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[    8.105371] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[    8.129379] systemd[1]: Reached target Path Units.
[  OK  ] Reached target Path Units.
[    8.145224] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    8.165211] systemd[1]: Reached target Slice Units.
[  OK  ] Reached target Slice Units.
[    8.181227] systemd[1]: Reached target Swaps.
[  OK  ] Reached target Swaps.
[    8.197790] systemd[1]: Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[    8.221208] systemd[1]: Reached target RPC Port Mapper.
[  OK  ] Reached target RPC Port Mapper.
[    8.241489] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[    8.257380] systemd[1]: Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[    8.281731] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[    8.301439] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[    8.325521] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    8.341652] systemd[1]: Listening on Network Service Netlink Socket.
[  OK  ] Listening on Network Service Netlink Socket.
[    8.365506] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[    8.385410] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    8.405429] systemd[1]: Listening on User Database Manager Socket.
[  OK  ] Listening on User Database Manager Socket.
[    8.432244] systemd[1]: Mounting Huge Pages File System...
         Mounting Huge Pages File System...
[    8.452469] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[    8.476501] systemd[1]: Mounting Kernel Debug File System...
         Mounting Kernel Debug File System...
[    8.493635] systemd[1]: Condition check resulted in Kernel Trace File System being skipped.
[    8.505516] systemd[1]: Mounting Temporary Directory /tmp...
         Mounting Temporary Directory /tmp...
[    8.521566] systemd[1]: Condition check resulted in Create List of Static Device Nodes being skipped.
[    8.534580] systemd[1]: Starting Load Kernel Module configfs...
         Starting Load Kernel Module configfs...
[    8.557349] systemd[1]: Starting Load Kernel Module drm...
         Starting Load Kernel Module drm...
[    8.576821] systemd[1]: Starting Load Kernel Module fuse...
         Starting Load Kernel Module fuse...
[    8.596932] systemd[1]: Starting RPC Bind...
         Starting RPC Bind...
[    8.613397] systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
[    8.623257] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.
[    8.634249] systemd[1]: Mounting NFSD configuration filesystem...
         Mounting NFSD configuration filesystem...
[    8.652836] systemd[1]: Starting Remount Root and Kernel File Systems...
         Starting Remount Root and Kernel File Systems...
[    8.681043] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...
[    8.700899] systemd[1]: Starting Coldplug All udev Devices...
         Starting Coldplug All udev Devices...
[    8.722406] systemd[1]: Started RPC Bind.
[  OK  ] Started RPC Bind.
[    8.737914] systemd[1]: Mounted Huge Pages File System.
[  OK  ] Mounted Huge Pages File System.
[    8.761914] systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
[    8.790051] systemd[1]: Mounted Kernel Debug File System.
[  OK  ] Mounted Kernel Debug File System.
[    8.813958] systemd[1]: Mounted Temporary Directory /tmp.
[  OK  ] Mounted Temporary Directory /tmp.
[    8.838683] systemd[1]: modprobe@configfs.service: Deactivated successfully.
[    8.847207] systemd[1]: Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module configfs.
[    8.870022] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    8.877835] systemd[1]: Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module drm.
[    8.897990] systemd[1]: modprobe@fuse.service: Deactivated successfully.
[    8.905969] systemd[1]: Finished Load Kernel Module fuse.
[  OK  ] Finished Load Kernel Module fuse.
[    8.933543] systemd[1]: proc-fs-nfsd.mount: Mount process exited, code=exited, status=32/n/a
[    8.942030] systemd[1]: proc-fs-nfsd.mount: Failed with result 'exit-code'.
[    8.950368] systemd[1]: Failed to mount NFSD configuration filesystem.
[FAILED] Failed to mount NFSD configuration filesystem.
See 'systemctl status proc-fs-nfsd.mount' for details.
[    8.989156] systemd[1]: Dependency failed for NFS Mount Daemon.
[DEPEND] Dependency failed for NFS Mount Daemon.
[    9.009160] systemd[1]: Dependency failed for NFS server and services.
[DEPEND] Dependency failed for NFS server and services.
[    9.033158] systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
[    9.042769] systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
[    9.054068] systemd[1]: Finished Remount Root and Kernel File Systems.
[  OK  ] Finished Remount Root and Kernel File Systems.
[    9.078808] systemd[1]: Finished Apply Kernel Variables.
[  OK  ] Finished Apply Kernel Variables.
[    9.104687] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[    9.116717] systemd[1]: Mounting Kernel Configuration File System...
         Mounting Kernel Configuration File System...
[    9.130110] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
[    9.139643] systemd[1]: Condition check resulted in Platform Persistent Storage Archival being skipped.
[    9.152981] systemd[1]: Starting Create System Users...
         Starting Create System Users...
[    9.173816] systemd[1]: Mounted Kernel Configuration File System.
[  OK  ] Mounted Kernel Configuration File System.
[    9.203748] systemd[1]: Finished Create System Users.
[  OK  ] Finished Create System Users.
[    9.225667] systemd[1]: Starting Create Static Device Nodes in /dev...
         Starting Create Static Device Nodes in /dev...
[    9.255962] systemd[1]: Finished Create Static Device Nodes in /dev.
[  OK  ] Finished Create Static Device Nodes in /dev.
[    9.277767] systemd[1]: Reached target Preparation for Local File Systems.
[  OK  ] Reached target Preparation for Local File Systems.
[    9.304962] systemd[1]: Mounting /var/volatile...
         Mounting /var/volatile...
[    9.325923] systemd[1]: Started Entropy Daemon based on the HAVEGE algorithm.
[  OK  ] Started Entropy Daemon based on the HAVEGE algorithm.
[    9.354349] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[    9.381158] systemd[1]: (This warning is only shown for the first unit using IP firewalling.)
[    9.405820] systemd[1]: Starting Journal Service...
         Starting Journal Service...
[    9.426602] systemd[1]: Starting Rule-based Manager for Device Events and Files...
         Starting Rule-based Manage…for Device Events and Files...
[    9.467936] systemd[1]: Mounted /var/volatile.
[  OK  ] Mounted /var/volatile.
[    9.491800] systemd[1]: Finished Coldplug All udev Devices.
[  OK  ] Finished Coldplug All udev Devices.
[    9.525911] systemd[1]: Condition check resulted in Bind mount volatile /var/cache being skipped.
[    9.541283] systemd[1]: Condition check resulted in Bind mount volatile /var/lib being skipped.
[    9.581689] systemd[1]: Starting Load/Save Random Seed...
         Starting Load/Save Random Seed...
[    9.605404] systemd[1]: Condition check resulted in Bind mount volatile /var/spool being skipped.
[    9.621320] systemd[1]: Condition check resulted in Bind mount volatile /srv being skipped.
[    9.637451] systemd[1]: Reached target Local File Systems.
[  OK  ] Reached target Local File Systems.
[    9.682143] systemd[1]: Starting Rebuild Dynamic Linker Cache...
         Starting Rebuild Dynamic Linker Cache...
[    9.718645] systemd[1]: Started Journal Service.
[  OK  ] Started Journal Service.
[  OK  ] Started Rule-based Manager for Device Events and Files.
         Starting Flush Journal to Persistent Storage...
         Starting Network Configuration...
[  OK  ] Finished Rebuild Dynamic Linker Cache.
[    9.843847] systemd-journald[248]: Received client request to flush runtime journal.
[  OK  ] Finished Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Finished Create Volatile Files and Directories.
         Starting Rebuild Journal Catalog...
         Starting Network Time Synchronization...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Reached target Hardware activated USB gadget.
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
[  OK  ] Finished Rebuild Journal Catalog.
         Starting Update is Completed...
[   10.639039] random: fast init done
[  OK  ] Finished Update is Completed.
[  OK  ] Started Network Configuration.
         Starting Network Name Resolution...
[   11.231829] macb ff0d0000.ethernet eth0: PHY [ff0d0000.ethernet-ffffffff:07] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[   11.243361] macb ff0d0000.ethernet eth0: configuring for phy/rgmii-id link mode
[   11.307866] pps pps0: new PPS source ptp0
[   11.325404] macb ff0d0000.ethernet: gem-ptp-timer ptp clock registered.
[  OK  ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
[  OK  ] Created slice Slice /system/systemd-fsck.
[  OK  ] Found device /dev/mmcblk0p1.
         Starting File System Check on /dev/mmcblk0p1...
[  OK  ] Finished File System Check on /dev/mmcblk0p1.
         Mounting /run/media/mmcblk0p1...
[  OK  ] Mounted /run/media/mmcblk0p1.
[  OK  ] Started Network Time Synchronization[   12.377153] random: crng init done
.
[   12.383122] random: 7 urandom warning(s) missed due to ratelimiting
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Network.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target System Time Set.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on dropbear.socket.
[  OK  ] Reached target Socket Units.
[  OK  ] Reached target Basic System.
[  OK  ] Started Kernel Logging Service.
[  OK  ] Started System Logging Service.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started NFS status monitor for NFSv2/3 locking..
         Starting LSB: NFS support for both client and server...
         Starting User Login Management...
         Starting Permit User Sessions...
         Starting Target Communication Framework agent...
[  OK  ] Started LSB: NFS support for both client and server.
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Target Communication Framework agent.
[  OK  ] Started Getty on tty1.
         Starting inetd.busybox.service...
         Starting LSB: Kernel NFS server support...
[  OK  ] Started Serial Getty on ttyPS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started inetd.busybox.service.
[FAILED] Failed to start LSB: Kernel NFS server support.
See 'systemctl status nfsserver.service' for details.
[  OK  ] Started User Login Management.
[  OK  ] Reached target Multi-User System.
         Starting Record Runlevel Change in UTMP...
[  OK  ] Finished Record Runlevel Change in UTMP.
[   14.375381] macb ff0d0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   14.383106] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   14.441508] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   14.447086] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[   14.454941] xhci-hcd xhci-hcd.1.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x0000000002010090
[   14.464421] xhci-hcd xhci-hcd.1.auto: irq 68, io mem 0xfe300000
[   14.470634] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[   14.478911] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   14.486225] usb usb1: Product: xHCI Host Controller
[   14.491106] usb usb1: Manufacturer: Linux 5.15.36-xilinx-v2022.2 xhci-hcd
[   14.497892] usb usb1: SerialNumber: xhci-hcd.1.auto
[   14.503429] hub 1-0:1.0: USB hub found
[   14.507220] hub 1-0:1.0: 1 port detected
[   14.511456] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   14.516987] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[   14.524698] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[   14.531397] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   14.539725] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[   14.548002] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   14.555231] usb usb2: Product: xHCI Host Controller
[   14.560110] usb usb2: Manufacturer: Linux 5.15.36-xilinx-v2022.2 xhci-hcd
[   14.566903] usb usb2: SerialNumber: xhci-hcd.1.auto
[   14.572379] hub 2-0:1.0: USB hub found
[   14.576193] hub 2-0:1.0: 1 port detected

PetaLinux 2022.2_update1_04022314 zub1cggpio ttyPS0

zub1cggpio login: [   19.493290] macb ff0d0000.ethernet eth0: Link is Down
[   33.830416] macb ff0d0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off

  1. 2023年09月10日 03:52 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

MicroZed Chronicles: UIO をやってみる3

MicroZed Chronicles: UIO Part One - Introduction and Set Up”と”MicroZed Chronicles: UIO Part Two - Creating Software Applications”をやってみよう。なお、関連する MicroZed Chronicles のブログの”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”も参考にしている。

前回は、出力ピンの成約が無い SPI を削除して、論理合成、インプリメンテーション、ビットストリームの生成を行ったところ成功した。ハードウェアをエクスポートして、XSA ファイルを生成した。今回は、Petalinux 2022.2 を使用して、プロジェクトを作成し、設定を行ってからビルドをして成功した。BOOT.BIN を作成した。

今回は、主に”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”を参照している。

Petalinux 2022.2 の zub1cg_gpio プロジェクトを作成した。
cd /media/masaaki/Ubuntu_Disk/ZUBoard1CG/at_2022_2/
petalinux-create -t project -n zub1cg_gpio --template zynqMP

zub1cg_uio_16_230908.png

zub1cg_gpio ディレクトリに行って、ハードウェアをインポートした。
petalinux-config --get-hw-description=/media/masaaki/Ubuntu_Disk/ZUBoard1CG/at_2022_2/myproj

設定画面が開いた。
デフォルトのまま、セーブして終了した。
zub1cg_uio_17_230908.png

zub1cg_uio_18_230908.png

ZUBoard1CG/at_2022_2/zub1cg_gpio/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi を書き換えた。
zub1cg_uio_19_230908.png

MZ508/petalinux/system-user.dtsi をコピー&ペーストした。
SPI のデバイス・ツリーは削除した。
zub1cg_uio_20_230908.png

/include/ "system-conf.dtsi"
/ {
    chosen {
        bootargs = "uio_pdrv_genirq.of_id=generic-uio";
    };
};
    &axi_iic_0 {
        clock-frequency = <100000>;
        status = "okay";
    };

    &axi_iic_1 {
        clock-frequency = <100000>;
        status = "okay";
    };

    &axi_iic_2 {
        clock-frequency = <100000>;
        status = "okay";

    };
    &axi_gpio_0 {
        compatible = "generic-uio";
    };
    &axi_gpio_1 {
        compatible = "generic-uio";
    };


カーネル設定を行った。
petalinux-config -c kernel

デフォルトのまま、セーブして終了した。
zub1cg_uio_21_230908.png

zub1cg_uio_22_230908.png

rootfs を設定した。
petalinux-config -c rootfs

Filesystem Packages -> base -> dnf の dnf に * を付けた。
zub1cg_uio_23_230908.png

Filesystem Packages -> base -> i2c-tools のすべての項目に * を付けた。
zub1cg_uio_24_230908.png

セーブして終了した。
zub1cg_uio_25_230908.png

ビルドを行って成功した。
petalinux-build
zub1cg_uio_26_230908.png

images/linux ディレクトリにファイルが生成されていた。
zub1cg_uio_27_230908.png

BOOT.BIN を作成した。
cd images/linux
petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit --force

zub1cg_uio_28_230908.png

images/linux/BOOT.BIN が生成された。
zub1cg_uio_29_230908.png
  1. 2023年09月09日 04:00 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

MicroZed Chronicles: UIO をやってみる2

MicroZed Chronicles: UIO Part One - Introduction and Set Up”と”MicroZed Chronicles: UIO Part Two - Creating Software Applications”をやってみよう。なお、関連する MicroZed Chronicles のブログの”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”も参考にしている。

前回は、Vivado 2022.2 で ZUBoard 1CG 用の myproj プロジェクトを作成し、論理合成、インプリメンテーション、ビットストリームの生成を行った。しかし、ビットストリームの生成で、出力ピンの成約がないということで、エラーになった。今回は、出力ピンの成約が無い SPI を削除して、論理合成、インプリメンテーション、ビットストリームの生成を行ったところ成功した。ハードウェアをエクスポートして、XSA ファイルを生成した。

Vivado 2022.2 の top_level ブロック・デザインで、zynq_ultra_ps_e_0 をダブル・クリックして、設定を行った。
Re-customize IP ダイアログが開いた。
Page Navigator から I/O Configuration をクリックし、SPI 1 のチェックを外した。
zub1cg_uio_10_230907.png

SPI 1 のチェックを外したので、ポートが余った。
zub1cg_uio_11_230907.png

余ったポートを削除した。
zub1cg_uio_12_230907.png

これで論理合成、インプリメンテーション、ビットストリームの生成を行ったところ成功した。
Project Summary を示す。
zub1cg_uio_13_230907.png

Vivado 2022.2 の File メニューから Export -> Export Hardware... を選択して、XSA ファイルを生成した。
Export Hardware Platform ダイアログが開いた。
ほどんどデフォルトの状態で進めていくが、Output では、include bitstream のラジオ・ボタンをクリックした。
zub1cg_uio_14_230907.png

ZUBoard1CG/at_2022_2/myproj ディレクトリに top_level_wrapper.xsa が生成された。
zub1cg_uio_15_230907.png
  1. 2023年09月08日 04:52 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

MicroZed Chronicles: UIO をやってみる1

MicroZed Chronicles: UIO Part One - Introduction and Set Up”と”MicroZed Chronicles: UIO Part Two - Creating Software Applications”をやってみよう。なお、関連する MicroZed Chronicles のブログの”MicroZed Chronicles: IOCTL SPI, I2C and PetaLinux”も参考にしている。
今回は、Vivado 2022.2 で ZUBoard 1CG 用の myproj プロジェクトを作成した。

MicroZed Chronicles: UIO Part One - Introduction and Set Up”の Github サイトMZ508/vivado script/top_level.tcl をコピペして、top_level.tcl を作成した。
zub1cg_uio_1_230906.png

Vivado 2022.2 に ZUBoard 1CG のボード・ファイルをインストールしてなかったので、Vivado Store からインストールする。

Vivado 2022.2 を起動して、初期画面の Vivado Store をクリックした。
zub1cg_uio_2_230906.png

Vivado Store ダイアログが表示された。
Boards タブをクリックした。
Avnet の項目がないので、Refesh ボタンをクリックした。
zub1cg_uio_3_230906.png

Avnet -> Evaluation Boards -> ZUBoard 1CG Development Board を左クリックで選択し、右クリックし、右クリックメニューから install を選択した。
zub1cg_uio_4_230906.png

ZUBoard 1CG Development Board のボード・ファイルがインストールされた。
zub1cg_uio_5_230906.png

Vivado Store を閉じて、Tcl Console で top_level.tcl を実行した。
cd /media/masaaki/Ubuntu_Disk/ZUBoard1CG/at_2022_2/
source top_level.tcl

実行後、top_level ブロック・デザインが生成された。
zub1cg_uio_6_230906.png

top_level ブロック・デザインを示す。
zub1cg_uio_7_230906.png

Address Editor を示す。
zub1cg_uio_8_230906.png

Source ウインドウで、top_level_i を選択して、右クリックメニューから Create HDL Wrapper... を選択して、Verilog HDL の Wrapper ファイルを生成した。

Flow Navigator -> PROGRAM AND DEBUG -> Generate Bitstream をクリックし、論理合成、インプリメンテーション、ビットストリームの生成を行った。
write_bitstream でエラーが発生した。
zub1cg_uio_9_230906.png

エラーは EMIO にマップした SPI 用ポートの XDC 成約が無いというエラーだった。
次回、SPI は使用しないので、消してしまおう。
  1. 2023年09月07日 04:30 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する3

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する2”の続き。

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成するということで、前回は、color_converter_RGB24 プロジェクトで C シミュレーションを行った。今回は、C コードの合成を行って、C/RTL 協調シミュレーションをしたが、まだ終了していない。
その後、C/RTL 協調シミュレーションを一度終了して、もう一度やり直したら終了した。
Export RTL と Implementation を行った。

Vitis HLS 2023.1 で RGB の各色を n 倍する Vitis HLS 2023.1 プロジェクトの color_converter_RGB24 で C コードの合成を行った。
color_converter_RGB24_Pipline_LOOP_Y_LOOP_X の Iteration Latency は 2 クロックで、Interval は 1 クロックだった。やはり演算が少ないはずなので、レイテンシは少ないようだ。
zub1cg_pynq_244_230906.png
zub1cg_pynq_245_230906.png

C/RTL 協調シミュレーションを行ったが、まだ終了していない。
zub1cg_pynq_246_230906.png

様子を見てみよう。
終わらないので、一度中止して、もう一度、C/RTL 協調シミュレーションを行ったら終了した。
レイテンシも短く、問題無さそうだ。
zub1cg_pynq_247_230906.png

Export RTL を行った。

Implementation を行った。
zub1cg_pynq_248_230906.png

CP achieved post-implementation は 4.795 ns で問題無さそうだ。
  1. 2023年09月06日 05:02 |
  2. Vitis HLS
  3. | トラックバック:0
  4. | コメント:0

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する2

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する1”の続き。

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成するということで、前回は、ソースコードとテストベンチ・コードを貼って、Vitis HLS 2023.1 で ZUBoard 1CG 用の color_converter_RGB24 プロジェクトを作成した。今回は、その color_converter_RGB24 プロジェクトで C シミュレーションを行った。

C シミュレーションを行った。結果を示す。
zub1cg_pynq_235_230905.png

color_converter_RGB24/solution1/csim/build ディレクトリを示す。
test2.jpg が元の画像ファイルで、color_conv.jpg が色を変換した画像だ。現在は、RGB 各色共に 2 倍にしてある。
org.jpg が元画像と同様の画像を出力したファイルとなる。
zub1cg_pynq_236_230905.png

org.jpg を示す。
zub1cg_pynq_237_230905.jpg

color_conv.jpg を示す。
明るくなっている。
zub1cg_pynq_238_230905.jpg

次に、RGB 各色共に 0.5 倍にしてみよう。
テストベンチ・コード color_converter_RGB24_tb.cpp の 118 行目と 119 行目を以下のように書き換えた。

    color_converter_RGB24(ins, outs, COLOR_CONVwAxiDma, img.rows, img.cols, 0.5, 0.5, 0.5); // ハードウェアのメディアンフィルタ
    color_converter_RGB24_soft(ins_soft, outs_soft, COLOR_CONVwAxiDma, img.rows, img.cols, 0.5, 0.5, 0.5);  // ソフトウェアのメディアンフィルタ


これで、C シミュレーションを行って、成功した。
color_converter_RGB24/solution1/csim/build/color_conv.jpg を見ると暗い画像となった。
zub1cg_pynq_239_230905.jpg

次に RGB の 1色だけ明るくしたり、暗くしたりしてみよう。

R だけ 32 倍にして、GB は 1 倍にした。
テストベンチ・コード color_converter_RGB24_tb.cpp の 118 行目と 119 行目を以下のように書き換えた。

    color_converter_RGB24(ins, outs, COLOR_CONVwAxiDma, img.rows, img.cols, 32.0, 1.0, 1.0); // ハードウェアのメディアンフィルタ
    color_converter_RGB24_soft(ins_soft, outs_soft, COLOR_CONVwAxiDma, img.rows, img.cols, 32.0, 1.0, 1.0);  // ソフトウェアのメディアンフィルタ


これで、C シミュレーションを行って、成功した。
color_converter_RGB24/solution1/csim/build/color_conv.jpg を見ると赤い画像となった。
zub1cg_pynq_240_230905.jpg

R だけ 1/32 (0.03125) 倍にして、GB は 1 倍にした。
テストベンチ・コード color_converter_RGB24_tb.cpp の 118 行目と 119 行目を以下のように書き換えた。

    color_converter_RGB24(ins, outs, COLOR_CONVwAxiDma, img.rows, img.cols, 0.03125, 1.0, 1.0); // ハードウェアのメディアンフィルタ
    color_converter_RGB24_soft(ins_soft, outs_soft, COLOR_CONVwAxiDma, img.rows, img.cols, 0.03125 1.0, 1.0);  // ソフトウェアのメディアンフィルタ


これで、C シミュレーションを行って、成功した。
color_converter_RGB24/solution1/csim/build/color_conv.jpg を見ると赤が抜けた画像となった。
color_conv.jpg

G だけ 32 倍にして、RB は 1 倍にした。
テストベンチ・コード color_converter_RGB24_tb.cpp の 118 行目と 119 行目を以下のように書き換えた。

    color_converter_RGB24(ins, outs, COLOR_CONVwAxiDma, img.rows, img.cols, 1.0, 32.0, 1.0); // ハードウェアのメディアンフィルタ
    color_converter_RGB24_soft(ins_soft, outs_soft, COLOR_CONVwAxiDma, img.rows, img.cols, 1.0, 32.0, 1.0);  // ソフトウェアのメディアンフィルタ


これで、C シミュレーションを行って、成功した。
color_converter_RGB24/solution1/csim/build/color_conv.jpg を見ると緑が強調された画像だった。
zub1cg_pynq_242_230905.jpg

B だけ 32 倍にして、RG は 1 倍にした。
テストベンチ・コード color_converter_RGB24_tb.cpp の 118 行目と 119 行目を以下のように書き換えた。

    color_converter_RGB24(ins, outs, COLOR_CONVwAxiDma, img.rows, img.cols, 1.0, 1.0, 32.0); // ハードウェアのメディアンフィルタ
    color_converter_RGB24_soft(ins_soft, outs_soft, COLOR_CONVwAxiDma, img.rows, img.cols, 1.0, 1.0, 32.0);  // ソフトウェアのメディアンフィルタ


これで、C シミュレーションを行って、成功した。
color_converter_RGB24/solution1/csim/build/color_conv.jpg を見ると青が強調された画像だった。
zub1cg_pynq_243_230905.jpg
  1. 2023年09月05日 04:46 |
  2. Vitis HLS
  3. | トラックバック:0
  4. | コメント:0

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する1

Vitis HLS 2023.1 で RGB の各色を n 倍する color_converter_RGB24 IP を作成する。
掛ける倍率は任意制度固定小数点型の ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> を使用した。

ソースコードやテストベンチ・コードを貼っておく。
まずは、color_converterRGB24.h から貼っておく。

// color_converterRGB24.h
// 2023/09/03 by marsee
//

#ifndef __COLOR_CONVERTER_RGB24_H__
#define __COLOR_CONVERTER_RGB24_H__

#define ORG_IMGwAxiVdma 0
#define COLOR_CONVwAxiVdma 1
#define ORG_IMGwAxiDma 2
#define COLOR_CONVwAxiDma 3

#endif


ソースコードの color_converter_RGB24.cpp を貼っておく。

// color_converter_RGB24.cpp
// 2023/09/03 by marsee
//

#include <stdint.h>
#include <ap_int.h>
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#include <ap_fixed.h>

#include "color_converter_RGB24.h"

int color_conv(ap_uint<24> data, ap_uint<24> &val,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> red_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> green_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> blue_mag);
int separate_rgb(ap_uint<24> rgb, ap_uint<8> &r, ap_uint<8> &g, ap_uint<8> &b);

int color_converter_RGB24(hls::stream<ap_axiu<24,1,1,1> >& ins,
        hls::stream<ap_axiu<24,1,1,1> >& outs, int32_t function,
        int32_t row_size, int32_t col_size,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> red_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> green_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> blue_mag){
#pragma HLS INTERFACE mode=s_axilite port=blue_mag
#pragma HLS INTERFACE mode=s_axilite port=green_mag
#pragma HLS INTERFACE mode=s_axilite port=red_mag
#pragma HLS INTERFACE mode=s_axilite port=col_size
#pragma HLS INTERFACE mode=s_axilite port=row_size
#pragma HLS INTERFACE mode=s_axilite port=function
#pragma HLS INTERFACE mode=axis register_mode=both port=outs register
#pragma HLS INTERFACE mode=axis register_mode=both port=ins register
#pragma HLS INTERFACE mode=s_axilite port=return
    ap_axiu<24,1,1,1> pix;
    ap_axiu<24,1,1,1> colorc;
    ap_uint<24> val;

    LOOP_WAIT_USER : do {   // user が 1になった時にフレームがスタートする
#pragma HLS LOOP_TRIPCOUNT min=1 max=1 avg=1
        ins >> pix;
        if(function==ORG_IMGwAxiDma || function==COLOR_CONVwAxiDma)
            break;
    } while(pix.user == 0);

    LOOP_Y: for(int y=0; y<row_size; y++){
#pragma HLS LOOP_TRIPCOUNT avg=600 max=1080 min=48
        LOOP_X: for(int x=0; x<col_size; x++){
#pragma HLS LOOP_TRIPCOUNT avg=800 max=1920 min=64
#pragma HLS PIPELINE II=1
            if (!(x==0 && y==0))    // 最初の入力はすでに入力されている
                ins >> pix; // AXI4-Stream からの入力

            color_conv(pix.data, val, red_mag, green_mag, blue_mag);
            colorc.data = val;

            if(function==ORG_IMGwAxiVdma || function == COLOR_CONVwAxiVdma){
                if(x==0 && y==0) // 最初のピクセル
                    colorc.user = 1;
                else
                    colorc.user = 0;
                if(x == (col_size-1)) // 行の最後
                    colorc.last = 1;
                else
                    colorc.last = 0;
            }else{
                colorc.user = 0;
                colorc.last = pix.last;
            }
            colorc.keep = 0x7;
            colorc.strb = 0x7;
            if(function==COLOR_CONVwAxiVdma || function==COLOR_CONVwAxiDma)
                outs << colorc;
            else
                outs << pix;
        }
    }
    return(0);
}

// color_converter
// data の値に reg_mag を掛けて新しい赤の値とする。緑、青も同様
int color_conv(ap_uint<24> data, ap_uint<24> &val,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> red_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> green_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> blue_mag){
    ap_uint<8> r, g, b;
    ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> calc_r, calc_g, calc_b;
    ap_uint<8> rt, gt, bt;

    separate_rgb(data, r, g, b);
    calc_r = (ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT>)r * red_mag;
    calc_g = (ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT>)g * green_mag;
    calc_b = (ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT>)b * blue_mag;
    rt = calc_r;
    gt = calc_g;
    bt = calc_b;

    val = ((ap_uint<24>)rt << 16)+((ap_uint<24>)gt << 8)+(ap_uint<24>)bt;
    return(0);
}

// separate_rgb
// RGBを分離する
// RBGのフォーマットは、{R(8bits), G(8bits), B(8bits)}, 1pixel = 32bits
//
int separate_rgb(ap_uint<24> rgb, ap_uint<8> &r, ap_uint<8> &g, ap_uint<8> &b){
    b = (ap_uint<8>)(rgb & 0xff);
    g = (ap_uint<8>)((rgb>>8) & 0xff);
    r = (ap_uint<8>)((rgb>>16) & 0xff);
    return(0);
}


テストベンチ・コードの color_converter_RGB24_tb.cpp を貼っておく。

// color_converter_RGB24_tb.cpp
// 2023/09/04 by marsee
// COLORCwXilinxVideoStandard を define すると axi_vdma 用となり、コメントアウトすると axi_dma 用になる
//

#include <stdio.h>
#include <stdint.h>
#include <ap_int.h>
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#include "opencv2/opencv.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgcodecs/imgcodecs.hpp"

#include "color_converter_RGB24.h"

//#define COLORCwXilinxVideoStandard

constexpr int size = 3;

int color_converter_RGB24(hls::stream<ap_axiu<24,1,1,1> >& ins,
        hls::stream<ap_axiu<24,1,1,1> >& outs, int32_t function,
        int32_t row_size, int32_t col_size,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> red_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> green_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> blue_mag);
int color_converter_RGB24_soft(hls::stream<ap_axiu<24,1,1,1> >& ins,
        hls::stream<ap_axiu<24,1,1,1> >& outs, int32_t function,
        int32_t row_size, int32_t col_size,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> red_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> green_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> blue_mag);
int color_conv_soft(ap_uint<24> data, ap_uint<24> &val,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> red_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> green_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> blue_mag);
int separate_rgb_soft(ap_uint<24> rgb, ap_uint<8> &r, ap_uint<8> &g, ap_uint<8> &b);

const char INPUT_JPG_FILE[] = "test2.jpg";
const char OUTPUT_JPG_FILE[] = "color_conv.jpg";
const char ORG_OUT_JPG_FILE[] = "org.jpg";

int main(){
    hls::stream<ap_axiu<24,1,1,1> > ins, ins2;
    hls::stream<ap_axiu<24,1,1,1> > ins_soft;
    hls::stream<ap_axiu<24,1,1,1> > outs, outs2;
    hls::stream<ap_axiu<24,1,1,1> > outs_soft;
    ap_axiu<24,1,1,1> pix;
    ap_axiu<24,1,1,1> vals, vals_soft;

    // JPG ファイルをMat に読み込む
    cv::Mat img = cv::imread(INPUT_JPG_FILE);

    // ピクセルを入れる領域の確保
    std::vector<int32_t> rd_bmp(sizeof(int32_t)*img.cols*img.rows);
    std::vector<int32_t> hw_color_conv(sizeof(int32_t)*(img.cols)*(img.rows));
    std::vector<int32_t> sw_color_conv(sizeof(int32_t)*(img.cols)*(img.rows));

    // rd_bmp にJPGのピクセルを代入
    cv::Mat_<cv::Vec3b> dst_vec3b = cv::Mat_<cv::Vec3b>(img);
    for (int y=0; y<img.rows; y++){
        for (int x=0; x<img.cols; x++){
            cv::Vec3b pixel;
            pixel = dst_vec3b(y,x);
            rd_bmp[y*img.cols+x] = (pixel[0] & 0xff) | ((pixel[1] & 0xff)<<8) | ((pixel[2] & 0xff)<<16); // RGB 8 bits
            // blue - pixel[0]; green - pixel[1]; red - pixel[2];
        }
    }

#ifdef COLORCwXilinxVideoStandard
    // ins に入力データを用意する
    for(int i=0; i<5; i++){ // dummy data
        pix.user = 0;
        pix.data = i;
        pix.last = 0;
        pix.user = 0;
        pix.keep = 0x7;
        pix.strb = 0x7;
        ins << pix;
    }
#endif

    for(int j=0; j < img.rows; j++){
        for(int i=0; i < img.cols; i++){
            pix.data = (int32_t)rd_bmp[(j*img.cols)+i];
#ifdef COLORCwXilinxVideoStandard
            if (j==0 && i==0)   // 最初のデータの時に TUSER を 1 にする
                pix.user = 1;
            else
                pix.user = 0;

            if (i == img.cols-1) // 行の最後でTLASTをアサートする
                pix.last = 1;
            else
                pix.last = 0;
#else
            if(j==img.rows-1 && i==img.cols-1)
                pix.last = 1;
            else
                pix.last = 0;
            pix.user = 0;
#endif
            pix.keep = 0x7;
            pix.strb = 0x7;

            ins << pix;
            ins2 << pix;
            ins_soft << pix;
        }
    }

    // RGB の値を 2.0 倍にする
#ifdef COLORCwXilinxVideoStandard
    color_converter_RGB24(ins, outs, COLOR_CONVwAxiVdma, img.rows, img.cols, 2.0, 2.0, 2.0); // ハードウェアのメディアンフィルタ
    color_converter_RGB24_soft(ins_soft, outs_soft, COLOR_CONVwAxiVdma, img.rows, img.cols, 2.0, 2.0, 2.0);  // ソフトウェアのメディアンフィルタ
#else
    color_converter_RGB24(ins, outs, COLOR_CONVwAxiDma, img.rows, img.cols, 2.0, 2.0, 2.0); // ハードウェアのメディアンフィルタ
    color_converter_RGB24_soft(ins_soft, outs_soft, COLOR_CONVwAxiDma, img.rows, img.cols, 2.0, 2.0, 2.0);  // ソフトウェアのメディアンフィルタ
#endif

    // ハードウェアとソフトウェアのメディアンフィルタの値のチェック
    for (int y=0; y<img.rows; y++){ // 結果の画像サイズはx-2, y-2
        for (int x=0; x<img.cols; x++){
            outs >> vals;
            outs_soft >> vals_soft;
            ap_uint<32> val = vals.data;
            hw_color_conv[y*img.cols+x] = (int32_t)val;
            if (val != vals_soft.data){
                printf("ERROR HW and SW results mismatch x = %ld, y = %ld, HW = %x, SW = %x\n",
                        x, y, val, vals_soft.data);
                return(1);
            }
        }
    }
    printf("Success HW and SW results match\n");

    const int color_conv_row = img.rows;
    const int color_conv_cols = img.cols;
    cv::Mat wbmpf(color_conv_row, color_conv_cols, CV_8UC3);
    // wbmpf に色変換後の画像を入力
    cv::Mat_<cv::Vec3b> sob_vec3b = cv::Mat_<cv::Vec3b>(wbmpf);
    for (int y=0; y<wbmpf.rows; y++){
        for (int x=0; x<wbmpf.cols; x++){
            cv::Vec3b pixel;
            pixel = sob_vec3b(y,x);
            int32_t rbg = hw_color_conv[y*wbmpf.cols+x];
            pixel[0] = (rbg & 0xff); // blue
            pixel[1] = ((rbg >> 8) & 0xff); // green
            pixel[2] = ((rbg >> 16) & 0xff); // red
            sob_vec3b(y,x) = pixel;
        }
    }

    // ハードウェアのメディアンフィルタの結果を jpg ファイルへ出力する
    cv::imwrite(OUTPUT_JPG_FILE, wbmpf);

#ifdef COLORCwXilinxVideoStandard
    color_converter_RGB24(ins2, outs2, ORG_IMGwAxiVdma, img.rows, img.cols, 1.0, 1.0, 1.0); // ハードウェアのメディアンフィルタ
#else
    color_converter_RGB24(ins2, outs2, ORG_IMGwAxiDma, img.rows, img.cols, 1.0, 1.0, 1.0); // ハードウェアのメディアンフィルタ
#endif

    cv::Mat wbmpf2(color_conv_row, color_conv_cols, CV_8UC3);
    // wbmpf2 に元画像を入力
    sob_vec3b = cv::Mat_<cv::Vec3b>(wbmpf2);
    for (int y=0; y<wbmpf.rows; y++){
        for (int x=0; x<wbmpf.cols; x++){
            cv::Vec3b pixel;
            pixel = sob_vec3b(y,x);
            outs2 >> vals;
            int32_t val = vals.data;
            pixel[0] = (val & 0xff); // blue
            pixel[1] = ((val >> 8) & 0xff); // green
            pixel[2] = ((val >> 16) & 0xff); // red
            sob_vec3b(y,x) = pixel;
        }
    }

    // 元画像を jpg ファイルへ出力する
    cv::imwrite(ORG_OUT_JPG_FILE, wbmpf2);

    return(0);
}

int color_converter_RGB24_soft(hls::stream<ap_axiu<24,1,1,1> >& ins,
        hls::stream<ap_axiu<24,1,1,1> >& outs, int32_t function,
        int32_t row_size, int32_t col_size,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> red_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> green_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> blue_mag){
    ap_axiu<24,1,1,1> pix;
    ap_axiu<24,1,1,1> colorc;
    ap_uint<24> val;

    LOOP_WAIT_USER : do {   // user が 1になった時にフレームがスタートする
        ins >> pix;
        if(function==ORG_IMGwAxiDma || function==COLOR_CONVwAxiDma)
            break;
    } while(pix.user == 0);

    LOOP_Y: for(int y=0; y<row_size; y++){
        LOOP_X: for(int x=0; x<col_size; x++){
            if (!(x==0 && y==0))    // 最初の入力はすでに入力されている
                ins >> pix; // AXI4-Stream からの入力

            color_conv_soft(pix.data, val, red_mag, green_mag, blue_mag);
            colorc.data = val;

            if(function==ORG_IMGwAxiVdma || function == COLOR_CONVwAxiVdma){
                if(x==0 && y==0) // 最初のピクセル
                    colorc.user = 1;
                else
                    colorc.user = 0;
                if(x == (col_size-1)) // 行の最後
                    colorc.last = 1;
                else
                    colorc.last = 0;
            }else{
                colorc.user = 0;
                colorc.last = pix.last;
            }
            colorc.keep = 0x7;
            colorc.strb = 0x7;
            if(function==COLOR_CONVwAxiVdma || function==COLOR_CONVwAxiDma)
                outs << colorc;
            else
                outs << pix;
        }
    }
    return(0);
}

// color_converter
// data の値に reg_mag を掛けて新しい赤の値とする。緑、青も同様
int color_conv_soft(ap_uint<24> data, ap_uint<24> &val,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> red_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> green_mag,
        ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> blue_mag){
    ap_uint<8> r, g, b;
    ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT> calc_r, calc_g, calc_b;
    ap_uint<8> rt, gt, bt;

    separate_rgb_soft(data, r, g, b);
    calc_r = (ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT>)r * red_mag;
    calc_g = (ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT>)g * green_mag;
    calc_b = (ap_ufixed<16, 8, AP_TRN_ZERO, AP_SAT>)b * blue_mag;
    rt = calc_r;
    gt = calc_g;
    bt = calc_b;

    val = ((ap_uint<24>)rt << 16)+((ap_uint<24>)gt << 8)+(ap_uint<24>)bt;
    return(0);
}

// separate_rgb
// RGBを分離する
// RBGのフォーマットは、{R(8bits), G(8bits), B(8bits)}, 1pixel = 32bits
//
int separate_rgb_soft(ap_uint<24> rgb, ap_uint<8> &r, ap_uint<8> &g, ap_uint<8> &b){
    b = (ap_uint<8>)(rgb & 0xff);
    g = (ap_uint<8>)((rgb>>8) & 0xff);
    r = (ap_uint<8>)((rgb>>16) & 0xff);
    return(0);
}


Vitis HLS 2023.1 で color_converter_RGB24 プロジェクトを作成した。このプロジェクトは ZUBoard 1CG 用だ。
zub1cg_pynq_234_230904.png

今回のテストベンチ・コードでは OpenCV ライブラリを使用している。
Vitis HLS 2023.1 には内蔵された OpenCV は無いので、別にインストールした OpenCV を指定する。
Vitis HLS の Project メニューから Project Settings... を選択して、Project Settings ダイアログを開いた。
Simulation タブを開いて、sobel_axis_RGB24_tb.cpp の CFLAGS に

-I/usr/local/include

を設定した。
Linker Flags に

-L/usr/local/lib -lopencv_core -lopencv_imgcodecs -lopencv_imgproc

を設定した。

更に、 Synthesis をクリックして、 Top Function に color_converter_RGB24 を指定した。
  1. 2023年09月04日 04:53 |
  2. Vitis HLS
  3. | トラックバック:0
  4. | コメント:0

ZUBoard 1CG の PYNQ v3.0.1 で自作のガウシアン・フィルタ、メディアン・フィルタとソーベル・フィルタを動作させる4

ZUBoard 1CG の PYNQ v3.0.1 で自作のガウシアン・フィルタ、メディアン・フィルタとソーベル・フィルタを動作させる3”の続き。

前回は、生成されたビット・ファイルと hwh ファイルを ZUBoard 1CG 上の Jupyter Notebook にアップロードし、i3filters.ipynb ファイルを作成して、メディアン・フィルタとソーベル・フィルタの動作を確認したところ動作した。
しかし、”AXI4-Stream Data Width Converter のバイト・レーン変換を確認する4”で、3 バイト幅の AXI4-Stream インターフェースの色のフィールドが MSB から BGR であることがわかった。今までは RGB のつもりで各フィルタの IP を作成していた。今回は、色のフィールドの修正のため AXI4-Stream Subset Converter を 2 個、i3filters ブロック・デザインに追加して、バイト・レーンの変換を行った。その後、論理合成、インプリメンテーション、ビットストリームの生成を行って、ZUBoard 1CG の PYNQ Linux にアップロードして、動作を確認したところ問題なく動作した。

Vivado 2023.1 の i3fliters プロジェクトで、i3filters ブロック・デザインに AXI4-Stream Subset Converter を 2 個追加した。
XI4-Stream Subset Converter の設定は共通で、Slave Interface と Master Interface の TDATA width (bytes) を 3 に設定した。
TDATA Remap String を tdata[7:0], tdata[15:8], tdata[23:16] に設定した。つまり 1番めのバイト・レーンと 3 番めのバイト・レーンを入れ替えた。
zub1cg_pynq_228_230902.png

完成した i3filters ブロック・デザインを示す。
zub1cg_pynq_229_230902.png

Address Editor 画面を示す。
zub1cg_pynq_230_230902.png

論理合成、インプリメンテーション、ビットストリームの生成を行って成功した。
Project Summary を示す。
zub1cg_pynq_231_230902.png

ZUBoard 1CG の PYNQ LInux の ~/jupter_notebooks/example/i3filters ディレクトリの i3filters.bit と i3filters.hwh ファイルを Jupyter Notebook 画面から消去した。

以下のファイルを FileZilla を使って、ZUBoard 1CG の PYNQ Linux のホーム・ディレクトリにアップロードした。
HDL/2023.1/zub1cg/i3filters/i3filters.runs/impl_1/i3filters_wrapper.bit
HDL/2023.1/zub1cg/i3filters/i3filters.gen/sources_1/bd/i3filters/hw_handoff/i3filters.hwh

ファイルをホーム・ディレクトリから ~/jupyter_notebooks/examples/i3filters ディレクトリにコピーした。
cd
sudo mv i3filters.hwh jupyter_notebooks/examples/i3filters
mv i3filters_wrapper.bit jupyter_notebooks/examples/i3filters/i3filters.bit


現在の ~/jupyter_notebooks/examples/i3filters ディレクトリを示す。
zub1cg_pynq_232_230902.png

test2.jpg を Image.open() でオープンするように i3filters.ipynb を書き換えた。

image_path = "./test2.jpg"
#image_path = "./blue.bmp"
#image_path = "./green.bmp"
#image_path = "./red.bmp"
original_image = Image.open(image_path)


ガウシアン・フィルタはスルー、メディアン・フィルタとソーベル・フィルタは有効に設定した。

gaussian.register_map.row_size = height
gaussian.register_map.col_size = width
gaussian.register_map.function_r = 2 # ORG_IMGwAxiDma
#gaussian.register_map.function_r = 3 # GAUSSIANwAxiDma


median.register_map.row_size = height
median.register_map.col_size = width
#median.register_map.function_r = 2 # ORG_IMGwAxiDma
median.register_map.function_r = 3 # MEDIANwAxiDma


sobel.register_map.row_size = height
sobel.register_map.col_size = width
#sobel.register_map.function_r = 2 # ORG_IMGwAxiDma
sobel.register_map.function_r = 3 # SOBELwAxiDma


実行結果を示す。
zub1cg_pynq_233_230902.png

ZUBoard 1CG の PYNQ v3.0.1 で自作のメディアン・フィルタとソーベル・フィルタを動作させる3”の実行結果と比べてみたが、見た目には変わらないな。。。
zub1cg_pynq_171_230816.jpg
  1. 2023年09月02日 12:19 |
  2. ZUBoard
  3. | トラックバック:0
  4. | コメント:0

Vivado 2023.1 の Run Linter を試す

最近、Vivado 2023.1 の Flow Navigator に RTL ANALYSIS -> Run Linter 項目が増えているのに気が付いた。
これは、Vivado に lint 機能が追加されたのだろう?ということで試してみることにした。

Vivado Design Suite ユーザー ガイド: Vivado IDE の使用 (UG893) 2023.1 日本語”の Run Linter 機能の説明を引用する。

[Run Linter] は、2023.1 で追加された新しい機能で、RTL デザイン コードを解析し、違反の詳細レポートを提供します。[Run Linter] をクリックすると、Vivado で自動的に RTL ソース ファイルのチェックとコンパイルが実行され、Linter ウィンドウが開いて詳細なレポートが提供されます。


さて、現在使用している、Viavado 2023.1 の i3filters プロジェクトで RTL Linter を使ってみよう。

Flow Navigator で RTL ANALYSIS -> Run Linter をクリックする。
Vivado_linter_1_230831.png

Run Linter ダイアログが表示されて、lint を行っているようだ。
Vivado_linter_2_230831.png

Linter ウインドウが表示された。
Vivado_linter_3_230831.png

Linter ウインドウで、最初の ASSIGN-5 の NLW_xbar_m_axi_wstrb_UNCONNECTED を見てみよう。
メッセージでは、最初に接続されていないのは bit 4 だそうだ。
File Name の i3filters.v : 1168 をクリックした。
i3fitlers.v が表示され、NLW_xbar_m_axi_wstrb_UNCONNECTED が宣言されている 1168 行がハイライトされた。
Vivado_linter_4_230831.png

NLW_xbar_m_axi_wstrb_UNCONNECTED を検索してみると、もう一箇所のみ見つけることができた。
1509 行で NLW_xbar_m_axi_wstrb_UNCONNECTED[3:0] のみ使用されている。その他のビットは使用されていないようだ。
Vivado_linter_5_230831.png

Vivado 2023.1 の lint 機能を確かめることができた。
  1. 2023年09月01日 05:04 |
  2. Vivado
  3. | トラックバック:0
  4. | コメント:0