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

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

FPGAの部屋

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

Vitis アクセラレーション・プラットホームを使用して作ったハードウェアを KR260 の Ubuntu 22.04 で動作させる3

Vitis アクセラレーション・プラットホームを使用して作ったハードウェアを KR260 の Ubuntu 22.04 で動作させる2”の続き。

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる7”で動作させたハードウェアとソフトウェアを KR260 の Ubuntu 22.04 で動作させてみたいということで、前回は、ホスト・パソコンの ip_vadd2_file_transfer の内容を KR260 の Ubuntu 22.04 に転送した。ファイルを /lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリにコピーして、kr260_ip_vadd2 をロードしたが、interrupt-controller が uio として実装されなかった。今回は、もう一度、pl.dtsi の interrupt-controller@80000000 の項目を減らして、コンパイルして、KR260 の Petalinux 2022.1 に転送して、kr260_ip_vadd2 をロードしたところ、interrupt-controller が uio に追加された。

KR260/kr260_custom_platform/kr260_custom_platform/dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi の axi_intc_0 セクションを #interrupt-cells と conpatible と reg だけ残して、後はコメントアウトした。なお、 #interrupt-cells を残さないとコンパイル時にエラーになった。
KR260_431_230330.png

pl.dtsi を貼っておく。

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version: XSCT 2022.1
 * Today is: Sun Mar 19 19:55:06 2023
 */


/dts-v1/;
/plugin/;
/ {
    fragment@0 {
        target = <&fpga_full>;
        overlay0: __overlay__ {
            #address-cells = <2>;
            #size-cells = <2>;
            firmware-name = "kr260_custom.bit.bin";
            resets = <&zynqmp_reset 116>, <&zynqmp_reset 117>, <&zynqmp_reset 118>, <&zynqmp_reset 119>;
        };
    };
    fragment@1 {
        target = <&amba>;
        overlay1: __overlay__ {
            afi0: afi0 {
                compatible = "xlnx,afi-fpga";
                config-afi = < 0 0>, <1 0>, <2 0>, <3 0>, <4 0>, <5 0>, <6 0>, <7 0>, <8 0>, <9 0>, <10 0>, <11 0>, <12 0>, <13 0>, <14 0xa00>, <15 0x000>;
            };
            clocking0: clocking0 {
                #clock-cells = <0>;
                assigned-clock-rates = <99999001>;
                assigned-clocks = <&zynqmp_clk 71>;
                clock-output-names = "fabric_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,fclk";
            };
            clocking1: clocking1 {
                #clock-cells = <0>;
                assigned-clock-rates = <99999001>;
                assigned-clocks = <&zynqmp_clk 72>;
                clock-output-names = "fabric_clk";
                clocks = <&zynqmp_clk 72>;
                compatible = "xlnx,fclk";
            };
        };
    };
    fragment@2 {
        target = <&amba>;
        overlay2: __overlay__ {
            #address-cells = <2>;
            #size-cells = <2>;
            DMA_pow2_0: DMA_pow2@80070000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                clock-names = "ap_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80070000 0x0 0x10000>;
                xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;
            };
            PMOD_0: gpio@80010000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80010000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_1: gpio@80020000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80020000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_2: gpio@80030000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80030000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_3: gpio@80040000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80040000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            axi_dma_0: dma@80050000 {
                #dma-cells = <1>;
                clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
                clocks = <&zynqmp_clk 71>, <&zynqmp_clk 71>, <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80050000 0x0 0x10000>;
                xlnx,addrwidth = <0x20>;
                xlnx,sg-length-width = <0xe>;
                dma-channel@80050000 {
                    compatible = "xlnx,axi-dma-mm2s-channel";
                    dma-channels = <0x1>;
                    xlnx,datawidth = <0x20>;
                    xlnx,device-id = <0x0>;
                };
                dma-channel@80050030 {
                    compatible = "xlnx,axi-dma-s2mm-channel";
                    dma-channels = <0x1>;
                    xlnx,datawidth = <0x20>;
                    xlnx,device-id = <0x0>;
                };
            };
            axi_intc_0: interrupt-controller@80000000 {
                #interrupt-cells = <2>;
                /*clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>; */
                compatible = "generic-uio";
                /*interrupt-controller ;
                interrupt-names = "irq";
                interrupt-parent = <&gic>;
                interrupts = <0 89 4>; */
                reg = <0x0 0x80000000 0x0 0x10000>;
                /*xlnx,kind-of-intr = <0xfffffffd>;
                xlnx,num-intr-inputs = <0x20>; */
            };
            axi_timer_0: timer@80060000 {
                clock-frequency = <99999001>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80060000 0x0 0x10000>;
                xlnx,count-width = <0x20>;
                xlnx,gen0-assert = <0x1>;
                xlnx,gen1-assert = <0x1>;
                xlnx,one-timer-only = <0x0>;
                xlnx,trig0-assert = <0x1>;
                xlnx,trig1-assert = <0x1>;
            };
            krnl_vadd_1: krnl_vadd@b0000000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                /*clock-names = "ap_clk";
                clocks = <&misc_clk_0>; */
                compatible = "generic-uio";
                /*interrupt-names = "interrupt";
                interrupt-parent = <&axi_intc_0>;
                interrupts = <1 2>;*/
                reg = <0x0 0xb0000000 0x0 0x10000>;
                /*xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;*/
            };
            misc_clk_0: misc_clk_0 {
                #clock-cells = <0>;
                clock-frequency = <199998000>;
                compatible = "fixed-clock";
            };
            multi_axi4ls_0: multi_axi4ls@80080000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                clock-names = "ap_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80080000 0x0 0x10000>;
                xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;
            };
            zyxclmm_drm {
                compatible = "xlnx,zocl";
                interrupts-extended = <&axi_intc_0 0 4>, <&axi_intc_0 1 4>, <&axi_intc_0 2 4>, <&axi_intc_0 3 4>, <&axi_intc_0 4 4>, <&axi_intc_0 5 4>, <&axi_intc_0 6 4>, <&axi_intc_0 7 4>, <&axi_intc_0 8 4>, <&axi_intc_0 9 4>,
<&axi_intc_0 10 4>, <&axi_intc_0 11 4>, <&axi_intc_0 12 4>, <&axi_intc_0 13 4>, <&axi_intc_0 14 4>,
<&axi_intc_0 15 4>, <&axi_intc_0 16 4>, <&axi_intc_0 17 4>, <&axi_intc_0 18 4>, <&axi_intc_0 19 4>,
<&axi_intc_0 20 4>, <&axi_intc_0 21 4>, <&axi_intc_0 22 4>, <&axi_intc_0 23 4>, <&axi_intc_0 24 4>,
<&axi_intc_0 25 4>, <&axi_intc_0 26 4>, <&axi_intc_0 27 4>, <&axi_intc_0 28 4>, <&axi_intc_0 29 4>,
<&axi_intc_0 30 4>, <&axi_intc_0 31 4 >;
            };
        };
    };
};


変更した pl.dtsi をコンパイルして pl.dtbo を生成した。
dtc -@ -O dtb -o ./dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo ./dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi
KR260_432_230330.png

KR260_433_230330.png

pl.dtbo を ip_vadd2_file_transfer ディレクトリにコピーした。
ip_vadd2_file_transfer ディレクトリの pl.dtbo を FileZilla で KR260 の Petalinux の ~/kr260_ip_vadd2 に転送した。
KR260_434_230330.png

pl.dtbo を /lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリにコピーした。(binary_container_1.bin shell.json はすでにコピー済み)
sudo cp pl.dtbo /lib/firmware/xilinx//kr260_ip_vadd2

現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd2 をロードした。
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip_vadd2

KR260_435_230330.png

KR260 Petalinux の /sys/class/uio を見ると uio0 〜 uio10 までが見える。これは interrupt-controller もマップできたようだ。
KR260_436_230330.png

ロードされた uio を示す。

uio5 - DMA_pow2
uio6 - dma
uio7 - interrupt-controller
uio8 - timer
uio9 - krnl_vadd
uio10 - multi_axi4ls

  1. 2023年03月31日 04:43 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

Vitis アクセラレーション・プラットホームを使用して作ったハードウェアを KR260 の Ubuntu 22.04 で動作させる2

Vitis アクセラレーション・プラットホームを使用して作ったハードウェアを KR260 の Ubuntu 22.04 で動作させる1”の続き。

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる7”で動作させたハードウェアとソフトウェアを KR260 の Ubuntu 22.04 で動作させてみたいということで、前回は、xmutil コマンドの動作を確認し、u-dma-buf.ko を生成した。今回は、ホスト・パソコンの ip_vadd2_file_transfer の内容を KR260 の Ubuntu 22.04 に転送した。ファイルを /lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリにコピーして、kr260_ip_vadd2 をロードしたが、interrupt-controller が uio として実装されなかった。

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる3”で作成した KR260/kr260_custom_platform/kr260_custom_platform/ip_vadd2_file_transfer ディレクトリの内容を KR260 の Ubuntu 22.04 に作成した ~/examples/kr260_ip_vadd2 ディレクトリに転送する。
まずは、KR260 の Ubuntu 22.04 に ~/examples/kr260_ip_vadd2 ディレクトリを作成する。
mkdir examples
cd examples/
mkdir kr260_ip_vadd2
cd kr260_ip_vadd2/


ホストパソコンの KR260/kr260_custom_platform/kr260_custom_platform/ip_vadd2_file_transfer ディレクトリの pl.dtbo, binary_container_1.xclbin, shell.json を KR260 の Ubuntu 22.04 に作成した ~/examples/kr260_ip_vadd2 ディレクトリに FileZilla で転送した。
KR260_427_230330.png

ここからは、KR260 の Ubuntu 22.04 の ~/examples/kr260_ip_vadd2 ディレクトリでの作業となる。
/lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリを作成した。
sudo mkdir /lib/firmware/xilinx/kr260_ip_vadd2

binary_container_1.xclbin の名前を binary_container_1.bin に変更する。こうしないと、XRT は FPGA ビットストリームを抽出して Kria のプログラマブル ロジックをコンフィグレーションすることができないそうだ。
mv binary_container_1.xclbin binary_container_1.bin

pl.dtbo binary_container_1.bin shell.json ファイルを /lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリにコピーした。
sudo cp pl.dtbo binary_container_1.bin shell.json /lib/firmware/xilinx//kr260_ip_vadd2

現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd2 をロードする。
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip_vadd2

KR260_428_230330.png

kr260_ip_vadd2 をロードした時のターミナルの様子を示す。
KR260_429_230330.png

ターミナル表示のログを示す。

[  567.076186] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
[  567.086337] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets
[  567.096574] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay0
[  567.106445] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay1
[  567.116297] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0
[  567.125799] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0
[  567.135734] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking1
[  567.145698] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay2
[  567.155578] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/DMA_pow2_0
[  567.165601] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/PMOD_0
[  567.175276] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/PMOD_1
[  567.184990] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/PMOD_2
[  567.194666] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/PMOD_3
[  567.204338] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_dma_0
[  567.214267] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_intc_0
[  567.224283] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_timer_0
[  567.234387] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/krnl_vadd_1
[  567.244518] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0
[  567.254540] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/multi_axi4ls_0
[  567.345548] genirq: Flags mismatch irq 64. 00000004 (interrupt-controller) vs. 00000004 (fabric)
[  567.357125] uio_pdrv_genirq 80000000.interrupt-controller: unable to register uio device


/sys/class/uio を示す。
KR260_430_230330.png

uio0 〜 uio9 まで実装されていが、uio4 の下の name ファイルを読むと fabric と買いてあった。これは、こちらで実装した uio ではない。
その後の uio5 〜 uio9 までの name ファイルを読んだ。

uio5 - DMA_pow2
uio6 - dma
uio7 - timer
uio8 - krnl_vadd
uio9 - multi_axi4ls


という訳で、interrupt-controller が uio として実装されなかった。
  1. 2023年03月30日 04:28 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

ZYBO Z7-20 の Debian Linux で MicroBlaze プロセッサを使用する際に MicroBlaze が動作しない時がある

ZYBO Z7-20 の Debian Linux で MicroBlaze プロセッサを使用する”で、ハードコアの ARM Cortex-A9 と MicroBlaze プロセッサが連携で動作するハードウェアで ikwzm さんの Debian Linux 上で、dtbocfg.rb でハードウェアをロードしたときに MicroBlaze プロセッサが動作するのを確認できた。その際には、MicroBlaze プロセッサのアプリケーション・ソフトウェアは Vivado の Tools メニューから Associate ELF Files... を選択して elf ファイルを Block RAM の初期化データとして埋め込んである。

だが、条件は確定できていないが、MicroBlaze プロセッサが起動していない場合がある。それは、他のブロック・デザインから IP や階層モジュールをコピー & ペーストしたときに多い気がする。
ブロック・デザインを 1 から構築したときは、大丈夫だったし、そこで、そのブロック・デザインで階層モジュールをコピー & ペーストしたときは、大丈夫だった。
いずれにせよ。MicroBlaze プロセッサが動作するかどうか?を検証できる回路を埋め込んでおいた方が良いと思う。
なお、使用してるボードは ZYBO Z7-20 だ。使用している Vivado のバージョンは 2022.2 だ。
  1. 2023年03月29日 20:13 |
  2. FPGAを使用したシステム
  3. | トラックバック:0
  4. | コメント:0

Vitis アクセラレーション・プラットホームを使用して作ったハードウェアを KR260 の Ubuntu 22.04 で動作させる1

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる7”で動作させたハードウェアとソフトウェアを KR260 の Ubuntu 22.04 で動作させて見ようと思う。つまり、今までは、KR260 の Petalinux 2022.1 で動作させていたハードウェアとソフトウェアを Ubuntu 22.04 で動作させてみたい。

KR260 の Ubuntu 22.04 は”再度 KR260 で Ubuntu 22.04 LTS を起動した”で使用した MicroSD カードを使用して、KR260 をブートした。

KR260 で Ubuntu 22.04 LTS を起動した。
KR260_425_230328.png
KR260_426_230328.png

xmutil コマンドの動作を確認してみよう。
/lib/firmware/xilinx ディレクトリには、k26-starter-kits ディレクトリがあって、その中に、k26_starter_kits.bit.bin と k26_starter_kits.dtbo, shell.json ファイルが入っている。
KR260_421_230328.png

これを xmutil コマンドロードできるはず。
sudo xmutil unloadapp
sudo xmutil loadapp k26-starter-kits

k26-starter-kits をロードすることができた。
KR260_422_230328.png

次は、u-dma-buf.ko を用意する必要がある。
KR260 の Ubuntu 22.04 上で ikwzm/udmabuf から git clone する。
git clone https://github.com/ikwzm/udmabuf.git

udmabuf ディレクトリに入って、make all した。
cd udmabuf/
make all

KR260_423_230328.png

u-dma-buf.ko が生成された。
ls -l
KR260_424_230328.png
  1. 2023年03月29日 04:21 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

FPGAの部屋のまとめサイトの更新(2023年3月28日)

FPGAの部屋のまとめサイトを更新しました。
2023 年 3 月 27 日までの記事をまとめました。
  1. 2023年03月28日 04:29 |
  2. その他のFPGAの話題
  3. | トラックバック:0
  4. | コメント:0

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる7

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる6”の続き。

Vitis アクセラレーション・プラットホームを使用してハードウェアを完成させ、それを自作アプリケーション・ソフトウェアで動作させてみたいということで、前回は、pl.dtsi の krnl_vadd セクションを最小限にして、コンパイルし、Petalinux に転送して、ロードしたところ、krnl_vadd が uio8 として実装できた。今回は、uio ドライバを使用して、multi_axi4ls IP と DMA_pow2 IP、krnl_vadd IP を使用するアプリケーション・ソフトウェアを作成し、動作を確認した。

KR260 の Petalinux 2022.1 の ~/kr260_ip_vadd2 ディレクトリに アプリケーション・ソフトウェアの kr260_ip_vadd2.c を作成した。
KR260_419_230326.png

KR260_420_230326.png

kr260_ip_vadd2.c のコードを示す。

// kr260_ip_vadd2.c
// 2023/03/26 by marsee

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/mman.h>

int32_t multi_calc(int32_t *multi_axi4ls, int32_t a, int32_t b){
    while((multi_axi4ls[0] &4) == 0) ; // wait ap_idle
    multi_axi4ls[6] = a; // reg a, 0x18
    multi_axi4ls[8] = b; // reg b, 0x20
    multi_axi4ls[0] = 1; // ap_start = 1
    while((multi_axi4ls[11] & 1) == 0) ; // wait c_ap_vld
    return(multi_axi4ls[10]);
}

void main(){
    int uio9_fd;
    int32_t *multi_axi4ls;
    int32_t a, b, c;
    int uio4_fd;
    volatile int32_t *dma_pow2;
    volatile int32_t *data;
    int fd_udmabuf0;
    u_int32_t fd_paddr;
    unsigned long  phys_addr;
    int uio8_fd;
    int32_t *krnl_vadd;
    unsigned char  attr[1024];

    // uio9, multi_axi4ls IP
    if((uio9_fd = open("/dev/uio9", O_RDWR)) == -1) {
        printf("Can not open /dev/uio9\n");
        exit(1);
    }
    multi_axi4ls = (uint32_t*)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, uio9_fd, 0);
    
    printf("multi_axi4ls\n");
    for(a = 0, b = 1; a < 10; a++, b++){
        c = multi_calc(multi_axi4ls, a, b);
        printf("a = %d, b = %d, c = %d\n", a, b, c);
    }

    // uio4, DMP_pow2 IP
    if((uio4_fd = open("/dev/uio4", O_RDWR)) == -1) {
        printf("Can not open /dev/uio4\n");
        exit(1);
    }
    dma_pow2 = (volatile int32_t*)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, uio4_fd, 0);
    
    // udmabuf0
    fd_udmabuf0 = open("/dev/udmabuf0", O_RDWR | O_SYNC); // frame_buffer, The chache is disabled. 
    if (fd_udmabuf0 == -1){
        fprintf(stderr, "/dev/udmabuf0 open errorn");
        exit(-1);
    }

    // phys_addr of udmabuf0
    fd_paddr = open("/sys/class/u-dma-buf/udmabuf0/phys_addr", O_RDONLY);
    if (fd_paddr == -1){
        fprintf(stderr, "/sys/class/u-dma-buf/udmabuf0/phys_addr open errorn");
        exit(-1);
    }
    read(fd_paddr, (void *)attr, 1024);
    sscanf((const char *)attr, "%lx", &phys_addr);  
    close(fd_paddr);
    printf("phys_addr = %x\n", (unsigned int)phys_addr);
  
    data = (volatile int32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd_udmabuf0, 0);
    if (data == MAP_FAILED){
        fprintf(stderr, "data mmap error\n");
        exit(-1);
    }

    // data Initialization
    for(int i=0; i<10; i++){
        data[i] = i;
    }
    
    // DMA_pow2 start
    while((dma_pow2[0] & 4) == 0) ; // wait ap_idle
    dma_pow2[6] = phys_addr; // in_r
    dma_pow2[8] = phys_addr + 10 * sizeof(int32_t);
    dma_pow2[0] = 1; // ap_start
    while((dma_pow2[0] & 2) == 0) ; // wait ap_done
    
    printf("\n DMA_pow2\n");
    for(int i=0; i<10; i++){
        printf("in = %d, out = %d\n", data[i], data[i+10]);
    }

    // uio8, krnl_vadd IP
    if((uio8_fd = open("/dev/uio8", O_RDWR)) == -1) {
        printf("Can not open /dev/uio8\n");
        exit(1);
    }
    krnl_vadd = (uint32_t*)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, uio8_fd, 0);

    for(int i=0; i<10; i++){
        data[i+20] = i;
        data[i+30] = i+1;
    }

    // krnl_vadd start
    while((krnl_vadd[0] & 4) == 0) ; // wait ap_idle
    krnl_vadd[4] = (uint32_t)((phys_addr + 20 * sizeof(int32_t))&0xffffffff); // in1
    krnl_vadd[5] = (uint32_t)(((phys_addr + 20 * sizeof(int32_t))&0xffffffff00000000)>>32); // in1
    krnl_vadd[7] = (uint32_t)((phys_addr + 30 * sizeof(int32_t))&0xffffffff); // in2
    krnl_vadd[8] = (uint32_t)(((phys_addr + 30 * sizeof(int32_t))&0xffffffff00000000)>>32); // in2
    krnl_vadd[10] = (uint32_t)((phys_addr + 40 * sizeof(int32_t))&0xffffffff); // out_r
    krnl_vadd[11] = (uint32_t)(((phys_addr + 30 * sizeof(int32_t))&0xffffffff00000000)>>32); // out_r
    krnl_vadd[13] = 10; // size
    krnl_vadd[0] = 1; // ap_start
    while((krnl_vadd[0] & 2) == 0) ; // wait ap_done
   
    printf("\nkrnl_vadd\n");
    for(int i=0; i<10; i++){
       printf("in1 = %d, in2 = %d, out_r = %d\n", data[i+20], data[i+30], data[i+40]);
    }
}


kr260_ip_vadd2.c をコンパイルした。
kr260_ip_vadd 実行ファイルが生成された。
gcc -o kr260_ip_vadd2 kr260_ip_vadd2.c
ログを示す。

xilinx-kr260-starterkit-20221:~/kr260_ip_vadd2$ gcc -o kr260_ip_vadd2 kr260_ip_vadd2.c
kr260_ip_vadd2.c: In function 'main':
kr260_ip_vadd2.c:66:5: warning: implicit declaration of function 'read'; did you mean 'fread'? [-Wimplicit-function-declaration]
   66 |     read(fd_paddr, (void *)attr, 1024);
      |     ^~~~
      |     fread
kr260_ip_vadd2.c:68:5: warning: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
   68 |     close(fd_paddr);
      |     ^~~~~
      |     pclose


u-dma-buf.ko をロードし、kr260_ip_vadd2 ディレクトリに移動する。
現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd をロードする。
/dev/uio* と /dev/udmabuf0 をユーザー書き込み可能モードにした。
kr260_ip_vadd を動作させたところ成功した。
cd
sudo insmod u-dma-buf.ko udmabuf0=0x10000
cd kr260_ip_vadd2
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip_vadd2
sudo chmod 666 /dev/uio*
sudo chmod 666 /dev/udmabuf0
./kr260_ip_vadd2

KR260_417_230326.png

KR260_418_230326.png

これで、Vitis アクセラレーション・プラットホームを使用してハードウェアを完成させ、それを自作アプリケーション・ソフトウェアで動作させることができた。
空のホスト・アプリケーション・ソフトウェアとアクセラレーション・カーネルの krnl_vadd を使って、ハードウェアを完成させて、ハードウェア・プラットホーム上の multi_axi4ls IP と DMA_pow2 IP を動作させながら krnl_vadd も自作アプリケーション・ソフトウェアで動作させることができた。
  1. 2023年03月27日 04:11 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる6

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる5”の続き。

Vitis アクセラレーション・プラットホームを使用してハードウェアを完成させ、それを自作アプリケーション・ソフトウェアで動作させてみたいということで、前回は、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd2 をロードしたが、やはり、Vitis で生成された krnl_vadd IP は uio として生成されなかった。今回は、pl.dtsi の krnl_vadd セクションを最小限にして、コンパイルし、Petalinux に転送して、ロードしたところ、krnl_vadd が uio8 として実装できた。

前回、UIO ドライバを増やしたが、これでダメだとすると、pl.dtsi の記述を最小限にしてみたらどうだろうか?ということで、conpatible と reg だけにして試してみよう。

KR260/kr260_custom_platform/kr260_custom_platform/dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi の krnl_vadd セクションを conpatible と reg だけ残して、後はコメントアウトした。
(注)krnl_vadd セクションをいろいろとコメントアウトして、試したが、compatible と reg だけ残した時のみ uio にマップされるようだった。
KR260_412_230325.png

現在の pl.dtsi を示す。

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version: XSCT 2022.1
 * Today is: Sun Mar 19 19:55:06 2023
 */


/dts-v1/;
/plugin/;
/ {
    fragment@0 {
        target = <&fpga_full>;
        overlay0: __overlay__ {
            #address-cells = <2>;
            #size-cells = <2>;
            firmware-name = "kr260_custom.bit.bin";
            resets = <&zynqmp_reset 116>, <&zynqmp_reset 117>, <&zynqmp_reset 118>, <&zynqmp_reset 119>;
        };
    };
    fragment@1 {
        target = <&amba>;
        overlay1: __overlay__ {
            afi0: afi0 {
                compatible = "xlnx,afi-fpga";
                config-afi = < 0 0>, <1 0>, <2 0>, <3 0>, <4 0>, <5 0>, <6 0>, <7 0>, <8 0>, <9 0>, <10 0>, <11 0>, <12 0>, <13 0>, <14 0xa00>, <15 0x000>;
            };
            clocking0: clocking0 {
                #clock-cells = <0>;
                assigned-clock-rates = <99999001>;
                assigned-clocks = <&zynqmp_clk 71>;
                clock-output-names = "fabric_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,fclk";
            };
            clocking1: clocking1 {
                #clock-cells = <0>;
                assigned-clock-rates = <99999001>;
                assigned-clocks = <&zynqmp_clk 72>;
                clock-output-names = "fabric_clk";
                clocks = <&zynqmp_clk 72>;
                compatible = "xlnx,fclk";
            };
        };
    };
    fragment@2 {
        target = <&amba>;
        overlay2: __overlay__ {
            #address-cells = <2>;
            #size-cells = <2>;
            DMA_pow2_0: DMA_pow2@80070000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                clock-names = "ap_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80070000 0x0 0x10000>;
                xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;
            };
            PMOD_0: gpio@80010000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80010000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_1: gpio@80020000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80020000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_2: gpio@80030000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80030000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_3: gpio@80040000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80040000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            axi_dma_0: dma@80050000 {
                #dma-cells = <1>;
                clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
                clocks = <&zynqmp_clk 71>, <&zynqmp_clk 71>, <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80050000 0x0 0x10000>;
                xlnx,addrwidth = <0x20>;
                xlnx,sg-length-width = <0xe>;
                dma-channel@80050000 {
                    compatible = "xlnx,axi-dma-mm2s-channel";
                    dma-channels = <0x1>;
                    xlnx,datawidth = <0x20>;
                    xlnx,device-id = <0x0>;
                };
                dma-channel@80050030 {
                    compatible = "xlnx,axi-dma-s2mm-channel";
                    dma-channels = <0x1>;
                    xlnx,datawidth = <0x20>;
                    xlnx,device-id = <0x0>;
                };
            };
            axi_intc_0: interrupt-controller@80000000 {
                #interrupt-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                interrupt-controller ;
                interrupt-names = "irq";
                interrupt-parent = <&gic>;
                interrupts = <0 89 4>;
                reg = <0x0 0x80000000 0x0 0x10000>;
                xlnx,kind-of-intr = <0xfffffffd>;
                xlnx,num-intr-inputs = <0x20>;
            };
            axi_timer_0: timer@80060000 {
                clock-frequency = <99999001>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80060000 0x0 0x10000>;
                xlnx,count-width = <0x20>;
                xlnx,gen0-assert = <0x1>;
                xlnx,gen1-assert = <0x1>;
                xlnx,one-timer-only = <0x0>;
                xlnx,trig0-assert = <0x1>;
                xlnx,trig1-assert = <0x1>;
            };
            krnl_vadd_1: krnl_vadd@b0000000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                /*clock-names = "ap_clk";
                clocks = <&misc_clk_0>; */
                compatible = "generic-uio";
                /*interrupt-names = "interrupt";
                interrupt-parent = <&axi_intc_0>;
                interrupts = <1 2>;*/
                reg = <0x0 0xb0000000 0x0 0x10000>;
                /*xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;*/
            };
            misc_clk_0: misc_clk_0 {
                #clock-cells = <0>;
                clock-frequency = <199998000>;
                compatible = "fixed-clock";
            };
            multi_axi4ls_0: multi_axi4ls@80080000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                clock-names = "ap_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80080000 0x0 0x10000>;
                xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;
            };
            zyxclmm_drm {
                compatible = "xlnx,zocl";
                interrupts-extended = <&axi_intc_0 0 4>, <&axi_intc_0 1 4>, <&axi_intc_0 2 4>, <&axi_intc_0 3 4>, <&axi_intc_0 4 4>, <&axi_intc_0 5 4>, <&axi_intc_0 6 4>, <&axi_intc_0 7 4>, <&axi_intc_0 8 4>, <&axi_intc_0 9 4>,
<&axi_intc_0 10 4>, <&axi_intc_0 11 4>, <&axi_intc_0 12 4>, <&axi_intc_0 13 4>, <&axi_intc_0 14 4>,
<&axi_intc_0 15 4>, <&axi_intc_0 16 4>, <&axi_intc_0 17 4>, <&axi_intc_0 18 4>, <&axi_intc_0 19 4>,
<&axi_intc_0 20 4>, <&axi_intc_0 21 4>, <&axi_intc_0 22 4>, <&axi_intc_0 23 4>, <&axi_intc_0 24 4>,
<&axi_intc_0 25 4>, <&axi_intc_0 26 4>, <&axi_intc_0 27 4>, <&axi_intc_0 28 4>, <&axi_intc_0 29 4>,
<&axi_intc_0 30 4>, <&axi_intc_0 31 4 >;
            };
        };
    };
};


変更した pl.dtsi をコンパイルして pl.dtbo を生成する。
dtc -@ -O dtb -o ./dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo ./dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi
KR260_413_230325.png

pl.dtbo を ip_vadd2_file_transfer ディレクトリにコピーした。
ip_vadd2_file_transfer ディレクトリの pl.dtbo を FileZilla で KR260 の Petalinux の ~/kr260_ip_vadd2 に転送した。

pl.dtbo を /lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリにコピーした。(binary_container_1.bin shell.json はすでにコピー済み)
sudo cp pl.dtbo /lib/firmware/xilinx//kr260_ip_vadd2

現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd2 をロードする。
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip_vadd2

KR260_414_230325.png

KR260 Petalinux の /sys/class/uio を見ると uio0 〜 uio9 までが見える。これは krnl_vadd もマップできたようだ。
KR260_415_230325.png

krnl_vadd は uio8 にマップされていた。
KR260_416_230325.png

ロードされた uio を示す。

uio4 - DMA_pow2
uio5 - dma
uio6 - interrupt-controller
uio7 - timer
uio8 - krnl_vadd
uio9 - multi_axi4ls


これで、アクセラレーション・カーネルの krnl_vadd も uio にマップできたので、先に進める。
  1. 2023年03月26日 05:27 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる5

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる4”の続き。

Vitis アクセラレーション・プラットホームを使用してハードウェアを完成させ、それを自作アプリケーション・ソフトウェアで動作させてみたいということで、前回は、Petalinux の kernel コンフィグレーションで Userspace platform driver with generic IRQ handling を M にしていて、常時組み込まれる * にしてなかったことが気になるので、もう一度 Petalinux のビルドからやってみることにした。Petalinux のビルド後、イメージ・ファイルを生成して、MicroSD カードに書いた。KR260 に MicroSD カードを挿入して Petalinux 2022.1 を起動した。Petalinux にモジュールをインストールして、環境を整えた。今回は、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd2 をロードしたが、やはり、Vitis で生成された krnl_vadd IP は uio として生成されなかった。

kr260_ip_vadd2 ディレクトリの内容は前回に復帰した。

/lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリを作成した。
sudo mkdir /lib/firmware/xilinx/kr260_ip_vadd2

binary_container_1.xclbin の名前を binary_container_1.bin に変更する。こうしないと、XRT は FPGA ビットストリームを抽出して Kria のプログラマブル ロジックをコンフィグレーションすることができないそうだ。
mv binary_container_1.xclbin binary_container_1.bin

pl.dtbo binary_container_1.bin shell.json ファイルを /lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリにコピーした。
sudo cp pl.dtbo binary_container_1.bin shell.json /lib/firmware/xilinx//kr260_ip_vadd2

現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd2 をロードする。
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip_vadd2

KR260_406_230322.png

/sys/class/uio ディレクトリに uio4 〜 uio8 が増えた。
uio9 は無かった。
KR260_407_230322.png

/sys/class/uio/uio4 ディレクトリの name は DMA_pow2 だった。
uio5 の name は dma だった。
uio6 の name は interrupt-controller だった。
uio7 の name は timer だった。
uio8 の name は multi_axi4ls だった。

krnl_vadd は無かった。残念。。。

なお、Vivado の prj プロジェクトの kr260_bd_wrapper.bin ファイル(KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd2_system_hw_link/Hardware/binary_container_1.build/link/vivado/vpl/prj/prj.runs/impl_1 ディレクトリ)を binary_container_1.bin の代わりに試してみたが、やはり、krnl_vadd は無かった。

Vitis のスキームでアクセラレーション・ハードウェアとして実装された krnl_vadd は uio で実装するのは無理のようだ。ただし、”vadd.cpp を書き換えて、multi_axi4ls と DMA_pow2 も動作させる”で vadd を動作させる OpenCL コードの前にハードウェア・プラットホームの IP を uio で実装して、動作させることには成功しているので、こちらのスキームでハードウェア・プラットホームの IP を使用すれば良いようだ。また、OpenCL を使用しないで、XRT のネイテイブなコードで実行することもできるはずだ。
  1. 2023年03月25日 05:40 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる4

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる3”の続き。

Vitis アクセラレーション・プラットホームを使用してハードウェアを完成させ、それを自作アプリケーション・ソフトウェアで動作させてみたいということで、前回は、ip_vadd2_file_transfer ディレクトリを作成し、ファイルを集めて、KR260 の Petalinux に転送した。そして、現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd2 をロードしたが、Vitis で生成された krnl_vadd IP は uio として生成されなかった。今回は、Petalinux の kernel コンフィグレーションで Userspace platform driver with generic IRQ handling を M にしていて、常時組み込まれる * にしてなかったことが気になるので、もう一度 Petalinux のビルドからやってみることにした。Petalinux のビルド後、イメージ・ファイルを生成して、MicroSD カードに書いた。KR260 に MicroSD カードを挿入して Petalinux 2022.1 を起動した。Petalinux にモジュールをインストールして、環境を整えた。

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する6”の petalinux-config -c kernel で、Userspace I/O platform driver with generic IRQ hangling を M から * にしたが、Userspace platform driver with generic IRQ handling は M のままにした。これを * にしてみよう。
KR260/kr260_custom_platform/linux_os ディレクトリに行ってコマンドを実行する。
petalinux-config -c kernel

Device Drivers -> Usespace I/O drivers を選んでクリックし、スペース・キーを押して、Userspace I/O platform driver with generic IRQ hangling と Userspace platform driver with generic IRQ handling を M から * にした。
KR260_408_230323.png

セーブしてexit した。
KR260_409_230323.png

KR260/kr260_custom_platform/linux_os/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi を確認して、

uio_pdrv_genirq.of_id=generic-uio

が追加されているのを確認した。
KR260_327_230308.png

Petalinux 2022.1 をビルドした。
petalinux-build
ビルドが成功した。
KR260_410_230323.png

wic イメージ・ファイルを作成する。
petalinux-package --wic --images-dir images/linux/ --bootfiles "ramdisk.cpio.gz.u-boot,boot.scr,Image,system.dtb,system-zynqmp-sck-kr-g-revB.dtb" --disk-name "sda"

KR260/kr260_custom_platform/linux_os/images/linux/petalinux-sdimage.wic が生成された。

petalinux-sdimage.wic ファイルを balenaEtcher を使用して MicroSD カードに書き込んだ。

書き込み後に MicroSD カードに boot パーティションと root パーティションが生成された。

MicroSD カードを KV260 に挿入して電源 ON したところ、Petalinux 2022.1 が起動した。

ファイル・マネージャーから。pcmafm をインストールする。
sudo dnf install pcmanfm.cortexa72_cortexa53

packagegroup-petalinux-opencv-dbg をインストールした。
sudo dnf install packagegroup-petalinux-opencv-dbg

openssh-sftp-server をインストールした。
sudo dnf install openssh-sftp-server.cortexa72_cortexa53

テキスト・エディタの l3afpad をインストールした。
sudo dnf install l3afpad.cortexa72_cortexa53

gtk-play をインストールする。
gst-examples をインストールした。
sudo dnf install gst-examples.cortexa72_cortexa53

pcmanfm から gtk-play を起動できるようにした。
IMG_20191030_051740.jpg ファイルをダブルクリックで開くと、Choose Application ダイアログが開く。
Custom Command Line タブをクリックして、Command line to execute: に gtk-play %f と入力し、”Set selected application as default action for this file type”のチェックボックスにチェックを入れた。また、Application name に gtk-play と書いた。

gcc をインストールしよう。
sudo dnf install gcc.cortexa72_cortexa53
sudo dnf install gcc-symlinks.cortexa72_cortexa53


前回までの KR260 の Petalinux の home からのディレクトリやファイルを Ubuntu パソコンにバックアップしていたので、そのデータを SFTP で書き戻した。
現在の Petalinux の /home/petalinux ディレクトリの様子を示す。
KR260_411_230323.png
  1. 2023年03月24日 04:33 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

ZYBO Z7-20 の Debian Linux で MicroBlaze プロセッサを使用する

ZYBO Z7-20 に ikwzm さんの FPGA-SoC-Linux を走らせているが、そこに PL に MicroBlaze プロセッサを使用したシステムを構築してみよう。PS は何もやらないので、ソフトウェアを実行する必要はないが、Zynq Processing System 7 のクロックを MicroBlaze が使用してる。

Vivado 2022.2 で作成された Debian_mb_test222 プロジェクトを示す。
mb_test_4_230322.png

mb_test ブロック・デザインを示す。
mb_test_5_230322.png

Address Editor 画面を示す。
mb_test_6_230322.png

制約ファイルの mb_test.xdc を示す。

set_property IOSTANDARD LVCMOS33 [get_ports {ld2_0[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ld2_0[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ld2_0[0]}]
set_property PACKAGE_PIN G14 [get_ports {ld2_0[2]}]
set_property PACKAGE_PIN M15 [get_ports {ld2_0[1]}]
set_property PACKAGE_PIN M14 [get_ports {ld2_0[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ld3[0]}]
set_property PACKAGE_PIN D18 [get_ports {ld3[0]}]


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

ハードウェアをエクスポートした。
mb_test_wrapper.xsa ファイルが生成された。

Vivado の Tools メニューから Launch Vitis IDE を選択して、Vitis 2022.2 を起動した。
mb_test_pf プラットホームを作成し、axi_timer_test アプリケーション・プロジェクトを作成した。
axi_timer_test.c を書いた。
mb_test_8_230322.png

axi_timer_test.c を示す。

// axi_timer_test.c
// 2023/03/02 by marsee
// ”MicroBlazeのタイマー割り込みを使う” https://e-trees.jp/wp/?p=316 からコードを引用
// gpio関連のコードを”Xilinx AXI GPIO の使い方” https://qiita.com/s_nkg/items/800e0559332495605056 から引用

#include <stdio.h>

#include "xtmrctr.h"
#include "xintc.h"
#include "xparameters.h"
#include "xbasic_types.h"
#include "xgpio.h"

void timer_int_handler();

XTmrCtr tmr;
XIntc intc;
XGpio gpio_0;
u32 gpio_status=0;

void timer_int_handler()
{
    volatile unsigned int csr;
    csr = XTmrCtr_GetControlStatusReg(XPAR_AXI_TIMER_0_BASEADDR, 0);
    if(gpio_status == 0)
        gpio_status = 0x7;
    else
        gpio_status = 0;
    XGpio_DiscreteWrite(&gpio_0, 1, gpio_status);
    XTmrCtr_SetControlStatusReg(XPAR_AXI_TIMER_0_BASEADDR, 0, csr);
}

int main()
{
    XIntc_Initialize(&intc, XPAR_INTC_0_DEVICE_ID);
    XTmrCtr_Initialize(&tmr, XPAR_AXI_TIMER_0_DEVICE_ID);
    XGpio_Initialize(&gpio_0, XPAR_GPIO_0_DEVICE_ID);

    XIntc_Connect(&intc, XPAR_INTC_0_TMRCTR_0_VEC_ID, (XInterruptHandler)XTmrCtr_InterruptHandler, (void*)&tmr);
    XIntc_Start(&intc, XIN_REAL_MODE);
    XIntc_Enable(&intc, XPAR_INTC_0_TMRCTR_0_VEC_ID);

    XTmrCtr_SetHandler(&tmr, (void*)timer_int_handler, (void*)0);

    microblaze_enable_interrupts();

    // see LogiCORE IP AXI Timer Product Guide, PG079
    XTmrCtr_SetOptions(&tmr, 0, XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION | XTC_DOWN_COUNT_OPTION);
    XTmrCtr_SetResetValue(&tmr, 0, 50000000);
    XTmrCtr_Start(&tmr, 0);

    for(;;){}

    return 0;
}


axi_timer_test.elf が生成されたので、Vivado で MicroBlaze プロセッサのメモリに axi_timer_test.elf を割り当てる。
Vivado の Tools メニューから Associate ELF Files... を選択して、Design Sources -> mb_test = microblaze_0 に生成した axi_timer_test.elf を指定した。
mb_test_9_230322.png

もう一度、Generate Bitstream を実行して、bit ファイルを再生成した。

ZYBO Z7-20 で ikwzm さんの FPGA-SoC-Linux を起動して、SFTP で mb_test_wrapper.bit を ~/examples/mb_test ディレクトリに転送した。

mb_test_wrapper.bit の名前を mb_test.bit に変更した。
mv mb_test_wrapper.bit mb_test.bit

fpga-bit-to-bin.py を使用して、bit ファイルを bin ファイルに変更した。
python3 fpga-bit-to-bin.py --flip mb_test_bit mb_test.bin

mb_test.bin を /lib/firmware ディレクトリにコピーした。
sudo cp mb_test.bin /lib/firmware/

devicetree.dts を用意した。
devicetree_dts を示す。

/dts-v1/;/plugin/;
/ {
    fragment@0 {
        target-path = "/amba/fpga-region0";
        #address-cells = <0x1>;
        #size-cells = <0x1>;

        __overlay__ {
            #address-cells = <0x1>;
            #size-cells = <0x1>;

            firmware-name = "mb_test.bin";

            fclk0 {
                compatible  = "ikwzm,fclkcfg-0.10.a";
                clocks      = <&clkc 15>, <&clkc 2>;
                insert-rate = "100000000";
                insert-enable = <1>;
            };
        };
    } ;
} ;


mb_test をロードした。
sudo dtbocfg.rb -i --dts devicetree.dts mb_test
mb_test_2_230322.png

mb_test をロード後に、LED 全てが点滅した。LD3 と LD2 〜 LD0 は点滅の間隔が異なる。成功だ。
MicroBlzae が割り込みで動作している。

ZYBO Z7-20 の Debian Linux のターミナルの表示を示す。
mb_test_1_230322.png

なお、mb_test のロードを解除する場合のコマンドを示す。
sudo dtbocfg.rb -r mb_test

最後にブロック・デザインを構築するための tcl ファイル mb_test.tcl を貼っておく。
この tcl ファイルは Vivado の TCL console でプロジェクトのディレクトリに cd してから source mb_test.tcl で mb_test ブロック・デザインを生成してくれる。

################################################################
# This is a generated script based on design: mb_test
#
# Though there are limitations about the generated script,
# the main purpose of this utility is to make learning
# IP Integrator Tcl commands easier.
################################################################

namespace eval _tcl {
proc get_script_folder {} {
   set script_path [file normalize [info script]]
   set script_folder [file dirname $script_path]
   return $script_folder
}
}
variable script_folder
set script_folder [_tcl::get_script_folder]

################################################################
# Check if script is running in correct Vivado version.
################################################################
set scripts_vivado_version 2022.2
set current_vivado_version [version -short]

if { [string first $scripts_vivado_version $current_vivado_version] == -1 } {
   puts ""
   catch {common::send_gid_msg -ssname BD::TCL -id 2041 -severity "ERROR" "This script was generated using Vivado <$scripts_vivado_version> and is being run in <$current_vivado_version> of Vivado. Please run the script in Vivado <$scripts_vivado_version> then open the design in Vivado <$current_vivado_version>. Upgrade the design by running \"Tools => Report => Report IP Status...\", then run write_bd_tcl to create an updated script."}

   return 1
}

################################################################
# START
################################################################

# To test this script, run the following commands from Vivado Tcl console:
# source mb_test_script.tcl

# If there is no project opened, this script will create a
# project, but make sure you do not have an existing project
# <./myproj/project_1.xpr> in the current working folder.

set list_projs [get_projects -quiet]
if { $list_projs eq "" } {
   create_project project_1 myproj -part xc7z020clg400-1
   set_property BOARD_PART digilentinc.com:zybo-z7-20:part0:1.1 [current_project]
}


# CHANGE DESIGN NAME HERE
variable design_name
set design_name mb_test

# If you do not already have an existing IP Integrator design open,
# you can create a design using the following command:
#    create_bd_design $design_name

# Creating design if needed
set errMsg ""
set nRet 0

set cur_design [current_bd_design -quiet]
set list_cells [get_bd_cells -quiet]

if { ${design_name} eq "" } {
   # USE CASES:
   #    1) Design_name not set

   set errMsg "Please set the variable <design_name> to a non-empty value."
   set nRet 1

} elseif { ${cur_design} ne "" && ${list_cells} eq "" } {
   # USE CASES:
   #    2): Current design opened AND is empty AND names same.
   #    3): Current design opened AND is empty AND names diff; design_name NOT in project.
   #    4): Current design opened AND is empty AND names diff; design_name exists in project.

   if { $cur_design ne $design_name } {
      common::send_gid_msg -ssname BD::TCL -id 2001 -severity "INFO" "Changing value of <design_name> from <$design_name> to <$cur_design> since current design is empty."
      set design_name [get_property NAME $cur_design]
   }
   common::send_gid_msg -ssname BD::TCL -id 2002 -severity "INFO" "Constructing design in IPI design <$cur_design>..."

} elseif { ${cur_design} ne "" && $list_cells ne "" && $cur_design eq $design_name } {
   # USE CASES:
   #    5) Current design opened AND has components AND same names.

   set errMsg "Design <$design_name> already exists in your project, please set the variable <design_name> to another value."
   set nRet 1
} elseif { [get_files -quiet ${design_name}.bd] ne "" } {
   # USE CASES: 
   #    6) Current opened design, has components, but diff names, design_name exists in project.
   #    7) No opened design, design_name exists in project.

   set errMsg "Design <$design_name> already exists in your project, please set the variable <design_name> to another value."
   set nRet 2

} else {
   # USE CASES:
   #    8) No opened design, design_name not in project.
   #    9) Current opened design, has components, but diff names, design_name not in project.

   common::send_gid_msg -ssname BD::TCL -id 2003 -severity "INFO" "Currently there is no design <$design_name> in project, so creating one..."

   create_bd_design $design_name

   common::send_gid_msg -ssname BD::TCL -id 2004 -severity "INFO" "Making design <$design_name> as current_bd_design."
   current_bd_design $design_name

}

common::send_gid_msg -ssname BD::TCL -id 2005 -severity "INFO" "Currently the variable <design_name> is equal to \"$design_name\"."

if { $nRet != 0 } {
   catch {common::send_gid_msg -ssname BD::TCL -id 2006 -severity "ERROR" $errMsg}
   return $nRet
}

set bCheckIPsPassed 1
##################################################################
# CHECK IPs
##################################################################
set bCheckIPs 1
if { $bCheckIPs == 1 } {
   set list_check_ips "\ 
xilinx.com:ip:axi_gpio:2.0\
xilinx.com:ip:axi_timer:2.0\
xilinx.com:ip:c_counter_binary:12.0\
xilinx.com:ip:mdm:3.2\
xilinx.com:ip:microblaze:11.0\
xilinx.com:ip:axi_intc:4.1\
xilinx.com:ip:processing_system7:5.5\
xilinx.com:ip:proc_sys_reset:5.0\
xilinx.com:ip:xlslice:1.0\
xilinx.com:ip:lmb_bram_if_cntlr:4.0\
xilinx.com:ip:lmb_v10:3.0\
xilinx.com:ip:blk_mem_gen:8.4\
"

   set list_ips_missing ""
   common::send_gid_msg -ssname BD::TCL -id 2011 -severity "INFO" "Checking if the following IPs exist in the project's IP catalog: $list_check_ips ."

   foreach ip_vlnv $list_check_ips {
      set ip_obj [get_ipdefs -all $ip_vlnv]
      if { $ip_obj eq "" } {
         lappend list_ips_missing $ip_vlnv
      }
   }

   if { $list_ips_missing ne "" } {
      catch {common::send_gid_msg -ssname BD::TCL -id 2012 -severity "ERROR" "The following IPs are not found in the IP Catalog:\n  $list_ips_missing\n\nResolution: Please add the repository containing the IP(s) to the project." }
      set bCheckIPsPassed 0
   }

}

if { $bCheckIPsPassed != 1 } {
  common::send_gid_msg -ssname BD::TCL -id 2023 -severity "WARNING" "Will not continue with creation of design due to the error(s) above."
  return 3
}

##################################################################
# DESIGN PROCs
##################################################################


# Hierarchical cell: microblaze_0_local_memory
proc create_hier_cell_microblaze_0_local_memory { parentCell nameHier } {

  variable script_folder

  if { $parentCell eq "" || $nameHier eq "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2092 -severity "ERROR" "create_hier_cell_microblaze_0_local_memory() - Empty argument(s)!"}
     return
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj

  # Create cell and set as current instance
  set hier_obj [create_bd_cell -type hier $nameHier]
  current_bd_instance $hier_obj

  # Create interface pins
  create_bd_intf_pin -mode MirroredMaster -vlnv xilinx.com:interface:lmb_rtl:1.0 DLMB

  create_bd_intf_pin -mode MirroredMaster -vlnv xilinx.com:interface:lmb_rtl:1.0 ILMB


  # Create pins
  create_bd_pin -dir I -type clk LMB_Clk
  create_bd_pin -dir I -type rst SYS_Rst

  # Create instance: dlmb_bram_if_cntlr, and set properties
  set dlmb_bram_if_cntlr [ create_bd_cell -type ip -vlnv xilinx.com:ip:lmb_bram_if_cntlr:4.0 dlmb_bram_if_cntlr ]
  set_property CONFIG.C_ECC {0} $dlmb_bram_if_cntlr


  # Create instance: dlmb_v10, and set properties
  set dlmb_v10 [ create_bd_cell -type ip -vlnv xilinx.com:ip:lmb_v10:3.0 dlmb_v10 ]

  # Create instance: ilmb_bram_if_cntlr, and set properties
  set ilmb_bram_if_cntlr [ create_bd_cell -type ip -vlnv xilinx.com:ip:lmb_bram_if_cntlr:4.0 ilmb_bram_if_cntlr ]
  set_property CONFIG.C_ECC {0} $ilmb_bram_if_cntlr


  # Create instance: ilmb_v10, and set properties
  set ilmb_v10 [ create_bd_cell -type ip -vlnv xilinx.com:ip:lmb_v10:3.0 ilmb_v10 ]

  # Create instance: lmb_bram, and set properties
  set lmb_bram [ create_bd_cell -type ip -vlnv xilinx.com:ip:blk_mem_gen:8.4 lmb_bram ]
  set_property -dict [list \
    CONFIG.Memory_Type {True_Dual_Port_RAM} \
    CONFIG.use_bram_block {BRAM_Controller} \
  ] $lmb_bram


  # Create interface connections
  connect_bd_intf_net -intf_net microblaze_0_dlmb [get_bd_intf_pins DLMB] [get_bd_intf_pins dlmb_v10/LMB_M]
  connect_bd_intf_net -intf_net microblaze_0_dlmb_bus [get_bd_intf_pins dlmb_bram_if_cntlr/SLMB] [get_bd_intf_pins dlmb_v10/LMB_Sl_0]
  connect_bd_intf_net -intf_net microblaze_0_dlmb_cntlr [get_bd_intf_pins dlmb_bram_if_cntlr/BRAM_PORT] [get_bd_intf_pins lmb_bram/BRAM_PORTA]
  connect_bd_intf_net -intf_net microblaze_0_ilmb [get_bd_intf_pins ILMB] [get_bd_intf_pins ilmb_v10/LMB_M]
  connect_bd_intf_net -intf_net microblaze_0_ilmb_bus [get_bd_intf_pins ilmb_bram_if_cntlr/SLMB] [get_bd_intf_pins ilmb_v10/LMB_Sl_0]
  connect_bd_intf_net -intf_net microblaze_0_ilmb_cntlr [get_bd_intf_pins ilmb_bram_if_cntlr/BRAM_PORT] [get_bd_intf_pins lmb_bram/BRAM_PORTB]

  # Create port connections
  connect_bd_net -net SYS_Rst_1 [get_bd_pins SYS_Rst] [get_bd_pins dlmb_bram_if_cntlr/LMB_Rst] [get_bd_pins dlmb_v10/SYS_Rst] [get_bd_pins ilmb_bram_if_cntlr/LMB_Rst] [get_bd_pins ilmb_v10/SYS_Rst]
  connect_bd_net -net microblaze_0_Clk [get_bd_pins LMB_Clk] [get_bd_pins dlmb_bram_if_cntlr/LMB_Clk] [get_bd_pins dlmb_v10/LMB_Clk] [get_bd_pins ilmb_bram_if_cntlr/LMB_Clk] [get_bd_pins ilmb_v10/LMB_Clk]

  # Restore current instance
  current_bd_instance $oldCurInst
}


# Procedure to create entire design; Provide argument to make
# procedure reusable. If parentCell is "", will use root.
proc create_root_design { parentCell } {

  variable script_folder
  variable design_name

  if { $parentCell eq "" } {
     set parentCell [get_bd_cells /]
  }

  # Get object for parentCell
  set parentObj [get_bd_cells $parentCell]
  if { $parentObj == "" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2090 -severity "ERROR" "Unable to find parent cell <$parentCell>!"}
     return
  }

  # Make sure parentObj is hier blk
  set parentType [get_property TYPE $parentObj]
  if { $parentType ne "hier" } {
     catch {common::send_gid_msg -ssname BD::TCL -id 2091 -severity "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
     return
  }

  # Save current instance; Restore later
  set oldCurInst [current_bd_instance .]

  # Set parent object as current
  current_bd_instance $parentObj


  # Create interface ports
  set DDR [ create_bd_intf_port -mode Master -vlnv xilinx.com:interface:ddrx_rtl:1.0 DDR ]

  set FIXED_IO [ create_bd_intf_port -mode Master -vlnv xilinx.com:display_processing_system7:fixedio_rtl:1.0 FIXED_IO ]


  # Create ports
  set ld2_0 [ create_bd_port -dir O -from 2 -to 0 ld2_0 ]
  set ld3 [ create_bd_port -dir O -from 0 -to 0 ld3 ]

  # Create instance: axi_gpio_0, and set properties
  set axi_gpio_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_gpio:2.0 axi_gpio_0 ]
  set_property -dict [list \
    CONFIG.C_ALL_OUTPUTS {1} \
    CONFIG.C_GPIO_WIDTH {3} \
  ] $axi_gpio_0


  # Create instance: axi_timer_0, and set properties
  set axi_timer_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_timer:2.0 axi_timer_0 ]

  # Create instance: c_counter_binary_0, and set properties
  set c_counter_binary_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:c_counter_binary:12.0 c_counter_binary_0 ]
  set_property CONFIG.Output_Width {26} $c_counter_binary_0


  # Create instance: mdm_1, and set properties
  set mdm_1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:mdm:3.2 mdm_1 ]

  # Create instance: microblaze_0, and set properties
  set microblaze_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:microblaze:11.0 microblaze_0 ]
  set_property -dict [list \
    CONFIG.C_DEBUG_ENABLED {1} \
    CONFIG.C_D_AXI {1} \
    CONFIG.C_D_LMB {1} \
    CONFIG.C_I_LMB {1} \
    CONFIG.C_USE_DCACHE {0} \
    CONFIG.C_USE_ICACHE {0} \
  ] $microblaze_0


  # Create instance: microblaze_0_axi_intc, and set properties
  set microblaze_0_axi_intc [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_intc:4.1 microblaze_0_axi_intc ]
  set_property CONFIG.C_HAS_FAST {1} $microblaze_0_axi_intc


  # Create instance: microblaze_0_axi_periph, and set properties
  set microblaze_0_axi_periph [ create_bd_cell -type ip -vlnv xilinx.com:ip:axi_interconnect:2.1 microblaze_0_axi_periph ]
  set_property CONFIG.NUM_MI {3} $microblaze_0_axi_periph


  # Create instance: microblaze_0_local_memory
  create_hier_cell_microblaze_0_local_memory [current_bd_instance .] microblaze_0_local_memory

  # Create instance: processing_system7_0, and set properties
  set processing_system7_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:processing_system7:5.5 processing_system7_0 ]
  set_property -dict [list \
    CONFIG.PCW_ACT_APU_PERIPHERAL_FREQMHZ {666.666687} \
    CONFIG.PCW_ACT_CAN_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_DCI_PERIPHERAL_FREQMHZ {10.158730} \
    CONFIG.PCW_ACT_ENET0_PERIPHERAL_FREQMHZ {125.000000} \
    CONFIG.PCW_ACT_ENET1_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_FPGA0_PERIPHERAL_FREQMHZ {100.000000} \
    CONFIG.PCW_ACT_FPGA1_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_FPGA2_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_FPGA3_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_PCAP_PERIPHERAL_FREQMHZ {200.000000} \
    CONFIG.PCW_ACT_QSPI_PERIPHERAL_FREQMHZ {200.000000} \
    CONFIG.PCW_ACT_SDIO_PERIPHERAL_FREQMHZ {50.000000} \
    CONFIG.PCW_ACT_SMC_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_SPI_PERIPHERAL_FREQMHZ {10.000000} \
    CONFIG.PCW_ACT_TPIU_PERIPHERAL_FREQMHZ {200.000000} \
    CONFIG.PCW_ACT_TTC0_CLK0_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC0_CLK1_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC0_CLK2_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC1_CLK0_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC1_CLK1_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_TTC1_CLK2_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_ACT_UART_PERIPHERAL_FREQMHZ {100.000000} \
    CONFIG.PCW_ACT_WDT_PERIPHERAL_FREQMHZ {111.111115} \
    CONFIG.PCW_APU_CLK_RATIO_ENABLE {6:2:1} \
    CONFIG.PCW_APU_PERIPHERAL_FREQMHZ {667} \
    CONFIG.PCW_CLK0_FREQ {100000000} \
    CONFIG.PCW_CLK1_FREQ {10000000} \
    CONFIG.PCW_CLK2_FREQ {10000000} \
    CONFIG.PCW_CLK3_FREQ {10000000} \
    CONFIG.PCW_CPU_CPU_6X4X_MAX_RANGE {667} \
    CONFIG.PCW_CPU_PERIPHERAL_CLKSRC {ARM PLL} \
    CONFIG.PCW_CRYSTAL_PERIPHERAL_FREQMHZ {33.333333} \
    CONFIG.PCW_DCI_PERIPHERAL_CLKSRC {DDR PLL} \
    CONFIG.PCW_DCI_PERIPHERAL_FREQMHZ {10.159} \
    CONFIG.PCW_DDR_PERIPHERAL_CLKSRC {DDR PLL} \
    CONFIG.PCW_DDR_RAM_HIGHADDR {0x3FFFFFFF} \
    CONFIG.PCW_ENET0_ENET0_IO {MIO 16 .. 27} \
    CONFIG.PCW_ENET0_GRP_MDIO_ENABLE {1} \
    CONFIG.PCW_ENET0_GRP_MDIO_IO {MIO 52 .. 53} \
    CONFIG.PCW_ENET0_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_ENET0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_ENET0_PERIPHERAL_FREQMHZ {1000 Mbps} \
    CONFIG.PCW_ENET0_RESET_ENABLE {0} \
    CONFIG.PCW_ENET1_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_ENET1_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_ENET_RESET_ENABLE {1} \
    CONFIG.PCW_ENET_RESET_POLARITY {Active Low} \
    CONFIG.PCW_ENET_RESET_SELECT {Share reset pin} \
    CONFIG.PCW_EN_4K_TIMER {0} \
    CONFIG.PCW_EN_ENET0 {1} \
    CONFIG.PCW_EN_GPIO {1} \
    CONFIG.PCW_EN_QSPI {1} \
    CONFIG.PCW_EN_SDIO0 {1} \
    CONFIG.PCW_EN_UART1 {1} \
    CONFIG.PCW_EN_USB0 {1} \
    CONFIG.PCW_FPGA0_PERIPHERAL_FREQMHZ {100} \
    CONFIG.PCW_FPGA_FCLK0_ENABLE {1} \
    CONFIG.PCW_GPIO_MIO_GPIO_ENABLE {1} \
    CONFIG.PCW_GPIO_MIO_GPIO_IO {MIO} \
    CONFIG.PCW_GPIO_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_I2C_RESET_ENABLE {1} \
    CONFIG.PCW_IRQ_F2P_MODE {DIRECT} \
    CONFIG.PCW_MIO_0_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_0_PULLUP {enabled} \
    CONFIG.PCW_MIO_0_SLEW {slow} \
    CONFIG.PCW_MIO_10_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_10_PULLUP {enabled} \
    CONFIG.PCW_MIO_10_SLEW {slow} \
    CONFIG.PCW_MIO_11_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_11_PULLUP {enabled} \
    CONFIG.PCW_MIO_11_SLEW {slow} \
    CONFIG.PCW_MIO_12_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_12_PULLUP {enabled} \
    CONFIG.PCW_MIO_12_SLEW {slow} \
    CONFIG.PCW_MIO_13_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_13_PULLUP {enabled} \
    CONFIG.PCW_MIO_13_SLEW {slow} \
    CONFIG.PCW_MIO_14_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_14_PULLUP {enabled} \
    CONFIG.PCW_MIO_14_SLEW {slow} \
    CONFIG.PCW_MIO_15_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_15_PULLUP {enabled} \
    CONFIG.PCW_MIO_15_SLEW {slow} \
    CONFIG.PCW_MIO_16_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_16_PULLUP {enabled} \
    CONFIG.PCW_MIO_16_SLEW {fast} \
    CONFIG.PCW_MIO_17_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_17_PULLUP {enabled} \
    CONFIG.PCW_MIO_17_SLEW {fast} \
    CONFIG.PCW_MIO_18_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_18_PULLUP {enabled} \
    CONFIG.PCW_MIO_18_SLEW {fast} \
    CONFIG.PCW_MIO_19_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_19_PULLUP {enabled} \
    CONFIG.PCW_MIO_19_SLEW {fast} \
    CONFIG.PCW_MIO_1_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_1_PULLUP {enabled} \
    CONFIG.PCW_MIO_1_SLEW {slow} \
    CONFIG.PCW_MIO_20_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_20_PULLUP {enabled} \
    CONFIG.PCW_MIO_20_SLEW {fast} \
    CONFIG.PCW_MIO_21_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_21_PULLUP {enabled} \
    CONFIG.PCW_MIO_21_SLEW {fast} \
    CONFIG.PCW_MIO_22_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_22_PULLUP {enabled} \
    CONFIG.PCW_MIO_22_SLEW {fast} \
    CONFIG.PCW_MIO_23_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_23_PULLUP {enabled} \
    CONFIG.PCW_MIO_23_SLEW {fast} \
    CONFIG.PCW_MIO_24_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_24_PULLUP {enabled} \
    CONFIG.PCW_MIO_24_SLEW {fast} \
    CONFIG.PCW_MIO_25_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_25_PULLUP {enabled} \
    CONFIG.PCW_MIO_25_SLEW {fast} \
    CONFIG.PCW_MIO_26_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_26_PULLUP {enabled} \
    CONFIG.PCW_MIO_26_SLEW {fast} \
    CONFIG.PCW_MIO_27_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_27_PULLUP {enabled} \
    CONFIG.PCW_MIO_27_SLEW {fast} \
    CONFIG.PCW_MIO_28_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_28_PULLUP {enabled} \
    CONFIG.PCW_MIO_28_SLEW {fast} \
    CONFIG.PCW_MIO_29_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_29_PULLUP {enabled} \
    CONFIG.PCW_MIO_29_SLEW {fast} \
    CONFIG.PCW_MIO_2_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_2_SLEW {slow} \
    CONFIG.PCW_MIO_30_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_30_PULLUP {enabled} \
    CONFIG.PCW_MIO_30_SLEW {fast} \
    CONFIG.PCW_MIO_31_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_31_PULLUP {enabled} \
    CONFIG.PCW_MIO_31_SLEW {fast} \
    CONFIG.PCW_MIO_32_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_32_PULLUP {enabled} \
    CONFIG.PCW_MIO_32_SLEW {fast} \
    CONFIG.PCW_MIO_33_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_33_PULLUP {enabled} \
    CONFIG.PCW_MIO_33_SLEW {fast} \
    CONFIG.PCW_MIO_34_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_34_PULLUP {enabled} \
    CONFIG.PCW_MIO_34_SLEW {fast} \
    CONFIG.PCW_MIO_35_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_35_PULLUP {enabled} \
    CONFIG.PCW_MIO_35_SLEW {fast} \
    CONFIG.PCW_MIO_36_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_36_PULLUP {enabled} \
    CONFIG.PCW_MIO_36_SLEW {fast} \
    CONFIG.PCW_MIO_37_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_37_PULLUP {enabled} \
    CONFIG.PCW_MIO_37_SLEW {fast} \
    CONFIG.PCW_MIO_38_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_38_PULLUP {enabled} \
    CONFIG.PCW_MIO_38_SLEW {fast} \
    CONFIG.PCW_MIO_39_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_39_PULLUP {enabled} \
    CONFIG.PCW_MIO_39_SLEW {fast} \
    CONFIG.PCW_MIO_3_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_3_SLEW {slow} \
    CONFIG.PCW_MIO_40_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_40_PULLUP {enabled} \
    CONFIG.PCW_MIO_40_SLEW {slow} \
    CONFIG.PCW_MIO_41_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_41_PULLUP {enabled} \
    CONFIG.PCW_MIO_41_SLEW {slow} \
    CONFIG.PCW_MIO_42_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_42_PULLUP {enabled} \
    CONFIG.PCW_MIO_42_SLEW {slow} \
    CONFIG.PCW_MIO_43_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_43_PULLUP {enabled} \
    CONFIG.PCW_MIO_43_SLEW {slow} \
    CONFIG.PCW_MIO_44_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_44_PULLUP {enabled} \
    CONFIG.PCW_MIO_44_SLEW {slow} \
    CONFIG.PCW_MIO_45_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_45_PULLUP {enabled} \
    CONFIG.PCW_MIO_45_SLEW {slow} \
    CONFIG.PCW_MIO_46_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_46_PULLUP {enabled} \
    CONFIG.PCW_MIO_46_SLEW {slow} \
    CONFIG.PCW_MIO_47_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_47_PULLUP {enabled} \
    CONFIG.PCW_MIO_47_SLEW {slow} \
    CONFIG.PCW_MIO_48_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_48_PULLUP {enabled} \
    CONFIG.PCW_MIO_48_SLEW {slow} \
    CONFIG.PCW_MIO_49_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_49_PULLUP {enabled} \
    CONFIG.PCW_MIO_49_SLEW {slow} \
    CONFIG.PCW_MIO_4_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_4_SLEW {slow} \
    CONFIG.PCW_MIO_50_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_50_PULLUP {enabled} \
    CONFIG.PCW_MIO_50_SLEW {slow} \
    CONFIG.PCW_MIO_51_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_51_PULLUP {enabled} \
    CONFIG.PCW_MIO_51_SLEW {slow} \
    CONFIG.PCW_MIO_52_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_52_PULLUP {enabled} \
    CONFIG.PCW_MIO_52_SLEW {slow} \
    CONFIG.PCW_MIO_53_IOTYPE {LVCMOS 1.8V} \
    CONFIG.PCW_MIO_53_PULLUP {enabled} \
    CONFIG.PCW_MIO_53_SLEW {slow} \
    CONFIG.PCW_MIO_5_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_5_SLEW {slow} \
    CONFIG.PCW_MIO_6_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_6_SLEW {slow} \
    CONFIG.PCW_MIO_7_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_7_SLEW {slow} \
    CONFIG.PCW_MIO_8_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_8_SLEW {slow} \
    CONFIG.PCW_MIO_9_IOTYPE {LVCMOS 3.3V} \
    CONFIG.PCW_MIO_9_PULLUP {enabled} \
    CONFIG.PCW_MIO_9_SLEW {slow} \
    CONFIG.PCW_MIO_TREE_PERIPHERALS {GPIO#Quad SPI Flash#Quad SPI Flash#Quad SPI Flash#Quad SPI Flash#Quad SPI Flash#Quad SPI Flash#GPIO#Quad SPI Flash#GPIO#GPIO#GPIO#GPIO#GPIO#GPIO#GPIO#Enet 0#Enet 0#Enet\
0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#Enet 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#USB 0#SD 0#SD 0#SD 0#SD 0#SD 0#SD 0#USB Reset#SD 0#UART 1#UART 1#GPIO#GPIO#Enet\
0#Enet 0} \
    CONFIG.PCW_MIO_TREE_SIGNALS {gpio[0]#qspi0_ss_b#qspi0_io[0]#qspi0_io[1]#qspi0_io[2]#qspi0_io[3]/HOLD_B#qspi0_sclk#gpio[7]#qspi_fbclk#gpio[9]#gpio[10]#gpio[11]#gpio[12]#gpio[13]#gpio[14]#gpio[15]#tx_clk#txd[0]#txd[1]#txd[2]#txd[3]#tx_ctl#rx_clk#rxd[0]#rxd[1]#rxd[2]#rxd[3]#rx_ctl#data[4]#dir#stp#nxt#data[0]#data[1]#data[2]#data[3]#clk#data[5]#data[6]#data[7]#clk#cmd#data[0]#data[1]#data[2]#data[3]#reset#cd#tx#rx#gpio[50]#gpio[51]#mdc#mdio}\
\
    CONFIG.PCW_OVERRIDE_BASIC_CLOCK {0} \
    CONFIG.PCW_PACKAGE_DDR_BOARD_DELAY0 {0.221} \
    CONFIG.PCW_PACKAGE_DDR_BOARD_DELAY1 {0.222} \
    CONFIG.PCW_PACKAGE_DDR_BOARD_DELAY2 {0.217} \
    CONFIG.PCW_PACKAGE_DDR_BOARD_DELAY3 {0.244} \
    CONFIG.PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_0 {-0.050} \
    CONFIG.PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_1 {-0.044} \
    CONFIG.PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_2 {-0.035} \
    CONFIG.PCW_PACKAGE_DDR_DQS_TO_CLK_DELAY_3 {-0.100} \
    CONFIG.PCW_PCAP_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_PCAP_PERIPHERAL_FREQMHZ {200} \
    CONFIG.PCW_PJTAG_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_PLL_BYPASSMODE_ENABLE {0} \
    CONFIG.PCW_PRESET_BANK0_VOLTAGE {LVCMOS 3.3V} \
    CONFIG.PCW_PRESET_BANK1_VOLTAGE {LVCMOS 1.8V} \
    CONFIG.PCW_QSPI_GRP_FBCLK_ENABLE {1} \
    CONFIG.PCW_QSPI_GRP_FBCLK_IO {MIO 8} \
    CONFIG.PCW_QSPI_GRP_IO1_ENABLE {0} \
    CONFIG.PCW_QSPI_GRP_SINGLE_SS_ENABLE {1} \
    CONFIG.PCW_QSPI_GRP_SINGLE_SS_IO {MIO 1 .. 6} \
    CONFIG.PCW_QSPI_GRP_SS1_ENABLE {0} \
    CONFIG.PCW_QSPI_INTERNAL_HIGHADDRESS {0xFCFFFFFF} \
    CONFIG.PCW_QSPI_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_QSPI_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_QSPI_PERIPHERAL_FREQMHZ {200} \
    CONFIG.PCW_QSPI_QSPI_IO {MIO 1 .. 6} \
    CONFIG.PCW_SD0_GRP_CD_ENABLE {1} \
    CONFIG.PCW_SD0_GRP_CD_IO {MIO 47} \
    CONFIG.PCW_SD0_GRP_POW_ENABLE {0} \
    CONFIG.PCW_SD0_GRP_WP_ENABLE {0} \
    CONFIG.PCW_SD0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_SD0_SD0_IO {MIO 40 .. 45} \
    CONFIG.PCW_SDIO_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_SDIO_PERIPHERAL_FREQMHZ {50} \
    CONFIG.PCW_SDIO_PERIPHERAL_VALID {1} \
    CONFIG.PCW_SINGLE_QSPI_DATA_MODE {x4} \
    CONFIG.PCW_SMC_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_TPIU_PERIPHERAL_CLKSRC {External} \
    CONFIG.PCW_UART0_PERIPHERAL_ENABLE {0} \
    CONFIG.PCW_UART1_BAUD_RATE {115200} \
    CONFIG.PCW_UART1_GRP_FULL_ENABLE {0} \
    CONFIG.PCW_UART1_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_UART1_UART1_IO {MIO 48 .. 49} \
    CONFIG.PCW_UART_PERIPHERAL_CLKSRC {IO PLL} \
    CONFIG.PCW_UART_PERIPHERAL_FREQMHZ {100} \
    CONFIG.PCW_UART_PERIPHERAL_VALID {1} \
    CONFIG.PCW_UIPARAM_ACT_DDR_FREQ_MHZ {533.333374} \
    CONFIG.PCW_UIPARAM_DDR_ADV_ENABLE {0} \
    CONFIG.PCW_UIPARAM_DDR_AL {0} \
    CONFIG.PCW_UIPARAM_DDR_BL {8} \
    CONFIG.PCW_UIPARAM_DDR_BOARD_DELAY0 {0.221} \
    CONFIG.PCW_UIPARAM_DDR_BOARD_DELAY1 {0.222} \
    CONFIG.PCW_UIPARAM_DDR_BOARD_DELAY2 {0.217} \
    CONFIG.PCW_UIPARAM_DDR_BOARD_DELAY3 {0.244} \
    CONFIG.PCW_UIPARAM_DDR_BUS_WIDTH {32 Bit} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_0_LENGTH_MM {18.8} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_0_PACKAGE_LENGTH {80.4535} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_0_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_1_LENGTH_MM {18.8} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_1_PACKAGE_LENGTH {80.4535} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_1_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_2_LENGTH_MM {18.8} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_2_PACKAGE_LENGTH {80.4535} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_2_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_3_LENGTH_MM {18.8} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_3_PACKAGE_LENGTH {80.4535} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_3_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_CLOCK_STOP_EN {0} \
    CONFIG.PCW_UIPARAM_DDR_DQS_0_LENGTH_MM {22.8} \
    CONFIG.PCW_UIPARAM_DDR_DQS_0_PACKAGE_LENGTH {105.056} \
    CONFIG.PCW_UIPARAM_DDR_DQS_0_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQS_1_LENGTH_MM {27.9} \
    CONFIG.PCW_UIPARAM_DDR_DQS_1_PACKAGE_LENGTH {66.904} \
    CONFIG.PCW_UIPARAM_DDR_DQS_1_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQS_2_LENGTH_MM {22.9} \
    CONFIG.PCW_UIPARAM_DDR_DQS_2_PACKAGE_LENGTH {89.1715} \
    CONFIG.PCW_UIPARAM_DDR_DQS_2_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQS_3_LENGTH_MM {29.4} \
    CONFIG.PCW_UIPARAM_DDR_DQS_3_PACKAGE_LENGTH {113.63} \
    CONFIG.PCW_UIPARAM_DDR_DQS_3_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_0 {-0.050} \
    CONFIG.PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_1 {-0.044} \
    CONFIG.PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_2 {-0.035} \
    CONFIG.PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_3 {-0.100} \
    CONFIG.PCW_UIPARAM_DDR_DQ_0_LENGTH_MM {22.8} \
    CONFIG.PCW_UIPARAM_DDR_DQ_0_PACKAGE_LENGTH {98.503} \
    CONFIG.PCW_UIPARAM_DDR_DQ_0_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQ_1_LENGTH_MM {27.9} \
    CONFIG.PCW_UIPARAM_DDR_DQ_1_PACKAGE_LENGTH {68.5855} \
    CONFIG.PCW_UIPARAM_DDR_DQ_1_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQ_2_LENGTH_MM {22.9} \
    CONFIG.PCW_UIPARAM_DDR_DQ_2_PACKAGE_LENGTH {90.295} \
    CONFIG.PCW_UIPARAM_DDR_DQ_2_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_DQ_3_LENGTH_MM {29.4} \
    CONFIG.PCW_UIPARAM_DDR_DQ_3_PACKAGE_LENGTH {103.977} \
    CONFIG.PCW_UIPARAM_DDR_DQ_3_PROPOGATION_DELAY {160} \
    CONFIG.PCW_UIPARAM_DDR_ENABLE {1} \
    CONFIG.PCW_UIPARAM_DDR_FREQ_MHZ {533.333333} \
    CONFIG.PCW_UIPARAM_DDR_HIGH_TEMP {Normal (0-85)} \
    CONFIG.PCW_UIPARAM_DDR_MEMORY_TYPE {DDR 3 (Low Voltage)} \
    CONFIG.PCW_UIPARAM_DDR_PARTNO {MT41K256M16 RE-125} \
    CONFIG.PCW_UIPARAM_DDR_TRAIN_DATA_EYE {1} \
    CONFIG.PCW_UIPARAM_DDR_TRAIN_READ_GATE {1} \
    CONFIG.PCW_UIPARAM_DDR_TRAIN_WRITE_LEVEL {1} \
    CONFIG.PCW_UIPARAM_DDR_USE_INTERNAL_VREF {0} \
    CONFIG.PCW_USB0_PERIPHERAL_ENABLE {1} \
    CONFIG.PCW_USB0_RESET_ENABLE {1} \
    CONFIG.PCW_USB0_RESET_IO {MIO 46} \
    CONFIG.PCW_USB0_USB0_IO {MIO 28 .. 39} \
    CONFIG.PCW_USB_RESET_ENABLE {1} \
    CONFIG.PCW_USB_RESET_POLARITY {Active Low} \
    CONFIG.PCW_USB_RESET_SELECT {Share reset pin} \
    CONFIG.PCW_USE_AXI_NONSECURE {0} \
    CONFIG.PCW_USE_CROSS_TRIGGER {0} \
    CONFIG.PCW_USE_M_AXI_GP0 {0} \
  ] $processing_system7_0


  # Create instance: rst_ps7_0_100M, and set properties
  set rst_ps7_0_100M [ create_bd_cell -type ip -vlnv xilinx.com:ip:proc_sys_reset:5.0 rst_ps7_0_100M ]

  # Create instance: xlslice_0, and set properties
  set xlslice_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_0 ]
  set_property -dict [list \
    CONFIG.DIN_FROM {25} \
    CONFIG.DIN_TO {25} \
    CONFIG.DIN_WIDTH {26} \
  ] $xlslice_0


  # Create interface connections
  connect_bd_intf_net -intf_net microblaze_0_axi_dp [get_bd_intf_pins microblaze_0/M_AXI_DP] [get_bd_intf_pins microblaze_0_axi_periph/S00_AXI]
  connect_bd_intf_net -intf_net microblaze_0_axi_periph_M01_AXI [get_bd_intf_pins axi_timer_0/S_AXI] [get_bd_intf_pins microblaze_0_axi_periph/M01_AXI]
  connect_bd_intf_net -intf_net microblaze_0_axi_periph_M02_AXI [get_bd_intf_pins axi_gpio_0/S_AXI] [get_bd_intf_pins microblaze_0_axi_periph/M02_AXI]
  connect_bd_intf_net -intf_net microblaze_0_debug [get_bd_intf_pins mdm_1/MBDEBUG_0] [get_bd_intf_pins microblaze_0/DEBUG]
  connect_bd_intf_net -intf_net microblaze_0_dlmb_1 [get_bd_intf_pins microblaze_0/DLMB] [get_bd_intf_pins microblaze_0_local_memory/DLMB]
  connect_bd_intf_net -intf_net microblaze_0_ilmb_1 [get_bd_intf_pins microblaze_0/ILMB] [get_bd_intf_pins microblaze_0_local_memory/ILMB]
  connect_bd_intf_net -intf_net microblaze_0_intc_axi [get_bd_intf_pins microblaze_0_axi_intc/s_axi] [get_bd_intf_pins microblaze_0_axi_periph/M00_AXI]
  connect_bd_intf_net -intf_net microblaze_0_interrupt [get_bd_intf_pins microblaze_0/INTERRUPT] [get_bd_intf_pins microblaze_0_axi_intc/interrupt]
  connect_bd_intf_net -intf_net processing_system7_0_DDR [get_bd_intf_ports DDR] [get_bd_intf_pins processing_system7_0/DDR]
  connect_bd_intf_net -intf_net processing_system7_0_FIXED_IO [get_bd_intf_ports FIXED_IO] [get_bd_intf_pins processing_system7_0/FIXED_IO]

  # Create port connections
  connect_bd_net -net axi_gpio_0_gpio_io_o [get_bd_ports ld2_0] [get_bd_pins axi_gpio_0/gpio_io_o]
  connect_bd_net -net axi_timer_0_interrupt [get_bd_pins axi_timer_0/interrupt] [get_bd_pins microblaze_0_axi_intc/intr]
  connect_bd_net -net c_counter_binary_0_Q [get_bd_pins c_counter_binary_0/Q] [get_bd_pins xlslice_0/Din]
  connect_bd_net -net mdm_1_debug_sys_rst [get_bd_pins mdm_1/Debug_SYS_Rst] [get_bd_pins rst_ps7_0_100M/mb_debug_sys_rst]
  connect_bd_net -net microblaze_0_Clk [get_bd_pins axi_gpio_0/s_axi_aclk] [get_bd_pins axi_timer_0/s_axi_aclk] [get_bd_pins c_counter_binary_0/CLK] [get_bd_pins microblaze_0/Clk] [get_bd_pins microblaze_0_axi_intc/processor_clk] [get_bd_pins microblaze_0_axi_intc/s_axi_aclk] [get_bd_pins microblaze_0_axi_periph/ACLK] [get_bd_pins microblaze_0_axi_periph/M00_ACLK] [get_bd_pins microblaze_0_axi_periph/M01_ACLK] [get_bd_pins microblaze_0_axi_periph/M02_ACLK] [get_bd_pins microblaze_0_axi_periph/S00_ACLK] [get_bd_pins microblaze_0_local_memory/LMB_Clk] [get_bd_pins processing_system7_0/FCLK_CLK0] [get_bd_pins rst_ps7_0_100M/slowest_sync_clk]
  connect_bd_net -net processing_system7_0_FCLK_RESET0_N [get_bd_pins processing_system7_0/FCLK_RESET0_N] [get_bd_pins rst_ps7_0_100M/ext_reset_in]
  connect_bd_net -net rst_ps7_0_100M_bus_struct_reset [get_bd_pins microblaze_0_local_memory/SYS_Rst] [get_bd_pins rst_ps7_0_100M/bus_struct_reset]
  connect_bd_net -net rst_ps7_0_100M_mb_reset [get_bd_pins microblaze_0/Reset] [get_bd_pins microblaze_0_axi_intc/processor_rst] [get_bd_pins rst_ps7_0_100M/mb_reset]
  connect_bd_net -net rst_ps7_0_100M_peripheral_aresetn [get_bd_pins axi_gpio_0/s_axi_aresetn] [get_bd_pins axi_timer_0/s_axi_aresetn] [get_bd_pins microblaze_0_axi_intc/s_axi_aresetn] [get_bd_pins microblaze_0_axi_periph/ARESETN] [get_bd_pins microblaze_0_axi_periph/M00_ARESETN] [get_bd_pins microblaze_0_axi_periph/M01_ARESETN] [get_bd_pins microblaze_0_axi_periph/M02_ARESETN] [get_bd_pins microblaze_0_axi_periph/S00_ARESETN] [get_bd_pins rst_ps7_0_100M/peripheral_aresetn]
  connect_bd_net -net xlslice_0_Dout [get_bd_ports ld3] [get_bd_pins xlslice_0/Dout]

  # Create address segments
  assign_bd_address -offset 0x40000000 -range 0x00010000 -target_address_space [get_bd_addr_spaces microblaze_0/Data] [get_bd_addr_segs axi_gpio_0/S_AXI/Reg] -force
  assign_bd_address -offset 0x41C00000 -range 0x00010000 -target_address_space [get_bd_addr_spaces microblaze_0/Data] [get_bd_addr_segs axi_timer_0/S_AXI/Reg] -force
  assign_bd_address -offset 0x00000000 -range 0x00004000 -target_address_space [get_bd_addr_spaces microblaze_0/Data] [get_bd_addr_segs microblaze_0_local_memory/dlmb_bram_if_cntlr/SLMB/Mem] -force
  assign_bd_address -offset 0x41200000 -range 0x00010000 -target_address_space [get_bd_addr_spaces microblaze_0/Data] [get_bd_addr_segs microblaze_0_axi_intc/S_AXI/Reg] -force
  assign_bd_address -offset 0x00000000 -range 0x00004000 -target_address_space [get_bd_addr_spaces microblaze_0/Instruction] [get_bd_addr_segs microblaze_0_local_memory/ilmb_bram_if_cntlr/SLMB/Mem] -force


  # Restore current instance
  current_bd_instance $oldCurInst

  validate_bd_design
  save_bd_design
}
# End of create_root_design()


##################################################################
# MAIN FLOW
##################################################################

create_root_design ""

  1. 2023年03月23日 04:57 |
  2. FPGAを使用したシステム
  3. | トラックバック:0
  4. | コメント:0

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる3

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる2”の続き。

Vitis アクセラレーション・プラットホームを使用してハードウェアを完成させ、それを自作アプリケーション・ソフトウェアで動作させてみたいということで、前回は、PL デザインの pl.dtsi を生成し、pl.dtsi 上の動作させる IP の compatible を generic-uio に変更して、コンパイルして pl.dtbo を生成した。今回は、ip_vadd2_file_transfer ディレクトリを作成し、ファイルを集めて、KR260 の Petalinux に転送した。そして、現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd2 をロードしたが、Vitis で生成された krnl_vadd IP は uio として生成されなかった。

最初に KR260/kr260_custom_platform/kr260_custom_platform/ip_vadd2_file_transfer を作成する。
mkdir ip_vadd2_file_transfer

KR260/kr260_custom_platform/kr260_custom_platform/dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo を ip_vadd2_file_transfer ディレクトリにコピーした。

KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd2_system/Hardware/binary_container_1.xclbin を ip_vadd2_file_transfer ディレクトリにコピーした。

shell.json は以前作成したファイルがある。
ip_vadd_file_transfer ディレクトリからコピーした。

ip_vadd2_file_transfer ディレクトリの様子を示す。
KR260_404_230322.png

KR260 で Petalinux 2022.1 を起動した。
ホーム・ディレクトリに kr260_ip_vadd2 ディレクトリを作成し、移動した。
mkdir kr260_ip_vadd2
cd kr260_ip_vadd2


FileZilla を起動して、KR260 の Petalinux 2022.1 へ SFTP で ip_vadd2_file_transfer ディレクトリのファイルを kr260_ip_vadd2 ディレクトリに転送した。
KR260_405_230322.png

/lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリを作成した。
sudo mkdir /lib/firmware/xilinx/kr260_ip_vadd2

binary_container_1.xclbin の名前を binary_container_1.bin に変更する。こうしないと、XRT は FPGA ビットストリームを抽出して Kria のプログラマブル ロジックをコンフィグレーションすることができないそうだ。
mv binary_container_1.xclbin binary_container_1.bin

pl.dtbo binary_container_1.bin shell.json ファイルを /lib/firmware/xilinx/kr260_ip_vadd2 ディレクトリにコピーした。
sudo cp pl.dtbo binary_container_1.bin shell.json /lib/firmware/xilinx//kr260_ip_vadd2

現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd2 をロードする。
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip_vadd2

KR260_406_230322.png

/sys/class/uio ディレクトリに uio4 〜 uio8 が増えた。
uio9 は無かった。
KR260_407_230322.png

/sys/class/uio/uio4 ディレクトリの name は DMA_pow2 だった。
uio5 の name は dma だった。
uio6 の name は interrupt-controller だった。
uio7 の name は timer だった。
uio8 の name は multi_axi4ls だった。

krnl_vadd は無かった。残念。。。

なお、Vivado の prj プロジェクトの kr260_bd_wrapper.bin ファイル(KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd2_system_hw_link/Hardware/binary_container_1.build/link/vivado/vpl/prj/prj.runs/impl_1 ディレクトリ)を binary_container_1.bin の代わりに試してみたが、やはり、krnl_vadd は無かった。

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させるのに失敗した。残念。
  1. 2023年03月22日 04:52 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる2

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる1”の続き。

Vitis アクセラレーション・プラットホームを使用してハードウェアを完成させ、それを自作アプリケーション・ソフトウェアで動作させてみたいということで、前回は、kr260_custom アクセラレーション・プラットホームを使用して、vadd サンプル・アプリケーション・プロジェクトを作成し、ホスト・ソフトウェアの vadd.cpp の main() 関数内を削除して、ビルドしたところ成功した。生成された Vivado プロジェクトを確認して、ハードウェアをエクスポートした。今回は、PL デザインの pl.dtsi を生成し、pl.dtsi 上の動作させる IP の compatible を generic-uio に変更して、コンパイルして pl.dtbo を生成した。

KR260/kr260_custom_platform/kr260_custom_platform ディレクトリに移動する。
xsct を使って、AXI GPIO デザイン用にオーバレイ・ノードを含むデバイスツリー・ソースコードを用意する。
xsct

createdts -hw /media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd2_system_hw_link/Hardware/binary_container_1.build/link/vivado/vpl/prj/kr260_custom.xsa -zocl -platform-name kr260_custom -git-branch xlnx_rel_v2022.1 -overlay -compile -out ./dtg/dtg_kr260_ip_vadd

exit

KR260_398_230319.png

KR260/kr260_custom_platform/kr260_custom_platform/dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp ディレクトリに pl.dtsi が生成された。
KR260_399_230319.png

createdts を実行した際のログを示す。

(base) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform$ xsct
rlwrap: warning: your $TERM is 'xterm-256color' but rlwrap couldn't find it in the terminfo database. Expect some problems.
                                                                                
****** Xilinx Software Commandline Tool (XSCT) v2022.1.0
  **** SW Build 3524075 on 2022-04-13-17:42:45
    ** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.


xsct% createdts -hw /media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd2_system_hw_link/Hardware/binary_container_1.build/link/vivado/vpl/prj/kr260_custom.xsa -zocl -platform-name kr260_custom -git-branch xlnx_rel_v2022.1 -overlay -compile -out ./dtg/dtg_kr260_ip_vadd
INFO: DTG repo already exists at /media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform/dtg/dtg_kr260_ip_vadd/device-tree-xlnx
/media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform/dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/device-tree-xlnx
INFO: [Hsi 55-2053] elapsed time for repository (/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2022.1/data/embeddedsw) loading 0 seconds
hsi::open_hw_design: Time (s): cpu = 00:00:09 ; elapsed = 00:00:09 . Memory (MB): peak = 2348.008 ; gain = 0.000 ; free physical = 1481 ; free virtual = 31607
INFO: Creating platform kr260_custom at ./dtg/dtg_kr260_ip_vadd                 
Opening the hardware design, this may take few seconds.
INFO: Populating the default qemu data for the domain "device_tree_domain" from the install location /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2022.1/data/emulation/platforms/zynqmp/sw/a53_standalone/qemu/
WARNING: Interrupt pin "interrupt" of IP block: "DMA_pow2_0" is not connected to any interrupt controller

WARNING: Interrupt pin "mm2s_introut" of IP block: "axi_dma_0" is not connected to any interrupt controller

WARNING: Interrupt pin "s2mm_introut" of IP block: "axi_dma_0" is not connected to any interrupt controller

WARNING: Interrupt pin "interrupt" of IP block: "axi_timer_0" is not connected to any interrupt controller

WARNING: no s_axi_aclk for clockwizard IP block: " clk_wiz_0"                   

WARNING: Clock pin "ap_clk" of IP block "krnl_vadd_1" is not connected to any of the pl_clk"

WARNING: Interrupt pin "interrupt" of IP block: "multi_axi4ls_0" is not connected to any interrupt controller

zocl:false                                                                      
ext_platform:
WARNING: axi_dma_0 connected ip is NULL for the pin M_AXIS_MM2S                 
WARNING: axi_dma_0 connected ip is NULL for the pin M_AXIS_MM2S
WARNING: ERROR: axi_dma_0: mm2s_introut port is not connected
WARNING: ERROR: axi_dma_0: s2mm_introut port is not connected
WARNING: label 'usb0' found in existing tree                                    
WARNING: label 'usb1' found in existing tree
INFO: Generating device tree                                                    
WARNING: Interrupt pin "interrupt" of IP block: "DMA_pow2_0" is not connected to any interrupt controller

WARNING: Interrupt pin "mm2s_introut" of IP block: "axi_dma_0" is not connected to any interrupt controller

WARNING: Interrupt pin "s2mm_introut" of IP block: "axi_dma_0" is not connected to any interrupt controller

WARNING: Interrupt pin "interrupt" of IP block: "axi_timer_0" is not connected to any interrupt controller

WARNING: no s_axi_aclk for clockwizard IP block: " clk_wiz_0"                   

WARNING: Clock pin "ap_clk" of IP block "krnl_vadd_1" is not connected to any of the pl_clk"

WARNING: Interrupt pin "interrupt" of IP block: "multi_axi4ls_0" is not connected to any interrupt controller

zocl:true                                                                       
ext_platform:
intr_ctrl_len:1
WARNING: axi_dma_0 connected ip is NULL for the pin M_AXIS_MM2S                 
WARNING: axi_dma_0 connected ip is NULL for the pin M_AXIS_MM2S
WARNING: ERROR: axi_dma_0: mm2s_introut port is not connected
WARNING: ERROR: axi_dma_0: s2mm_introut port is not connected
WARNING: label 'usb0' found in existing tree                                    
WARNING: label 'usb1' found in existing tree                                    
Building the BSP Library for domain  - device_tree_domain on processor psu_cortexa53_0
make: Nothing to be done for 'all'.

system-top.dts:24.9-27.4: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
zynqmp.dtsi:811.43-815.6: Warning (pci_device_reg): /axi/pcie@fd0e0000/legacy-interrupt-controller: missing PCI reg property
xsct% exit                                                                      
                                                                                
(base) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform$ 



pl.dtsi の一部を示す。
KR260_400_230319.png

pl.dtsi で動作させる可能性のある IP の compatible を generic-uio に変更した。
KR260_401_230320.png

変更した pl.dtsi を示す。

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version: XSCT 2022.1
 * Today is: Sun Mar 19 19:55:06 2023
 */


/dts-v1/;
/plugin/;
/ {
    fragment@0 {
        target = <&fpga_full>;
        overlay0: __overlay__ {
            #address-cells = <2>;
            #size-cells = <2>;
            firmware-name = "kr260_custom.bit.bin";
            resets = <&zynqmp_reset 116>, <&zynqmp_reset 117>, <&zynqmp_reset 118>, <&zynqmp_reset 119>;
        };
    };
    fragment@1 {
        target = <&amba>;
        overlay1: __overlay__ {
            afi0: afi0 {
                compatible = "xlnx,afi-fpga";
                config-afi = < 0 0>, <1 0>, <2 0>, <3 0>, <4 0>, <5 0>, <6 0>, <7 0>, <8 0>, <9 0>, <10 0>, <11 0>, <12 0>, <13 0>, <14 0xa00>, <15 0x000>;
            };
            clocking0: clocking0 {
                #clock-cells = <0>;
                assigned-clock-rates = <99999001>;
                assigned-clocks = <&zynqmp_clk 71>;
                clock-output-names = "fabric_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,fclk";
            };
            clocking1: clocking1 {
                #clock-cells = <0>;
                assigned-clock-rates = <99999001>;
                assigned-clocks = <&zynqmp_clk 72>;
                clock-output-names = "fabric_clk";
                clocks = <&zynqmp_clk 72>;
                compatible = "xlnx,fclk";
            };
        };
    };
    fragment@2 {
        target = <&amba>;
        overlay2: __overlay__ {
            #address-cells = <2>;
            #size-cells = <2>;
            DMA_pow2_0: DMA_pow2@80070000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                clock-names = "ap_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80070000 0x0 0x10000>;
                xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;
            };
            PMOD_0: gpio@80010000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80010000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_1: gpio@80020000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80020000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_2: gpio@80030000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80030000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_3: gpio@80040000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80040000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            axi_dma_0: dma@80050000 {
                #dma-cells = <1>;
                clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
                clocks = <&zynqmp_clk 71>, <&zynqmp_clk 71>, <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80050000 0x0 0x10000>;
                xlnx,addrwidth = <0x20>;
                xlnx,sg-length-width = <0xe>;
                dma-channel@80050000 {
                    compatible = "xlnx,axi-dma-mm2s-channel";
                    dma-channels = <0x1>;
                    xlnx,datawidth = <0x20>;
                    xlnx,device-id = <0x0>;
                };
                dma-channel@80050030 {
                    compatible = "xlnx,axi-dma-s2mm-channel";
                    dma-channels = <0x1>;
                    xlnx,datawidth = <0x20>;
                    xlnx,device-id = <0x0>;
                };
            };
            axi_intc_0: interrupt-controller@80000000 {
                #interrupt-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                interrupt-controller ;
                interrupt-names = "irq";
                interrupt-parent = <&gic>;
                interrupts = <0 89 4>;
                reg = <0x0 0x80000000 0x0 0x10000>;
                xlnx,kind-of-intr = <0xfffffffd>;
                xlnx,num-intr-inputs = <0x20>;
            };
            axi_timer_0: timer@80060000 {
                clock-frequency = <99999001>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80060000 0x0 0x10000>;
                xlnx,count-width = <0x20>;
                xlnx,gen0-assert = <0x1>;
                xlnx,gen1-assert = <0x1>;
                xlnx,one-timer-only = <0x0>;
                xlnx,trig0-assert = <0x1>;
                xlnx,trig1-assert = <0x1>;
            };
            krnl_vadd_1: krnl_vadd@b0000000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                clock-names = "ap_clk";
                clocks = <&misc_clk_0>;
                compatible = "generic-uio";
                interrupt-names = "interrupt";
                interrupt-parent = <&axi_intc_0>;
                interrupts = <1 2>;
                reg = <0x0 0xb0000000 0x0 0x10000>;
                xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;
            };
            misc_clk_0: misc_clk_0 {
                #clock-cells = <0>;
                clock-frequency = <199998000>;
                compatible = "fixed-clock";
            };
            multi_axi4ls_0: multi_axi4ls@80080000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                clock-names = "ap_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80080000 0x0 0x10000>;
                xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;
            };
            zyxclmm_drm {
                compatible = "xlnx,zocl";
                interrupts-extended = <&axi_intc_0 0 4>, <&axi_intc_0 1 4>, <&axi_intc_0 2 4>, <&axi_intc_0 3 4>, <&axi_intc_0 4 4>, <&axi_intc_0 5 4>, <&axi_intc_0 6 4>, <&axi_intc_0 7 4>, <&axi_intc_0 8 4>, <&axi_intc_0 9 4>,
<&axi_intc_0 10 4>, <&axi_intc_0 11 4>, <&axi_intc_0 12 4>, <&axi_intc_0 13 4>, <&axi_intc_0 14 4>,
<&axi_intc_0 15 4>, <&axi_intc_0 16 4>, <&axi_intc_0 17 4>, <&axi_intc_0 18 4>, <&axi_intc_0 19 4>,
<&axi_intc_0 20 4>, <&axi_intc_0 21 4>, <&axi_intc_0 22 4>, <&axi_intc_0 23 4>, <&axi_intc_0 24 4>,
<&axi_intc_0 25 4>, <&axi_intc_0 26 4>, <&axi_intc_0 27 4>, <&axi_intc_0 28 4>, <&axi_intc_0 29 4>,
<&axi_intc_0 30 4>, <&axi_intc_0 31 4 >;
            };
        };
    };
};


変更した pl.dtsi をコンパイルして pl.dtbo を生成する。
dtc -@ -O dtb -o ./dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo ./dtg/dtg_kr260_ip_vadd/dtg/dtg_kr260_ip_vadd/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi
KR260_402_230320.png

ワーニングは出たが、pl.dtbo が生成された。
KR260_403_230320.png
  1. 2023年03月21日 04:35 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

Vitis アクセラレーション・プラットホームを使用してハードウェアを作り、それを自作アプリケーション・ソフトウェアで動作させる1

Vitis アクセラレーション・プラットホームを使用してハードウェアを完成させ、それを自作アプリケーション・ソフトウェアで動作させてみたいということで、今回は、kr260_custom アクセラレーション・プラットホームを使用して、vadd サンプル・アプリケーション・プロジェクトを作成し、ホスト・ソフトウェアの vadd.cpp の main() 関数内を削除して、ビルドしたところ成功した。生成された Vivado プロジェクトを確認して、ハードウェアをエクスポートした。

multi_axi4ls IP、DMA_pow2 IP などがハードウェア・プラットホームに入った kr260_custom アプリケーション・プラットホームが入っている従来使用している Vitis 2022.1 のワークスペースを使用する。

kr260_vadd2 というアプリケーション・ソフトウェア名で vadd サンプル・アプリケーションを作成する。
アプリケーション・ソフトウェアの作成方法は”KR260 で Vitis アクセラレーション・プラットフォームを作成する8”を参照した。
kr260_vadd2 アプリケーション・プロジェクトが作成された後、Vitis の Explorer ウインドウの kr260_vadd2_system -> kr260_vadd2 -> src -> vadd_cpp の int main(int argc, char* argv[]) の中身を return (0); のみに書き換えた。
これで、Vitis の Explorer ウインドウの kr260_vadd2_system をクリックしてビルドしたところ、ハードウェアを生成しているようだった。ビルドも成功した。
KR260_389_230319.png

Vivado のプロジェクトを見てみよう。
Vivado のプロジェクトは KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd2_system_hw_link/Hardware/binary_container_1.build/link/vivado/vpl/prj ディレクトリにある。
kr260_bd ブロック・デザインを示す。krnl_vadd_1 も実装されている。
KR260_390_230319.png

Address Editor 画面を示す。
KR260_391_230319.png

Vivado 上でハードウェアをエクスポートする。
File メニューから Export -> Export Platform... を選択する。
Export Hardware Platform ダイアログが開く。
Next > ボタンをクリックする。

Platform Type 画面では、Hardware ラジオボタンをクリックしてあることを確認した。
Next > ボタンをクリックする。
KR260_392_230319.png

Platform State 画面では Pre-synthesis のラジオボタンがクリックされていることを確認し、Include bitstream のチェックボックスをチェックする。
KR260_393_230319.png

Platform Properties 画面では、Name に kr260_custom_platform と入力されていることを確認した。
Next > ボタンをクリックする。
KR260_394_230319.png

Output File 画面では、XSA file name に kr260_custom と入力した。
Next > ボタンをクリックする。
KR260_395_230319.png

Exporting Hardware Platform 画面が表示された。
Finish ボタンをクリックした。
KR260_396_230319.png

kr260_custom.xsa ファイルが生成された。
KR260_397_230319.png
  1. 2023年03月20日 04:45 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

vadd.cpp を書き換えて、multi_axi4ls と DMA_pow2 も動作させる

IP を追加した kr260_ip 用の Vitis アクセラレーション・プラットホームをテストする”で vadd を動作させた環境で、multi_axi4ls と DMA_pow2_test アプリケーション・ソフトウェアも動作を確認できた。それでは、アクセラレーション・アプリケーションのホストのソフトウェアの vadd.cpp を書き換えて、multi_axi4ls と DMA_pow2 の動作を確認してみよう。当然ながら vadd も同時に動作させてみる。これができればハードウェア・プラットホーム上の IP を動作させながら、アクセラレーション・ハードウェアも同時に動作させることができる。結果は、問題なく動作した。

Vitis 2022.1 の kr260_vadd プロジェクトのホストのソフトウェアの vadd.cpp に multi_axi4ls と DMA_pow2_test アプリケーション・ソフトウェアを追加した。
KR260_383_230318.png

include 文の下に次のコードを追加した。(57 行付近)

// ---- Modified by marsee
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <sys/mman.h>

int32_t multi_calc(int32_t *multi_axi4ls, int32_t a, int32_t b){
    while((multi_axi4ls[0] &4) == 0) ; // wait ap_idle
    multi_axi4ls[6] = a; // reg a, 0x18
    multi_axi4ls[8] = b; // reg b, 0x20
    multi_axi4ls[0] = 1; // ap_start = 1
    while((multi_axi4ls[11] & 1) == 0) ; // wait c_ap_vld
    return(multi_axi4ls[10]);
}
// ---- Modified by marsee


int main(int argc, char* argv[]) { の直下に以下の行を追加した。

    // ---- Modified by marsee
    // muilti_axi4ls
    int uio8_fd;
    int32_t *multi_axi4ls;
    int32_t a, b, c;

    if((uio8_fd = open("/dev/uio8", O_RDWR)) == -1) {
        printf("Can not open /dev/uio8\n");
        exit(1);
    }
    multi_axi4ls = (int32_t*)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, uio8_fd, 0);

    for(a = 0, b = 1; a < 10; a++, b++){
        c = multi_calc(multi_axi4ls, a, b);
        printf("a = %d, b = %d, c = %d\n", a, b, c);
    }

    // DMA_pow2
    int uio4_fd;
    volatile int32_t *dma_pow2;
    volatile int32_t *data;
    int fd_udmabuf0;
    u_int32_t fd_paddr;
    unsigned char  attr[1024];
    unsigned long  phys_addr;

    // uio4, DMP_pow2
    if((uio4_fd = open("/dev/uio4", O_RDWR)) == -1) {
        printf("Can not open /dev/uio4\n");
        exit(1);
    }
    dma_pow2 = (volatile int32_t*)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, uio4_fd, 0);

    // udmabuf0
    fd_udmabuf0 = open("/dev/udmabuf0", O_RDWR | O_SYNC); // frame_buffer, The chache is disabled.
    if (fd_udmabuf0 == -1){
        fprintf(stderr, "/dev/udmabuf0 open errorn");
        exit(-1);
    }

    // phys_addr of udmabuf0
    fd_paddr = open("/sys/class/u-dma-buf/udmabuf0/phys_addr", O_RDONLY);
    if (fd_paddr == -1){
        fprintf(stderr, "/sys/class/u-dma-buf/udmabuf0/phys_addr open errorn");
        exit(-1);
    }
    /*read(fd_paddr, (void *)attr, 1024);
    sscanf((const char *)attr, "%lx", &phys_addr);
    close(fd_paddr);
    printf("phys_addr = %x\n", (unsigned int)phys_addr);
    */

    data = (volatile int32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd_udmabuf0, 0);
    if (data == MAP_FAILED){
        fprintf(stderr, "data mmap error\n");
        exit(-1);
    }

    // data Initialization
    for(int i=0; i<10; i++){
        data[i] = i;
    }

    // DMP_pow2 start
    while((dma_pow2[0] & 4) == 0) ; // wait ap_idle
    dma_pow2[6] = phys_addr; // in_r
    dma_pow2[8] = phys_addr + 10 * sizeof(int32_t); // out_r
    dma_pow2[0] = 1; // ap_start
    while((dma_pow2[0] & 2) == 0) ; // wait ap_done


    for(int i=0; i<10; i++){
        printf("in = %d, out = %d\n", data[i], data[i+10]);
    }
    // ---- Modified by marsee


これで、kr260_vadd_system をビルドして成功した。

KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd_system/Hardware/binary_container_1.xclbin が更新されていた。
KR260_384_230318.png

KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd/Hardware/kr260_vadd が更新されていた。
KR260_385_230318.png

binary_container_1.xclbin と kr260_vadd を KR260/kr260_custom_platform/kr260_custom_platform/dtg/ip_vadd_file_trasfer ディレクトリのファイルと入れ替えた。

KR260 の Petalinux を起動して、binary_container_1.xclbin と kr260_vadd を kr260_ip_vadd ディレクトリのファイルと入れ替えた。
KR260_386_230318.png

KR260 の Petalinux で、kr260_ip_vadd ディレクトリに移動して、binary_container_1.bin を削除した。
binary_container_1.xclbin の名前を binary_container_1.bin に変更し、pl.dtbo binary_container_1.bin ファイルを /lib/firmware/xilinx/kr260_ip_vadd ディレクトリにコピーした。(pl.dtbo をコピーする必要は無かった。更新していないので。)
現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd をロードする。
cd ~/kr260_ip_vadd
rm binary_container_1.bin
mv binary_container_1.xclbin binary_container_1.bin
sudo cp pl.dtbo binary_container_1.bin /lib/firmware/xilinx/kr260_ip_vadd
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip_vadd


u-dma-buf.ko をロードした。
/dev/uio* と /dev/udmabuf0 を読み書きモードに変更した。
kr260_vadd を実行したところ、multi_axi4ls と DMA_pow2 の動作が確認できると同時に vadd の動作も確認できた。
sudo chmod 666 /dev/uio*
cd
sudo insmod u-dma-buf.ko udmabuf0=0x10000
sudo chmod 666 /dev/udmabuf0
cd ~/kr260_ip_vadd
./kr260_vadd binary_container_1.bin

KR260_387_230318.png
KR260_388_230318.png

なお、pl.dtbo は”KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する7”で、ハードウェア・プラットホーム上の自分で追加した IP のデバイスツリー・ソースの compatible を generic-uio に書き換えてある。
  1. 2023年03月19日 05:07 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

IP を追加した kr260_ip 用の Vitis アクセラレーション・プラットホームをテストする

IP を追加した kr260_ip 用の Vitis アクセラレーション・プラットホームを作成する2”の続き。

KR260 の kr260_custom アクセラレーション・プラットホームを”IP を追加した kr260_ip 用の Vitis アクセラレーション・プラットホームを作成する2”で作成することができて、kr260_vadd アクセラレーション・アプリケーション・プロジェクトもビルドが成功した。今回は、kr260_vadd を KR260 で動作させてみよう。

最初に KR260/kr260_custom_platform/kr260_custom_platform/dtg/ip_vadd_file_trasfer ディレクトリを作成した。
KR260_374_230317.png

KR260/kr260_custom_platform/kr260_custom_platform/dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo を ip_vadd_file_trasfer ディレクトリにコピーした。
なお、pl.dtbo は”KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する7”で、ハードウェア・プラットホーム上の自分で追加した IP のデバイスツリー・ソースの compatible を generic-uio に書き換えてある。

KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd_system/Hardware/binary_container_1.xclbin を ip_vadd_file_trasfer にコピーした。

shell.json は以前作成したファイルがある。
KR260/kr260_custom_platform/kr260_custom_platform/dtg/ip_file_transfer ディレクトリから ip_vadd_file_trasfer ディレクトリにコピーした。
KR260_375_230318.png

KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd/Hardware/kr260_vadd を ip_vadd_file_trasfer ディレクトリにコピーした。

現在の ip_vadd_file_trasfer ディレクトリを示す。
KR260_376_230318.png

KR260 で Petalinux 2022.1 を起動した。
ホーム・ディレクトリに kr260_gpio_vadd ディレクトリを作成し、移動した。
mkdir kr260_ip_vadd
cd kr260_ip_vadd/


FileZilla を起動して、KR260 の Petalinux 2022.1 へ SFTP で ip_vadd_file_trasfer ディレクトリのファイルを kr260_ip_vadd ディレクトリに転送した。
KR260_377_230318.png

/lib/firmware/xilinx/kr260_ip_vadd ディレクトリを作成した。
sudo mkdir /lib/firmware/xilinx/kr260_ip_vadd

binary_container_1.xclbin の名前を binary_container_1.bin に変更する。こうしないと、XRT は FPGA ビットストリームを抽出して Kria のプログラマブル ロジックをコンフィグレーションすることができないそうだ。
mv binary_container_1.xclbin binary_container_1.bin

pl.dtbo binary_container_1.bin shell.json ファイルを /lib/firmware/xilinx/kr260_ip_vadd ディレクトリにコピーした。
sudo cp pl.dtbo binary_container_1.bin shell.json /lib/firmware/xilinx//kr260_ip_vadd

現在、ロードされているアクセラレーション・アプリケーションをアンロードして、kr260_ip_vadd をロードする。
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip_vadd

KR260_378_230318.png

kr260_vadd を実行したところ、”TEST PASSED”が表示されて、成功した。
./kr260_vadd binary_container_1.bin
KR260_379_230318.png

/dev ディレクトリを見ると、uio0 〜 uio8 までが実装されている。
ハードウェア・プラットホーム上の IP が実装されている。
KR260_380_230318.png

ハードウェア・プラットホーム上に実装した IP を動作させてみよう
まずは、multi_axi4ls IP を動作させてみよう。multi_axi4ls IP は AXI4-Lite インターフェース・ベースの乗算 IP だ。
IP を追加した KR260 の kr260_custom アクセラレーション・プラットホームで multi_axi4ls を動作させた”で vadd アクセラレーション・アプリケーションを追加しない前の状態では動作を確認してある。
cd ~/kr260_ip
sudo chmod 666 /dev/uio*
./multi_axi4ls

KR260_381_230318.png

multi_axi4ls IP は問題なく動作している。

次に、DMA_pow2 IP を動作させてみよう。DMA_pow2 IP は 2 乗を行う IP で、レジスタは AXI4-Lite インターフェースだが、演算されるデータは AXI4 Master でリードし、演算結果も AXI Master でライトする IP だ。
IP を追加した KR260 の kr260_custom アクセラレーション・プラットホームで DMA_pow2 IP を動作させた”で vadd アクセラレーション・アプリケーションを追加しない前の状態では動作を確認してある。
cd
sudo insmod u-dma-buf.ko udmabuf0=0x10000
cd ~/kr260_ip/DMA_pow2_test
sudo chmod 666 /dev/udmabuf0
./DMA_pow2_test

KR260_382_230318.png
  1. 2023年03月18日 07:42 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

IP を追加した kr260_ip 用の Vitis アクセラレーション・プラットホームを作成する2

IP を追加した kr260_ip 用の Vitis アクセラレーション・プラットホームを作成する1”の続き。

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する1”用の Vitis アクセラレーション・プラットホームを作成してみたいということで、前回は、sdk.sh と BOOT.bin を作成する。また、pfm/boot ディレクトリを更新し、sdk.sh を起動して、sysroot を更新した。今回は、kr260_custom アクセラレーション・プラットホームを更新したが、プラットホームをビルドし、kr260_vadd アプリケーション・プロジェクトをビルドしても、Vivado のブロック・デザインに追加した IP が実装されていなかった。次に、プラットホーム・プロジェクトとアプリケーション・プロジェクトを削除して、もう一度 kr260_custom アクセラレーション・プラットホームと kr260_vadd アプリケーション・プロジェクトをビルドしたところ、追加した IP が Vivado のブロック・デザインに追加されていた。

Vitis 2022.1 の settings64.sh は起動してある。
source /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2022.1/settings64.sh

Vitis 2022.1 を起動した。
vitis &

Vitis IDE Launcher ダイアログが表示された。
Workspace に KR260/kr260_custom_platform/kr260_custom_platform を指定した。
Launch ボタンをクリックした。
KR260_366_230316.png

Vitis 2022.1 が立ち上がった。
KR260 で Vitis アクセラレーション・プラットフォームを作成する7”で作成した kr260_custom アクセラレーション・プラットホームを更新する。
KR260_367_230316.png

Explorer の kr260_custom を右クリックし、右クリックメニューから Update Hardware Specification を選択する。

Update Hardware Specification ダイアログが表示された。
Browse... ボタンをクリックして、 KR260/kr260_custom_platform/kr260_custom_platform/kr260_custom/kr260_custom.xsa ファイルを指定した。

アップデート済みのダイアログが表示された。

これで、kr260_custom アクセラレーション・プラットホームが更新された。kr260_custom アクセラレーション・プラットホームはビルドされていない状態に戻っている。
続いて、kr260_custom アクセラレーション・プラットホームを使用する kr260_vadd アプリケーション・プロジェクトを再ビルドする。
kr260_vadd アプリケーション・プロジェクトは、”KR260 で Vitis アクセラレーション・プラットフォームを作成する8”で作成されている。
Explorer で kr260_vadd_system を選択し、Active build configuration: で Hardware を選択してあることを確認し、トンカチ・ボタンをクリックしてビルドを行った。
KR260_368_230316.png

ビルドが成功した。
KR260_369_230316.png

ビルドは成功したが、Vivado の prj プロジェクトを KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd_system_hw_link/Hardware/binary_container_1.build/link/vivado/vpl/prj から Vivado 2022.1 に読み込んでも DMA_pow2 などの IP がブロック・デザインに表示されない。これは、XSA ファイルを更新できていない。

そこで、Vitis の全てのプラットホーム・プロジェクトとアプリケーション・プロジェクトを削除してから作り直した。その手順は”KR260 で Vitis アクセラレーション・プラットフォームを作成する8”を参照にした。
ビルド後の Vitis 2022.1 の状態を示す。
KR260_370_230316.png

KR260/kr260_custom_platform/kr260_custom_platform/kr260_vadd_system_hw_link/Hardware/binary_container_1.build/link/vivado/vpl/prj プロジェクトを Vivado 2022.1 で開いた。
kr260_bd ブロック・デザインを示す。
DMA_pow2 などの IP が実装されていた。
KR260_371_230316.png

Address Editor 画面を示す。
KR260_372_230316.png

Project Summary を示す。
KR260_373_230316.png
  1. 2023年03月17日 03:23 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

IP を追加した kr260_ip 用の Vitis アクセラレーション・プラットホームを作成する1

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する1”用の Vitis アクセラレーション・プラットホームを作成してみたいということで、今回は、sdk.sh と BOOT.bin を作成する。また、pfm/boot ディレクトリを更新し、sdk.sh を起動して、sysroot を更新した。

やっていることは、”kr260_gpio 用の Vitis アクセラレーション・プラットホームを作成する1”とほとんど同じ。

Sysroot(SDK)をビルドする。
petalinux-build --sdk
KR260_358_230314.png

sdk.sh が再生成された。
KR260_359_230315.png

BOOT.BIN を生成する。
petalinux-package --boot --u-boot --force
KR260_360_230315.png

BOOT.BIN が再生成された。
KR260_361_230315.png

KR260/kr260_custorm_platform/kr260_custorm_platform/pfm/boot ディレクトリのファイルを削除した。

KR260/kr260_custorm_platform/linux_os/images/linux ディレクトリの bl31.elf, pmufw.elf, system-zynqmp-sck-kr-g-revB.dtb, u-boot.elf, zynqmp_fsbl.elf のファイルを
KR260_362_230315.png

KR260/kr260_custorm_platform/kr260_custorm_platform/pfm/boot ディレクトリにコピーした。
system-zynqmp-sck-kr-g-revB.dtb は system.dtb に名前を変更した。
KR260_363_230315.png

KR260/kr260_custorm_platform/linux_os/images/linux ディレクトリで sysroots ディレクトリを KR260/kr260_custorm_platform/kr260_custorm_platform ディレクトリに展開した。
./sdk.sh -d ../../../kr260_custom_platform/
KR260_364_230315.png

KR260/kr260_custorm_platform/kr260_custorm_platform/sysroots ディレクトリの下の cortexa72-cortexa53-xilinx-linux ディレクトリだけが更新された。
KR260_365_230315.png
  1. 2023年03月15日 04:25 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

IP を追加した KR260 の kr260_custom アクセラレーション・プラットホームで DMA_pow2 IP を動作させた

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する7”でハードウェア・プラットホームに実装した IP を UIO にマップすることができた。”u-dma-buf を KR260 用の Petalinux 2022.1 でビルドする”で u-dma-buf.ko を作成して、Petalinux 2022.1 に実装し、DMA_pow2 IP を動作させたところ、成功した。

なお、この時点から”KV260 の Petalinux の ls コマンド出力に色を付ける”で ls 時に色分けをしている。

u-dma-buf の解説については、”u-dma-buf(User space mappable DMA Buffer)”参照。

u-dma-buf を KR260 用の Petalinux 2022.1 でビルドする”で作成した u-dma-buf.ko を KR260 の Petalinux 2022.1 に SFTP した。

なお、DMA_pow2 IP は AXI4 Master の IP で in_r レジスタに登録されたアドレスから 10 個のデータを AXI4 Master で取得して、それぞれの 2 乗を計算して out_r レジスタに登録されたアドレスに 10 バーストで書く動作を行う。

u-dma-buf.ko を insmod した。udmabuf0 インスタンスを作成する。
sudo insmod u-dma-buf.ko udmabuf0=0x10000

/dev ディレクトリに udmabuf0 ができた。
ls -l /dev/udmabuf0

udambuf0 のモードを 666 に変更した。
sudo chmod 666 /dev/udmabuf0
ls -l /dev/udmabuf0

KR260_353_230313.png

~/kr260_ip/DMA_pow2 ディレクトリに行って、KR260 の Petalinux 2022.1 上で動かすためのアプリケーション・ソフトウェア DMA_pow2_test.c を作成した。

// DMP_pow2_test.c
// 2023/03/13 by marsee

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/mman.h>

void main(){
    int uio4_fd;
    volatile int32_t *dma_pow2;
    volatile int32_t *data;
    int fd_udmabuf0;
    u_int32_t fd_paddr;
    unsigned char  attr[1024];
    unsigned long  phys_addr;
    
    // uio4, DMP_pow2
    if((uio4_fd = open("/dev/uio4", O_RDWR)) == -1) {
        printf("Can not open /dev/uio4\n");
        exit(1);
    }
    dma_pow2 = (volatile int32_t*)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, uio4_fd, 0);
    
    // udmabuf0
    fd_udmabuf0 = open("/dev/udmabuf0", O_RDWR | O_SYNC); // frame_buffer, The chache is disabled. 
    if (fd_udmabuf0 == -1){
        fprintf(stderr, "/dev/udmabuf0 open errorn");
        exit(-1);
    }

    // phys_addr of udmabuf0
    fd_paddr = open("/sys/class/u-dma-buf/udmabuf0/phys_addr", O_RDONLY);
    if (fd_paddr == -1){
        fprintf(stderr, "/sys/class/u-dma-buf/udmabuf0/phys_addr open errorn");
        exit(-1);
    }
    read(fd_paddr, (void *)attr, 1024);
    sscanf((const char *)attr, "%lx", &phys_addr);  
    close(fd_paddr);
    printf("phys_addr = %x\n", (unsigned int)phys_addr);
    
    data = (volatile int32_t *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd_udmabuf0, 0);
    if (data == MAP_FAILED){
        fprintf(stderr, "data mmap error\n");
        exit(-1);
    }
    
    // data Initialization
    for(int i=0; i<10; i++){
        data[i] = i;
    }
    
    // DMP_pow2 start
    while((dma_pow2[0] & 4) == 0) ; // wait ap_idle
    dma_pow2[6] = phys_addr; // in_r
    dma_pow2[8] = phys_addr + 10 * sizeof(int32_t); // out_r
    dma_pow2[0] = 1; // ap_start
    while((dma_pow2[0] & 2) == 0) ; // wait ap_done
    
    
    for(int i=0; i<10; i++){
        printf("in = %d, out = %d\n", data[i], data[i+10]);
    }
}


KR260_357_230313.png

gcc で DMA_pow2_test.c をコンパイルして、DMA_pow2_test 実行形式ファイルを生成した。
gcc -o DMA_pow2_test DMA_pow2_test.c
KR260_354_230313.png

デフォルトのアプリケーションをアンロードし、kr260_ip をロードする。
/dev/uio* のモードを 666 に変更した。
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip
sudo chmod 666 /dev/uio*
ls -l /dev/uio*

KR260_355_230313.png

DMA_pow2_test アプリケーション・ソフトウェアを起動したところ、2 乗された out が出力された。成功だ。
./DMA_pow2_test
KR260_356_230313.png
  1. 2023年03月14日 04:17 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

u-dma-buf を KR260 用の Petalinux 2022.1 でビルドする

multi_axi4ls IP の次に AXI Master インターフェースを持つ DMA_pow2 IP を動作させるために u-dma-buf をビルドしてみよう。

u-dma-buf を Petalinux 2022.1 でビルドする”をそのまま実行した。

linux_os ディレクトリには、KR260 用の Petalinux 2022.1 がビルドされているので、これで u-dma-buf をビルドする。

Petalinux 2022.1 のプロジェクトの KR260/kr260_custom_platform/linux_os ディレクトリに移動してして、u-dma-buf をカーネル・モジュールとして生成する。なお、Petalinux 2022.1 の settings.sh は実行済みだ。
petalinux-create -t modules --name u-dma-buf --enable
KR260_347_230312.png

KR260/kr260_custom_platform/linux_os/project-spec/meta-user/recipes-modules ディレクトリの下に u-dma-buf ディレクトリが作成され、その下の files ディレクトリの下に u-dma-buf.c が生成された。
KR260_348_230312.png

rootfs をビルドする。
petalinux-build -c rootf
KR260_349_230312.png

KR260/kr260_custom_platform/linux_os/project-spec/meta-user/recipes-module/udmabuf/files/u-dma-buf.c に ikwzm/udambuf/u-dma-buf.c の内容をコピペする。
KR260_350_230312.png

u-dma-buf をビルドする。
petalinux-build -c u-dma-buf
成功した。
KR260_351_230312.png

KR260/kr260_custom_platform/linux_os/build/tmp/sysroots-components/xilinx_k26_kv/u-dma-buf/lib/modules/5.15.19-xilinx-v2022.1/extra ディレクトリに u-dma-buf.ko が作成された。
KR260_352_230312.png
  1. 2023年03月13日 03:59 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

IP を追加した KR260 の kr260_custom アクセラレーション・プラットホームで multi_axi4ls を動作させた

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する7”でハードウェア・プラットホームに実装した IP を UIO にマップすることができた。今回は、その内の multi_axi4ls IP を動作させることができた。

まずは、gcc をインストールしていなかったので、インストールしよう。
sudo dnf install gcc.cortexa72_cortexa53
KR260_339_230311.png

sudo dnf install gcc-symlinks.cortexa72_cortexa53
KR260_340_230311.png

KR260 の Petalinux 2022.1 の ~/kr260_ip フォルダに multi_axi4ls.c ファイルを生成して C コードを書いた。

// multi_axi4ls.c
// 2023/03/11 by marsee

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/mman.h>

int32_t multi_calc(int32_t *multi_axi4ls, int32_t a, int32_t b){
    while((multi_axi4ls[0] &4) == 0) ; // wait ap_idle
    multi_axi4ls[6] = a; // reg a, 0x18
    multi_axi4ls[8] = b; // reg b, 0x20
    multi_axi4ls[0] = 1; // ap_start = 1
    while((multi_axi4ls[11] & 1) == 0) ; // wait c_ap_vld
    return(multi_axi4ls[10]);
}

void main(){
    int uio8_fd;
    int32_t *multi_axi4ls;
    int32_t a, b, c;
    
    if((uio8_fd = open("/dev/uio8", O_RDWR)) == -1) {
        printf("Can not open /dev/uio8\n");
        exit(1);
    }
    multi_axi4ls = (uint32_t*)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, uio8_fd, 0);
    
    for(a = 0, b = 1; a < 10; a++, b++){
        c = multi_calc(multi_axi4ls, a, b);
        printf("a = %d, b = %d, c = %d\n", a, b, c);
    }
}


KR260_341_230312.png

KR260_342_230312.png

multi_axi4ls.c を gcc でコンパイルした。
gcc -o multi_axi4ls multi_axi4ls.c
KR260_343_230312.png

デフォルトのアプリケーションをアンロードし、kr260_ip をロードする。
/dev/uio* を見た。
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip
ls -l /dev/uio*

KR260_344_230312.png

ユーザー・モードで /dev/uio* が読み書きできないので、chmod を 666 に設定した。
sudo chmod 666 /dev/uio*
ls -l /dev/uio*

KR260_345_230312.png

/dev/uio* が読み書きできるようになったので、multi_axi4ls を起動したところ、乗算結果が表示された。成功だ。
./multi_axi4ls
KR260_346_230312.png
  1. 2023年03月12日 05:21 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する7

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する6”の続き。

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加してみようということで、前回は、”KV260でVexRiscv動作させた”を参考にして、pl.dtsi を書き換えて、ハードウェア・プラットホーム上の IP を generic-uio に書き換えてみたい。そのため、Petalinux のカーネルを設定して、UIO ドライバをインストールし、UIO ドライバを起動オプションでロードするように設定した。その後、Petalinux をビルドして、SD カードを作成し、KR260 に挿入して Petalinux を起動し、設定を行った。今回は、pl.dtsi のハードウェア・プラットホームに追加した IP の compatible を generic-uio に書き換えてコンパイルし、pl.dtbo を生成した。再生成した pl.dtbo を kr260_ip.dtbo に名前を変更し、kr260_ip.bin, shell.json と共に SFTP で KR260 の Petalinux 2022.1 に転送した。それらのファイルを /lib/firmware/xilinx/kr260_ip ディレクトリを新規作成してコピーした。既存のアプリケーションをアンロードし、kr260_ip をロードしたところ、/sys/class/uio ディレクトリに新しく uio が生成された。

手順は、”KV260でVexRiscv動作させた”を参考にさせていただいた。

KR260/kr260_custom_platform/kr260_custom_platform/dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi を編集して、DMA_pow2_0, axi_dma_0, axi_intc_0, axi_timer_0, multi_axi4ls_0 の compatible を generic-uio に書き換えた。
KR260_331_230310.png

pl.dtsi を貼っておく。

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version: XSCT 2022.1
 * Today is: Mon Mar  6 03:31:36 2023
 */


/dts-v1/;
/plugin/;
/ {
    fragment@0 {
        target = <&fpga_full>;
        overlay0: __overlay__ {
            #address-cells = <2>;
            #size-cells = <2>;
            firmware-name = "kr260_custom.bit.bin";
            resets = <&zynqmp_reset 116>, <&zynqmp_reset 117>, <&zynqmp_reset 118>, <&zynqmp_reset 119>;
        };
    };
    fragment@1 {
        target = <&amba>;
        overlay1: __overlay__ {
            afi0: afi0 {
                compatible = "xlnx,afi-fpga";
                config-afi = < 0 0>, <1 0>, <2 0>, <3 0>, <4 0>, <5 0>, <6 0>, <7 0>, <8 0>, <9 0>, <10 0>, <11 0>, <12 0>, <13 0>, <14 0xa00>, <15 0x000>;
            };
            clocking0: clocking0 {
                #clock-cells = <0>;
                assigned-clock-rates = <99999001>;
                assigned-clocks = <&zynqmp_clk 71>;
                clock-output-names = "fabric_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,fclk";
            };
            clocking1: clocking1 {
                #clock-cells = <0>;
                assigned-clock-rates = <99999001>;
                assigned-clocks = <&zynqmp_clk 72>;
                clock-output-names = "fabric_clk";
                clocks = <&zynqmp_clk 72>;
                compatible = "xlnx,fclk";
            };
        };
    };
    fragment@2 {
        target = <&amba>;
        overlay2: __overlay__ {
            #address-cells = <2>;
            #size-cells = <2>;
            DMA_pow2_0: DMA_pow2@80070000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                clock-names = "ap_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80070000 0x0 0x10000>;
                xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;
            };
            PMOD_0: gpio@80010000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80010000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_1: gpio@80020000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80020000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_2: gpio@80030000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80030000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            PMOD_3: gpio@80040000 {
                #gpio-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
                gpio-controller ;
                reg = <0x0 0x80040000 0x0 0x10000>;
                xlnx,all-inputs = <0x0>;
                xlnx,all-inputs-2 = <0x0>;
                xlnx,all-outputs = <0x0>;
                xlnx,all-outputs-2 = <0x0>;
                xlnx,dout-default = <0x00000000>;
                xlnx,dout-default-2 = <0x00000000>;
                xlnx,gpio-width = <0x8>;
                xlnx,gpio2-width = <0x20>;
                xlnx,interrupt-present = <0x0>;
                xlnx,is-dual = <0x0>;
                xlnx,tri-default = <0xFFFFFFFF>;
                xlnx,tri-default-2 = <0xFFFFFFFF>;
            };
            axi_dma_0: dma@80050000 {
                #dma-cells = <1>;
                clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
                clocks = <&zynqmp_clk 71>, <&zynqmp_clk 71>, <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80050000 0x0 0x10000>;
                xlnx,addrwidth = <0x20>;
                xlnx,sg-length-width = <0xe>;
                dma-channel@80050000 {
                    compatible = "xlnx,axi-dma-mm2s-channel";
                    dma-channels = <0x1>;
                    xlnx,datawidth = <0x20>;
                    xlnx,device-id = <0x0>;
                };
                dma-channel@80050030 {
                    compatible = "xlnx,axi-dma-s2mm-channel";
                    dma-channels = <0x1>;
                    xlnx,datawidth = <0x20>;
                    xlnx,device-id = <0x0>;
                };
            };
            axi_intc_0: interrupt-controller@80000000 {
                #interrupt-cells = <2>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                interrupt-controller ;
                interrupt-names = "irq";
                interrupt-parent = <&gic>;
                interrupts = <0 89 4>;
                reg = <0x0 0x80000000 0x0 0x10000>;
                xlnx,kind-of-intr = <0x1>;
                xlnx,num-intr-inputs = <0x20>;
            };
            axi_timer_0: timer@80060000 {
                clock-frequency = <99999001>;
                clock-names = "s_axi_aclk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80060000 0x0 0x10000>;
                xlnx,count-width = <0x20>;
                xlnx,gen0-assert = <0x1>;
                xlnx,gen1-assert = <0x1>;
                xlnx,one-timer-only = <0x0>;
                xlnx,trig0-assert = <0x1>;
                xlnx,trig1-assert = <0x1>;
            };
            multi_axi4ls_0: multi_axi4ls@80080000 {
                /* This is a place holder node for a custom IP, user may need to update the entries */
                clock-names = "ap_clk";
                clocks = <&zynqmp_clk 71>;
                compatible = "generic-uio";
                reg = <0x0 0x80080000 0x0 0x10000>;
                xlnx,s-axi-control-addr-width = <0x6>;
                xlnx,s-axi-control-data-width = <0x20>;
            };
            zyxclmm_drm {
                compatible = "xlnx,zocl";
                interrupts-extended = <&axi_intc_0 0 4>, <&axi_intc_0 1 4>, <&axi_intc_0 2 4>, <&axi_intc_0 3 4>, <&axi_intc_0 4 4>, <&axi_intc_0 5 4>, <&axi_intc_0 6 4>, <&axi_intc_0 7 4>, <&axi_intc_0 8 4>, <&axi_intc_0 9 4>,
<&axi_intc_0 10 4>, <&axi_intc_0 11 4>, <&axi_intc_0 12 4>, <&axi_intc_0 13 4>, <&axi_intc_0 14 4>,
<&axi_intc_0 15 4>, <&axi_intc_0 16 4>, <&axi_intc_0 17 4>, <&axi_intc_0 18 4>, <&axi_intc_0 19 4>,
<&axi_intc_0 20 4>, <&axi_intc_0 21 4>, <&axi_intc_0 22 4>, <&axi_intc_0 23 4>, <&axi_intc_0 24 4>,
<&axi_intc_0 25 4>, <&axi_intc_0 26 4>, <&axi_intc_0 27 4>, <&axi_intc_0 28 4>, <&axi_intc_0 29 4>,
<&axi_intc_0 30 4>, <&axi_intc_0 31 4 >;
            };
        };
    };
};


/media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform ディレクトリに行って、pl.dtsi をコンパイルして、pl.dtbo を生成した。
dtc -@ -O dtb -o ./dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo ./dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi
KR260_332_230310.png

dtg/ip_file_transfer ディレクトリに行って、pl.dtbo だけをコピーした。
cd ./dtg/ip_file_transfer
cp ../dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo ./kr260_ip.dtbo


ip_file_transfer ディレクトリのファイルを KR260 の Petalinux に FileZilla で転送する。
最初に KR260 の /home/petalinux に kr260_ip ディレクトリを作成した。
kr260_ip ディレクトリに FileZilla でファイルを転送した。
KR260_317_230306.png

ここからは、KR260 の Petalinux 2022.1 での作業となる。
/lib/firmware/xilinx/kr260_ip を作成し、kr260_ip.dtbo, kr260_ip.bit.bin, shell.json をそこに転送する。
cd kr260_ip
sudo mkdir /lib/firmware/xilinx/kr260_ip
sudo cp kr260_ip.dtbo kr260_ip.bin shell.json /lib/firmware/xilinx/kr260_ip


kr260_ip をロードする前の /sys/class/uio ディレクトリの様子を示す。
KR260_333_230310.png

uio0 〜 uio3 までの 4 個の uio が見える。

デフォルトのアプリケーションをアンロードし、kr260_ip をロードする。
sudo xmutil listapps
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip

KR260_334_230310.png

/sys/class/uio ディレクトリに uio4 〜 uio8 が増えた。
KR260_335_230310.png

/sys/class/uio/uio4 ディレクトリに入った。
KR260_336_230310.png

name を見ると DMA_pow2 と書いてあった。
KR260_337_230310.png

uio5 の name は dma だった。
uio6 の name は interrupt-controller だった。
uio7 の name は timer だった。
uio8 の name は multi_axi4ls だった。

/dev ディレクトリにも uio0 〜 uio8 が見えている。
KR260_338_230310.png

これで、ハードウェア・プラットホーム上の IP を uio としてマップすることができた。
  1. 2023年03月10日 04:44 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する6

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する5”の続き。

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加してみようということで、前回は、/lib/firmware ディレクトリにファイルをコピーし、PL デザインやデバイスツリー・オーバレイをロードした。/sys/devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform: にプラットホームの IP がロードされているのが確認できた。しかし、ハードウェア・プラットホームの IP を使用する方法は分からなかった。今回は、”KV260でVexRiscv動作させた”を参考にして、pl.dtsi を書き換えて、ハードウェア・プラットホーム上の IP を generic-uio に書き換えてみたい。そのため、Petalinux のカーネルを設定して、UIO ドライバをインストールし、UIO ドライバを起動オプションでロードするように設定した。その後、Petalinux をビルドして、SD カードを作成し、KR260 に挿入して Petalinux を起動し、設定を行った。

Linux からの回路制御(PetaLinux版)”を参考にして、Linux カーネルに UIO ドライバをロードする。
petalinux-config -c kernel
Device Drivers -> Usespace I/O drivers を選んでクリックし、スペース・キーを押して、Userspace I/O platform driver with generic IRQ hangling を M から * にした。
KR260_325_230308.png

セーブしてexit した。
KR260_326_230308.png

KR260/kr260_custom_platform/linux_os/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi を編集して、

uio_pdrv_genirq.of_id=generic-uio

を追加した。
KR260_328_230308.png

KR260_327_230308.png

Petalinux 2022.1 をビルドした。
petalinux-build
ビルドが成功した。
KR260_329_230308.png

wic イメージ・ファイルを作成する。
petalinux-package --wic --images-dir images/linux/ --bootfiles "ramdisk.cpio.gz.u-boot,boot.scr,Image,system.dtb,system-zynqmp-sck-kr-g-revB.dtb" --disk-name "sda"
KR260_330_230308.png

KR260/kr260_custom_platform/linux_os/images/linux/petalinux-sdimage.wic が生成された。

petalinux-sdimage.wic ファイルを balenaEtcher を使用して MicroSD カードに書き込んだ。

書き込み後に MicroSD カードに boot パーティションと root パーティションが生成された。

MicroSD カードを KV260 に挿入して電源 ON したところ、Petalinux 2022.1 が起動した。

ファイル・マネージャーから。pcmafm をインストールする。
sudo dnf install pcmanfm.cortexa72_cortexa53

packagegroup-petalinux-opencv-dbg をインストールした。
sudo dnf install packagegroup-petalinux-opencv-dbg

openssh-sftp-server をインストールした。
sudo dnf install openssh-sftp-server.cortexa72_cortexa53

テキスト・エディタの l3afpad をインストールした。
sudo dnf install l3afpad.cortexa72_cortexa53

gtk-play をインストールする。
gst-examples をインストールした。
sudo dnf install gst-examples.cortexa72_cortexa53

pcmanfm から gtk-play を起動できるようにした。
IMG_20191030_051740.jpg ファイルをダブルクリックで開くと、Choose Application ダイアログが開く。
Custom Command Line タブをクリックして、Command line to execute: に gtk-play %f と入力し、”Set selected application as default action for this file type”のチェックボックスにチェックを入れた。また、Application namegtk-play と書いた。

Petalinux 2022.1 の起動ログを貼っておく。
Kernel command line に uio_pdrv_genirq.of_id=generic-uio が追加されていた。

Xilinx Zynq MP First Stage Boot Loader 
Release 2022.1   Sep 16 2022  -  04:56:15
MultiBootOffset: 0x1F0
Reset Mode  :   System Reset
Platform: Silicon (4.0), Running on A53-0 (64-bit) Processor, Device Name: XCZUUNKNEG
QSPI 32 bit Boot Mode 
FlashID=0x20 0xBB 0x20
Pr�NOTICE:  BL31: v2.6(release):0897efd
NOTICE:  BL31: Built : 04:58:29, Sep 16 2022


U-Boot 2022.01-g91ad7924-dirty (Sep 15 2022 - 23:00:49 -0600), Build: jenkins-BUILDS-2022.1-som_qspi_generation-131

CPU:   ZynqMP
Silicon: v3
Detected name: zynqmp-smk-k26-xcl2g-rev1-sck-kr-g-rev1
Model: ZynqMP SMK-K26 Rev1/B/A
Board: Xilinx ZynqMP
DRAM:  4 GiB
PMUFW:  v1.1
Xilinx I2C FRU format at nvmem0:
 Manufacturer Name: XILINX
 Product Name: SMK-K26-XCL2G
 Serial No: XFL1CYY0C2I3
 Part Number: 5057-04
 File ID: 0x0
 Revision Number: 1
Xilinx I2C FRU format at nvmem1:
 Manufacturer Name: XILINX
 Product Name: SCK-KR-G
 Serial No: XFL1V0BJCWOF
 Part Number: 5100-01
 File ID: 0x0
 Revision Number: 1
EL Level:   EL2
Chip ID:    xck26
NAND:  0 MiB
MMC:   
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Bootmode: QSPI_MODE
Reset reason:   SOFT 
Net:   
ZYNQ GEM: ff0b0000, mdio bus ff0c0000, phyaddr 4, interface sgmii
eth0: ethernet@ff0b0000
ZYNQ GEM: ff0c0000, mdio bus ff0c0000, phyaddr 8, interface rgmii-id
, eth1: ethernet@ff0c0000
starting USB...
Bus usb@fe200000: Register 2000440 NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@fe300000: Register 2000440 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@fe200000 for devices... 5 USB Device(s) found
scanning bus usb@fe300000 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0 
model=SMK-K26-XCL2G

Device 0: Vendor: Generic  Rev: 1.98 Prod: Ultra HS-COMBO
            Type: Removable Hard Disk
            Capacity: 29554.0 MB = 28.8 GB (60526592 x 512)
... is now current device
Scanning usb 0:1...
Found U-Boot script /boot.scr
2777 bytes read in 1 ms (2.6 MiB/s)
## Executing script at 20000000
Trying to load boot images from usb0
22401536 bytes read in 1489 ms (14.3 MiB/s)
46961 bytes read in 6 ms (7.5 MiB/s)
23217514 bytes read in 1541 ms (14.4 MiB/s)
## Loading init Ramdisk from Legacy Image at 04000000 ...
   Image Name:   petalinux-initramfs-image-xilinx
   Created:      2011-04-05  23:00:00 UTC
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    23217450 Bytes = 22.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00100000
   Booting using the fdt blob at 0x100000
   Loading Ramdisk to 779db000, end 78fff52a ... OK
   Loading Device Tree to 000000000fff1000, end 000000000ffff770 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.19-xilinx-v2022.1 (oe-user@oe-host) (aarch64-xilinx-linux-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP Thu May 12 09:05:30 UTC 2022
[    0.000000] Machine model: ZynqMP SMK-K26 Rev1/B/A
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] printk: bootconsole [cdns0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000000000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000087fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003ecfffff]
[    0.000000]   node   0: [mem 0x000000003ed00000-0x000000003ee47fff]
[    0.000000]   node   0: [mem 0x000000003ee48000-0x000000007fefffff]
[    0.000000]   node   0: [mem 0x0000000800000000-0x000000087fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000087fffffff]
[    0.000000] On node 0, zone Normal: 256 pages in unavailable ranges
[    0.000000] cma: Reserved 900 MiB at 0x000000003f400000
[    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: 1031940
[    0.000000] Kernel command line: earlycon console=ttyPS1,115200 clk_ignore_unused xilinx_tsn_ep.st_pcp=4 init_fatal_sh=1 cma=900M uio_pdrv_genirq.of_id=generic-uio
[    0.000000] Unknown kernel command line parameters "init_fatal_sh=1", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x000000007bf00000-0x000000007ff00000] (64MB)
[    0.000000] Memory: 3078456K/4193280K available (14528K kernel code, 1012K rwdata, 4056K rodata, 2176K init, 571K bss, 193224K reserved, 921600K cma-reserved)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    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/0x6d4 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 99.99MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171015c90f, max_idle_ns: 440795203080 ns
[    0.000000] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046511101ns
[    0.008305] Console: colour dummy device 80x25
[    0.012396] Calibrating delay loop (skipped), value calculated using timer frequency.. 199.99 BogoMIPS (lpj=399996)
[    0.022752] pid_max: default: 32768 minimum: 301
[    0.027505] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.034699] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.043435] rcu: Hierarchical SRCU implementation.
[    0.047500] EFI services will not be available.
[    0.051861] smp: Bringing up secondary CPUs ...
[    0.056572] Detected VIPT I-cache on CPU1
[    0.056610] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.056981] Detected VIPT I-cache on CPU2
[    0.057003] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.057340] Detected VIPT I-cache on CPU3
[    0.057360] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.057400] smp: Brought up 1 node, 4 CPUs
[    0.091692] SMP: Total of 4 processors activated.
[    0.096364] CPU features: detected: 32-bit EL0 Support
[    0.101468] CPU features: detected: CRC32 instructions
[    0.106605] CPU: All CPU(s) started at EL2
[    0.110648] alternatives: patching kernel code
[    0.116062] devtmpfs: initialized
[    0.124031] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.128129] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.160136] pinctrl core: initialized pinctrl subsystem
[    0.160611] DMI not present or invalid.
[    0.163780] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.170389] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    0.176511] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.184332] audit: initializing netlink subsys (disabled)
[    0.189740] audit: type=2000 audit(0.132:1): state=initialized audit_enabled=0 res=1
[    0.190096] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.204161] ASID allocator initialised with 65536 entries
[    0.209566] Serial: AMBA PL011 UART driver
[    0.231429] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.232488] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.239159] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.245816] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    1.215010] cryptd: max_cpu_qlen set to 1000
[    1.237368] DRBG: Continuing without Jitter RNG
[    1.337147] raid6: neonx8   gen()  2373 MB/s
[    1.405195] raid6: neonx8   xor()  1761 MB/s
[    1.473252] raid6: neonx4   gen()  2418 MB/s
[    1.541303] raid6: neonx4   xor()  1729 MB/s
[    1.609369] raid6: neonx2   gen()  2292 MB/s
[    1.677408] raid6: neonx2   xor()  1587 MB/s
[    1.745469] raid6: neonx1   gen()  1956 MB/s
[    1.813521] raid6: neonx1   xor()  1348 MB/s
[    1.881570] raid6: int64x8  gen()  1518 MB/s
[    1.949627] raid6: int64x8  xor()   859 MB/s
[    2.017688] raid6: int64x4  gen()  1775 MB/s
[    2.085748] raid6: int64x4  xor()   942 MB/s
[    2.153811] raid6: int64x2  gen()  1552 MB/s
[    2.221861] raid6: int64x2  xor()   834 MB/s
[    2.289922] raid6: int64x1  gen()  1147 MB/s
[    2.357982] raid6: int64x1  xor()   575 MB/s
[    2.358020] raid6: using algorithm neonx4 gen() 2418 MB/s
[    2.361977] raid6: .... xor() 1729 MB/s, rmw enabled
[    2.366908] raid6: using neon recovery algorithm
[    2.371951] iommu: Default domain type: Translated 
[    2.376339] iommu: DMA domain TLB invalidation policy: strict mode 
[    2.382763] SCSI subsystem initialized
[    2.386410] usbcore: registered new interface driver usbfs
[    2.391761] usbcore: registered new interface driver hub
[    2.397028] usbcore: registered new device driver usb
[    2.402076] mc: Linux media interface: v0.10
[    2.406280] videodev: Linux video capture interface: v2.00
[    2.411745] pps_core: LinuxPPS API ver. 1 registered
[    2.416646] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.425736] PTP clock support registered
[    2.429637] EDAC MC: Ver: 3.0.0
[    2.433005] zynqmp-ipi-mbox mailbox@ff990400: Registered ZynqMP IPI mbox with TX/RX channels.
[    2.441399] zynqmp-ipi-mbox mailbox@ff990600: Registered ZynqMP IPI mbox with TX/RX channels.
[    2.449796] FPGA manager framework
[    2.453151] Advanced Linux Sound Architecture Driver Initialized.
[    2.459408] Bluetooth: Core ver 2.22
[    2.462675] NET: Registered PF_BLUETOOTH protocol family
[    2.467942] Bluetooth: HCI device and connection manager initialized
[    2.474258] Bluetooth: HCI socket layer initialized
[    2.479102] Bluetooth: L2CAP socket layer initialized
[    2.484123] Bluetooth: SCO socket layer initialized
[    2.489292] clocksource: Switched to clocksource arch_sys_counter
[    2.495127] VFS: Disk quotas dquot_6.6.0
[    2.498942] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    2.509659] NET: Registered PF_INET protocol family
[    2.510701] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    2.519360] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    2.526454] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    2.534472] TCP bind hash table entries: 32768 (order: 7, 524288 bytes, linear)
[    2.541907] TCP: Hash tables configured (established 32768 bind 32768)
[    2.548108] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    2.554767] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    2.561918] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.567711] RPC: Registered named UNIX socket transport module.
[    2.573308] RPC: Registered udp transport module.
[    2.577974] RPC: Registered tcp transport module.
[    2.582641] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.589593] PCI: CLS 0 bytes, default 64
[    2.593077] Trying to unpack rootfs image as initramfs...
[    2.599003] armv8-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
[    2.606347] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    3.592545] Freeing initrd memory: 22672K
[    3.623154] Initialise system trusted keyrings
[    3.623278] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    3.629006] NFS: Registering the id_resolver key type
[    3.633428] Key type id_resolver registered
[    3.637537] Key type id_legacy registered
[    3.641530] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.648177] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    3.655539] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    3.695693] NET: Registered PF_ALG protocol family
[    3.695742] xor: measuring software checksum speed
[    3.703353]    8regs           :  2626 MB/sec
[    3.707089]    32regs          :  3110 MB/sec
[    3.712088]    arm64_neon      :  2564 MB/sec
[    3.712571] xor: using function: 32regs (3110 MB/sec)
[    3.717594] Key type asymmetric registered
[    3.721659] Asymmetric key parser 'x509' registered
[    3.726534] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    3.733857] io scheduler mq-deadline registered
[    3.738353] io scheduler kyber registered
[    3.766900] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.768612] Serial: AMBA driver
[    3.771513] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    3.780696] brd: module loaded
[    3.783900] loop: module loaded
[    3.784743] mtdoops: mtd device (mtddev=name/number) must be supplied
[    3.791907] tun: Universal TUN/TAP device driver, 1.6
[    3.794423] CAN device driver interface
[    3.798749] SPI driver wl1271_spi has no spi_device_id for ti,wl1271
[    3.804472] SPI driver wl1271_spi has no spi_device_id for ti,wl1273
[    3.810781] SPI driver wl1271_spi has no spi_device_id for ti,wl1281
[    3.817094] SPI driver wl1271_spi has no spi_device_id for ti,wl1283
[    3.823409] SPI driver wl1271_spi has no spi_device_id for ti,wl1285
[    3.829723] SPI driver wl1271_spi has no spi_device_id for ti,wl1801
[    3.836039] SPI driver wl1271_spi has no spi_device_id for ti,wl1805
[    3.842354] SPI driver wl1271_spi has no spi_device_id for ti,wl1807
[    3.848667] SPI driver wl1271_spi has no spi_device_id for ti,wl1831
[    3.854981] SPI driver wl1271_spi has no spi_device_id for ti,wl1835
[    3.861296] SPI driver wl1271_spi has no spi_device_id for ti,wl1837
[    3.867685] usbcore: registered new interface driver asix
[    3.873012] usbcore: registered new interface driver ax88179_178a
[    3.879047] usbcore: registered new interface driver cdc_ether
[    3.884844] usbcore: registered new interface driver net1080
[    3.890468] usbcore: registered new interface driver cdc_subset
[    3.896347] usbcore: registered new interface driver zaurus
[    3.901899] usbcore: registered new interface driver cdc_ncm
[    3.908163] usbcore: registered new interface driver uas
[    3.912795] usbcore: registered new interface driver usb-storage
[    3.919341] rtc_zynqmp ffa60000.rtc: registered as rtc0
[    3.923935] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01T00:00:09 UTC (9)
[    3.932018] i2c_dev: i2c /dev entries driver
[    3.937711] usbcore: registered new interface driver uvcvideo
[    3.942637] Bluetooth: HCI UART driver ver 2.3
[    3.946334] Bluetooth: HCI UART protocol H4 registered
[    3.951432] Bluetooth: HCI UART protocol BCSP registered
[    3.956720] Bluetooth: HCI UART protocol LL registered
[    3.961811] Bluetooth: HCI UART protocol ATH3K registered
[    3.967187] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    3.973434] Bluetooth: HCI UART protocol Intel registered
[    3.978776] Bluetooth: HCI UART protocol QCA registered
[    3.983977] usbcore: registered new interface driver bcm203x
[    3.989601] usbcore: registered new interface driver bpa10x
[    3.995135] usbcore: registered new interface driver bfusb
[    4.000584] usbcore: registered new interface driver btusb
[    4.006044] usbcore: registered new interface driver ath3k
[    4.011536] EDAC MC: ECC not enabled
[    4.015121] EDAC DEVICE0: Giving out device to module edac controller cache_err: DEV edac (POLLED)
[    4.024063] EDAC DEVICE1: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    4.036384] sdhci: Secure Digital Host Controller Interface driver
[    4.042171] sdhci: Copyright(c) Pierre Ossman
[    4.046496] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.052437] ledtrig-cpu: registered to indicate activity on CPUs
[    4.058188] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    4.064551] zynqmp_firmware_probe Platform Management API v1.1
[    4.070286] zynqmp_firmware_probe Trustzone version v1.0
[    4.103874] securefw securefw: securefw probed
[    4.104203] alg: No test for xilinx-zynqmp-aes (zynqmp-aes)
[    4.108345] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: AES Successfully Registered
[    4.116437] alg: No test for xilinx-keccak-384 (zynqmp-keccak-384)
[    4.122580] alg: No test for xilinx-zynqmp-rsa (zynqmp-rsa)
[    4.128085] usbcore: registered new interface driver usbhid
[    4.133484] usbhid: USB HID core driver
[    4.140063] ARM CCI_400_r1 PMU driver probed
[    4.140647] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    4.148310] usbcore: registered new interface driver snd-usb-audio
[    4.154811] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    4.162297] Initializing XFRM netlink socket
[    4.165899] NET: Registered PF_INET6 protocol family
[    4.171244] Segment Routing with IPv6
[    4.174415] In-situ OAM (IOAM) with IPv6
[    4.178354] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.184477] NET: Registered PF_PACKET protocol family
[    4.189203] NET: Registered PF_KEY protocol family
[    4.193959] can: controller area network core
[    4.198299] NET: Registered PF_CAN protocol family
[    4.203030] can: raw protocol
[    4.205971] can: broadcast manager protocol
[    4.210125] can: netlink gateway - max_hops=1
[    4.214522] Bluetooth: RFCOMM TTY layer initialized
[    4.219299] Bluetooth: RFCOMM socket layer initialized
[    4.224407] Bluetooth: RFCOMM ver 1.11
[    4.228117] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.233389] Bluetooth: BNEP filters: protocol multicast
[    4.238582] Bluetooth: BNEP socket layer initialized
[    4.243509] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    4.249393] Bluetooth: HIDP socket layer initialized
[    4.254346] 8021q: 802.1Q VLAN Support v1.8
[    4.258575] 9pnet: Installing 9P2000 support
[    4.262732] Key type dns_resolver registered
[    4.267087] registered taskstats version 1
[    4.271020] Loading compiled-in X.509 certificates
[    4.276805] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
[    4.290836] ff010000.serial: ttyPS1 at MMIO 0xff010000 (irq = 48, base_baud = 6249999) is a xuartps
[    4.299861] printk: console [ttyPS1] enabled
[    4.299861] printk: console [ttyPS1] enabled
[    4.304153] printk: bootconsole [cdns0] disabled
[    4.304153] printk: bootconsole [cdns0] disabled
[    4.313413] of-fpga-region fpga-full: FPGA Region probed
[    4.323590] xilinx-zynqmp-dma fd500000.dma-controller: ZynqMP DMA driver Probe success
[    4.331661] xilinx-zynqmp-dma fd510000.dma-controller: ZynqMP DMA driver Probe success
[    4.339732] xilinx-zynqmp-dma fd520000.dma-controller: ZynqMP DMA driver Probe success
[    4.347798] xilinx-zynqmp-dma fd530000.dma-controller: ZynqMP DMA driver Probe success
[    4.355870] xilinx-zynqmp-dma fd540000.dma-controller: ZynqMP DMA driver Probe success
[    4.363935] xilinx-zynqmp-dma fd550000.dma-controller: ZynqMP DMA driver Probe success
[    4.372009] xilinx-zynqmp-dma fd560000.dma-controller: ZynqMP DMA driver Probe success
[    4.380068] xilinx-zynqmp-dma fd570000.dma-controller: ZynqMP DMA driver Probe success
[    4.388204] xilinx-zynqmp-dma ffa80000.dma-controller: ZynqMP DMA driver Probe success
[    4.396272] xilinx-zynqmp-dma ffa90000.dma-controller: ZynqMP DMA driver Probe success
[    4.404333] xilinx-zynqmp-dma ffaa0000.dma-controller: ZynqMP DMA driver Probe success
[    4.412396] xilinx-zynqmp-dma ffab0000.dma-controller: ZynqMP DMA driver Probe success
[    4.420463] xilinx-zynqmp-dma ffac0000.dma-controller: ZynqMP DMA driver Probe success
[    4.428526] xilinx-zynqmp-dma ffad0000.dma-controller: ZynqMP DMA driver Probe success
[    4.436589] xilinx-zynqmp-dma ffae0000.dma-controller: ZynqMP DMA driver Probe success
[    4.444653] xilinx-zynqmp-dma ffaf0000.dma-controller: ZynqMP DMA driver Probe success
[    4.453027] xilinx-zynqmp-dpdma fd4c0000.dma-controller: Xilinx DPDMA engine is probed
[    4.464096] zynqmp-display fd4a0000.display: vtc bridge property not present
[    4.473990] xilinx-dp-snd-codec fd4a0000.display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    4.484039] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    4.492076] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    4.500901] xilinx-dp-snd-card fd4a0000.display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    4.505129] zynqmp_pll_disable() clock disable failed for dpll_int, ret = -13
[    4.510465] OF: graph: no port node found in /axi/display@fd4a0000
[    4.523987] xlnx-drm xlnx-drm.0: bound fd4a0000.display (ops 0xffff800008f030e0)
[    4.696240] Console: switching to colour frame buffer device 240x67
[    4.719154] zynqmp-display fd4a0000.display: [drm] fb0: xlnxdrmfb frame buffer device
[    4.727195] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.display on minor 0
[    4.734691] zynqmp-display fd4a0000.display: ZynqMP DisplayPort Subsystem driver probed
[    4.744444] spi-nor spi0.0: mt25qu512a (65536 Kbytes)
[    4.749557] 16 fixed-partitions partitions found on MTD device spi0.0
[    4.756006] Creating 16 MTD partitions on "spi0.0":
[    4.760883] 0x000000000000-0x000000080000 : "Image Selector"
[    4.767358] 0x000000080000-0x000000100000 : "Image Selector Golden"
[    4.773961] tpm_tis_spi spi2.0: 2.0 TPM (device-id 0x1B, rev-id 22)
[    4.774385] 0x000000100000-0x000000120000 : "Persistent Register"
[    4.787051] 0x000000120000-0x000000140000 : "Persistent Register Backup"
[    4.794469] 0x000000140000-0x000000200000 : "Open_1"
[    4.799691] tpm tpm0: A TPM error (256) occurred attempting the self test
[    4.800148] 0x000000200000-0x000000f00000 : "Image A (FSBL, PMU, ATF, U-Boot)"
[    4.806478] tpm tpm0: starting up the TPM manually
[    4.819166] 0x000000f00000-0x000000f80000 : "ImgSel Image A Catch"
[    4.825519] random: fast init done
[    4.829440] 0x000000f80000-0x000001c80000 : "Image B (FSBL, PMU, ATF, U-Boot)"
[    4.837345] 0x000001c80000-0x000001d00000 : "ImgSel Image B Catch"
[    4.844249] 0x000001d00000-0x000001e00000 : "Open_2"
[    4.849917] 0x000001e00000-0x000002000000 : "Recovery Image"
[    4.856265] 0x000002000000-0x000002200000 : "Recovery Image Backup"
[    4.863194] 0x000002200000-0x000002220000 : "U-Boot storage variables"
[    4.870411] 0x000002220000-0x000002240000 : "U-Boot storage variables backup"
[    4.878193] 0x000002240000-0x000002250000 : "SHA256"
[    4.883825] 0x000002250000-0x000004000000 : "User"
[    4.889821] macb ff0b0000.ethernet: Not enabling partial store and forward
[    4.922079] macb ff0b0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0b0000 irq 38 (00:0a:35:0f:2b:0e)
[    4.933631] macb ff0c0000.ethernet: Not enabling partial store and forward
[    4.966238] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    4.972788] xilinx-axipmon fd0b0000.perf-monitor: Probed Xilinx APM
[    4.979274] xilinx-axipmon fd490000.perf-monitor: Probed Xilinx APM
[    4.985744] xilinx-axipmon ffa10000.perf-monitor: Probed Xilinx APM
[    4.993400] i2c i2c-1: Added multiplexed i2c bus 3
[    4.998307] i2c i2c-1: Added multiplexed i2c bus 4
[    5.003219] i2c i2c-1: Added multiplexed i2c bus 5
[    5.008124] i2c i2c-1: Added multiplexed i2c bus 6
[    5.012922] pca954x 1-0074: registered 4 multiplexed busses for I2C switch pca9546
[    5.021457] at24 1-0050: supply vcc not found, using dummy regulator
[    5.028119] at24 1-0050: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
[    5.034956] at24 1-0051: supply vcc not found, using dummy regulator
[    5.041607] at24 1-0051: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
[    5.048503] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 41
[    5.055840] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer with timeout 60s
[    5.063272] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    5.072680] macb ff0c0000.ethernet: Not enabling partial store and forward
[    5.079587] macb ff0c0000.ethernet: invalid hw address, using random
[    5.093357] macb ff0c0000.ethernet eth1: Cadence GEM rev 0x50070106 at 0xff0c0000 irq 39 (8e:6f:3c:c3:bf:64)
[    5.122406] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.127904] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[    5.135653] xhci-hcd xhci-hcd.1.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x0000000002010810
[    5.145071] xhci-hcd xhci-hcd.1.auto: irq 55, io mem 0xfe200000
[    5.151187] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[    5.159453] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.166671] usb usb1: Product: xHCI Host Controller
[    5.171539] usb usb1: Manufacturer: Linux 5.15.19-xilinx-v2022.1 xhci-hcd
[    5.178324] usb usb1: SerialNumber: xhci-hcd.1.auto
[    5.183975] hub 1-0:1.0: USB hub found
[    5.187751] hub 1-0:1.0: 1 port detected
[    5.191858] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.197349] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[    5.205010] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    5.211639] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[    5.219901] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.227119] usb usb2: Product: xHCI Host Controller
[    5.231988] usb usb2: Manufacturer: Linux 5.15.19-xilinx-v2022.1 xhci-hcd
[    5.238770] usb usb2: SerialNumber: xhci-hcd.1.auto
[    5.243910] hub 2-0:1.0: USB hub found
[    5.247674] hub 2-0:1.0: 1 port detected
[    5.272382] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[    5.277873] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
[    5.285611] xhci-hcd xhci-hcd.2.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x0000000002010810
[    5.295024] xhci-hcd xhci-hcd.2.auto: irq 58, io mem 0xfe300000
[    5.301111] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[    5.309372] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.316588] usb usb3: Product: xHCI Host Controller
[    5.321456] usb usb3: Manufacturer: Linux 5.15.19-xilinx-v2022.1 xhci-hcd
[    5.328233] usb usb3: SerialNumber: xhci-hcd.2.auto
[    5.333357] hub 3-0:1.0: USB hub found
[    5.337107] hub 3-0:1.0: 1 port detected
[    5.341196] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[    5.346691] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 4
[    5.354352] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed
[    5.361137] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[    5.369401] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.376617] usb usb4: Product: xHCI Host Controller
[    5.381490] usb usb4: Manufacturer: Linux 5.15.19-xilinx-v2022.1 xhci-hcd
[    5.388274] usb usb4: SerialNumber: xhci-hcd.2.auto
[    5.393410] hub 4-0:1.0: USB hub found
[    5.397163] hub 4-0:1.0: 1 port detected
[    5.404143] gpio-keys gpio-keys: Button without keycode
[    5.409377] gpio-keys: probe of gpio-keys failed with error -22
[    5.415372] of_cfs_init
[    5.417830] of_cfs_init: OK
[    5.420751] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    5.485301] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    5.546441] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    5.552969] clk: Not disabling unused clocks
[    5.557498] ALSA device list:
[    5.560456]   #0: DisplayPort monitor
[    5.564377] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    5.572992] cfg80211: failed to load regulatory.db
[    5.578282] Freeing unused kernel memory: 2176K
[    5.601338] Run /init as init process
[    5.637337] usb 3-1: new high-speed USB device number 2 using xhci-hcd
[    5.644537] usb 1-1: New USB device found, idVendor=0424, idProduct=2744, bcdDevice= 2.21
[    5.652768] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.659911] usb 1-1: Product: USB2744
[    5.663578] usb 1-1: Manufacturer: Microchip Tech
[    5.674193] random: python3: uninitialized urandom read (24 bytes read)
[    5.723781] hub 1-1:1.0: USB hub found
[    5.727620] hub 1-1:1.0: 4 ports detected
[    5.787580] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    5.795320] usb 3-1: New USB device found, idVendor=0424, idProduct=2744, bcdDevice= 2.21
[    5.803522] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.810666] usb 3-1: Product: USB2744
[    5.814334] usb 3-1: Manufacturer: Microchip Tech
[    5.819682] usb 2-1: New USB device found, idVendor=0424, idProduct=5744, bcdDevice= 2.21
[    5.827866] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    5.835000] usb 2-1: Product: USB5744
[    5.838657] usb 2-1: Manufacturer: Microchip Tech
[    5.873010] hub 3-1:1.0: USB hub found
[    5.876793] hub 3-1:1.0: 3 ports detected
[    5.899754] hub 2-1:1.0: USB hub found
[    5.903712] hub 2-1:1.0: 3 ports detected
[    5.937002] usb 4-1: new SuperSpeed USB device number 2 using xhci-hcd
[    5.961701] usb 4-1: New USB device found, idVendor=0424, idProduct=5744, bcdDevice= 2.21
[    5.969894] usb 4-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    5.977030] usb 4-1: Product: USB5744
[    5.980698] usb 4-1: Manufacturer: Microchip Tech
[    6.049100] hub 4-1:1.0: USB hub found
[    6.053051] hub 4-1:1.0: 2 ports detected
[    6.085307] usb 1-1.1: new high-speed USB device number 3 using xhci-hcd
[    6.195612] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2240, bcdDevice= 1.98
[    6.203962] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    6.211260] usb 1-1.1: Product: Ultra Fast Media 
[    6.215955] usb 1-1.1: Manufacturer: Generic
[    6.220216] usb 1-1.1: SerialNumber: 000000225001
[    6.225484] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[    6.231769] usb 3-1.3: new high-speed USB device number 3 using xhci-hcd
[    6.238655] scsi host0: usb-storage 1-1.1:1.0
[    6.321314] usb 1-1.4: new high-speed USB device number 4 using xhci-hcd
[    6.330809] macb ff0c0000.ethernet eth1: PHY [ff0c0000.ethernet-ffffffff:08] driver [TI DP83867] (irq=POLL)
[    6.338038] usb 3-1.3: New USB device found, idVendor=0424, idProduct=2740, bcdDevice= 2.00
[    6.340558] macb ff0c0000.ethernet eth1: configuring for phy/rgmii-id link mode
[    6.348887] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.348893] usb 3-1.3: Product: Hub Controller
[    6.348898] usb 3-1.3: Manufacturer: Microchip Tech
[    6.373335] pps pps0: new PPS source ptp0
[    6.377423] macb ff0c0000.ethernet: gem-ptp-timer ptp clock registered.
MAC address for eth1 is updated to 00:0a:35:0f:40:0f
[    6.392200] random: python3: uninitialized urandom read (24 bytes read)
[    6.434049] usb 1-1.4: New USB device found, idVendor=0424, idProduct=2740, bcdDevice= 2.00
[    6.442425] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.449742] usb 1-1.4: Product: Hub Controller
[    6.454182] usb 1-1.4: Manufacturer: Microchip Tech
[    6.998412] macb ff0b0000.ethernet eth0: PHY [ff0c0000.ethernet-ffffffff:04] driver [TI DP83867] (irq=POLL)
[    7.008174] macb ff0b0000.ethernet eth0: configuring for phy/sgmii link mode
[    7.015799] pps pps1: new PPS source ptp1
[    7.019881] macb ff0b0000.ethernet: gem-ptp-timer ptp clock registered.
MAC address for eth0 is updated to 00:0a:35:0f:2b:0e
[    7.262108] scsi 0:0:0:0: Direct-Access     Generic  Ultra HS-COMBO   1.98 PQ: 0 ANSI: 0
[    7.271475] sd 0:0:0:0: [sda] 60526592 512-byte logical blocks: (31.0 GB/28.9 GiB)
[    7.279622] sd 0:0:0:0: [sda] Write Protect is off
[    7.285038] sd 0:0:0:0: [sda] No Caching mode page found
[    7.290345] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    7.300053]  sda: sda1 sda2
[    7.304629] sd 0:0:0:0: [sda] Attached SCSI removable disk
root: clean, 70496/524288 files, 420012/1048576 blocks
[    8.675852] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[    9.382362] systemd[1]: System time before build time, advancing clock.
[    9.432312] 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)
[    9.462611] systemd[1]: Detected architecture arm64.

Welcome to PetaLinux 2022.1_update1_05131710 (honister)!

[    9.498253] systemd[1]: Hostname set to <xilinx-kr260-starterkit-20221>.
[    9.519720] random: systemd: uninitialized urandom read (16 bytes read)
[    9.526360] systemd[1]: Initializing machine ID from random generator.
[    9.668227] systemd-sysv-generator[521]: SysV service '/etc/init.d/reboot' 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.
[    9.692522] systemd-sysv-generator[521]: SysV service '/etc/init.d/single' 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.
[    9.717087] systemd-sysv-generator[521]: SysV service '/etc/init.d/sendsigs' 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.
[    9.741638] systemd-sysv-generator[521]: SysV service '/etc/init.d/halt' 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.
[    9.765481] systemd-sysv-generator[521]: 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.
[    9.791600] systemd-sysv-generator[521]: SysV service '/etc/init.d/save-rtc.sh' 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.
[    9.816547] systemd-sysv-generator[521]: 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.
[    9.841127] systemd-sysv-generator[521]: SysV service '/etc/init.d/umountnfs.sh' 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.
[    9.867139] systemd-sysv-generator[521]: SysV service '/etc/init.d/urandom' 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.
[    9.894215] systemd-sysv-generator[521]: 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.
[    9.918906] systemd-sysv-generator[521]: SysV service '/etc/init.d/umountfs' 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.
[   10.073581] macb ff0b0000.ethernet eth0: unable to generate target frequency: 125000000 Hz
[   10.082968] macb ff0b0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   10.090644] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.304651] systemd[1]: Queued start job for default target Graphical Interface.
[   10.312956] random: systemd: uninitialized urandom read (16 bytes read)
[   10.347853] systemd[1]: Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/getty.
[   10.369421] random: systemd: uninitialized urandom read (16 bytes read)
[   10.377376] systemd[1]: Created slice Slice /system/modprobe.
[  OK  ] Created slice Slice /system/modprobe.
[   10.398593] systemd[1]: Created slice Slice /system/serial-getty.
[  OK  ] Created slice Slice /system/serial-getty.
[   10.422309] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[   10.445547] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[   10.469474] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[   10.493610] systemd[1]: Reached target Path Units.
[  OK  ] Reached target Path Units.
[   10.509388] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[   10.529388] systemd[1]: Reached target Slice Units.
[  OK  ] Reached target Slice Units.
[   10.545396] systemd[1]: Reached target Swaps.
[  OK  ] Reached target Swaps.
[   10.562747] systemd[1]: Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[   10.585376] systemd[1]: Reached target RPC Port Mapper.
[  OK  ] Reached target RPC Port Mapper.
[   10.605605] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[   10.621501] systemd[1]: Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[   10.645813] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[   10.665567] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[   10.685653] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[   10.701782] systemd[1]: Listening on Network Service Netlink Socket.
[  OK  ] Listening on Network Service Netlink Socket.
[   10.726588] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[   10.749595] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[   10.769595] systemd[1]: Listening on User Database Manager Socket.
[  OK  ] Listening on User Database Manager Socket.
[   10.795812] systemd[1]: Mounting Huge Pages File System...
         Mounting Huge Pages File System...
[   10.815860] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[   10.839946] systemd[1]: Mounting Kernel Debug File System...
         Mounting Kernel Debug File System...
[   10.857688] systemd[1]: Condition check resulted in Kernel Trace File System being skipped.
[   10.869687] systemd[1]: Mounting Temporary Directory /tmp...
         Mounting Temporary Directory /tmp...
[   10.887116] systemd[1]: Condition check resulted in Create List of Static Device Nodes being skipped.
[   10.899326] systemd[1]: Starting Load Kernel Module configfs...
         Starting Load Kernel Module configfs...
[   10.920508] systemd[1]: Starting Load Kernel Module drm...
         Starting Load Kernel Module drm...
[   10.940300] systemd[1]: Starting Load Kernel Module fuse...
         Starting Load Kernel Module fuse...
[   10.964263] systemd[1]: Starting RPC Bind...
         Starting RPC Bind...
[   10.977550] systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
[   10.999217] systemd[1]: Starting Load Kernel Modules...
         Starting Load Kernel Modules...
[   11.016188] systemd[1]: Starting Remount Root and Kernel File Systems...
         Starting Remount Root and Kernel File Systems...
[   11.037540] EXT4-fs (sda2): re-mounted. Opts: (null). Quota mode: none.
[   11.040374] systemd[1]: Starting Coldplug All udev Devices...
[   11.045510] dmaproxy: loading out-of-tree module taints kernel.
         Starting Coldplug All udev Devices...
[   11.071211] systemd[1]: Mounted Huge Pages File System.
[  OK  ] Mounted Huge Pages File System.
[   11.093749] systemd[1]: Started RPC Bind.
[  OK  ] Started RPC Bind.
[   11.109860] systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
[   11.133790] systemd[1]: Mounted Kernel Debug File System.
[  OK  ] Mounted Kernel Debug File System.
[   11.153702] systemd[1]: Mounted Temporary Directory /tmp.
[  OK  ] Mounted Temporary Directory /tmp[   11.159435] random: crng init done
[   11.168382] random: 5 urandom warning(s) missed due to ratelimiting
.
[   11.186340] systemd[1]: modprobe@configfs.service: Deactivated successfully.
[   11.194582] systemd[1]: Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module configfs.
[   11.218264] systemd[1]: modprobe@drm.service: Deactivated successfully.
[   11.226131] systemd[1]: Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module drm.
[   11.250414] systemd[1]: modprobe@fuse.service: Deactivated successfully.
[   11.258439] systemd[1]: Finished Load Kernel Module fuse.
[  OK  ] Finished Load Kernel Module fuse.
[   11.283337] systemd[1]: Finished Load Kernel Modules.
[  OK  ] Finished Load Kernel Modules.
[   11.299305] systemd[1]: Finished Remount Root and Kernel File Systems.
[  OK  ] Finished Remount Root and Kernel File Systems.
[   11.326296] systemd[1]: Mounting NFSD configuration filesystem...
         Mounting NFSD configuration filesystem...
[   11.341867] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[   11.352882] systemd[1]: Mounting Kernel Configuration File System...
         Mounting Kernel Configuration File System...
[   11.379880] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
[   11.388515] systemd[1]: Condition check resulted in Platform Persistent Storage Archival being skipped.
[   11.400894] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...
[   11.420545] systemd[1]: Starting Create System Users...
         Starting Create System Users...
[   11.447019] systemd[1]: Failed to mount NFSD configuration filesystem.
[FAILED] Failed to mount NFSD configuration filesystem.
See 'systemctl status proc-fs-nfsd.mount' for details.
[DEPEND] Dependency failed for NFS Mount Daemon.
[DEPEND] Dependency failed for NFS server and services.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Finished Apply Kernel Variables.
[  OK  ] Finished Create System Users.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Preparation for Local File Systems.
         Mounting /var/volatile...
[  OK  ] Started Entropy Daemon based on the HAVEGE algorithm.
         Starting Journal Service...
         Starting Rule-based Manage…for Device Events and Files...
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Mounted /var/volatile.
         Starting Load/Save Random Seed...
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Started Journal Service.
[  OK  ] Started Rule-based Manager for Device Events and Files.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Finished Flush Journal to Persistent Storage.
[  OK  ] Reached target Sound Card.
[  OK  ] Found device Ultra_HS-COMBO boot.
[  OK  ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
         Mounting /boot...
[  OK  ] Mounted /boot.
[  OK  ] Reached target Local File Systems.
         Starting Rebuild Dynamic Linker Cache...
         Starting Create Volatile Files and Directories...
[  OK  ] Finished Create Volatile Files and Directories.
         Starting Run pending postinsts...
         Starting Rebuild Journal Catalog...
         Starting Network Time Synchronization...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
[  OK  ] Finished Rebuild Journal Catalog.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Set.
[FAILED] Failed to start Rebuild Dynamic Linker Cache.
See 'systemctl status ldconfig.service' for details.
         Starting Update is Completed...
[  OK  ] Finished Update is Completed.
[  OK  ] Finished Run pending postinsts.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  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 archconfig.
[  OK  ] Started Job spooling tools.
[  OK  ] Started Periodic Command Scheduler.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started dfx-mgrd Dynamic Function eXchange.
[  OK  ] Started Start fan control, if configured.
         Starting inetd.busybox.service...
         Starting IPv6 Packet Filtering Framework...
         Starting IPv4 Packet Filtering Framework...
[  OK  ] Started System Logging Service.
         Starting User Login Management...
[  OK  ] Started Xserver startup without a display manager.
[  OK  ] Finished IPv6 Packet Filtering Framework.
[  OK  ] Finished IPv4 Packet Filtering Framework.
[  OK  ] Reached target Preparation for Network.
Nov 19 09:19:18 xilinx-kr260-starterkit-20221 kernel: GIC: Adjusting CPU interface base to 0x00000000f902f000
         Starting Network Configuration...
Nov 19 09:19:20 xilinx-kr260-starterkit-20221 kernel: armv8-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: cacheinfo: Unable to detect cache hierarchy for CPU 0
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: mtdoops: mtd device (mtddev=name/number) must be supplied
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1271
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1273
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1281
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1283
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1285
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1801
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1805
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1807
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1831
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1835
Nov 19 09:19:21 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1837
Nov 19 09:19:22 xilinx-kr260-starterkit-20221 kernel: zynqmp_pll_disable() clock disable failed for dpll_int, ret = -13
Nov 19 09:19:22 xilinx-kr260-starterkit-20221 kernel: OF: graph: no port node found in /axi/display@fd4a0000
Nov 19 09:19:22 xilinx-kr260-starterkit-20221 kernel: tpm tpm0: A TPM error (256) occurred attempting the self test
Nov 19 09:19:23 xilinx-kr260-starterkit-20221 kernel: at24 1-0050: supply vcc not found, using dummy regulator
Nov 19 09:19:23 xilinx-kr260-starterkit-20221 kernel: at24 1-0051: supply vcc not found, using dummy regulator
Nov 19 09:19:23 xilinx-kr260-starterkit-20221 kernel: gpio-keys gpio-keys: Button without keycode
Nov 19 09:19:23 xilinx-kr260-starterkit-20221 kernel: gpio-keys: probe of gpio-keys failed with error -22
Nov 19 09:19:23 xilinx-kr260-starterkit-20221 kernel: clk: Not disabling unused clocks
Nov 19 09:19:23 xilinx-kr260-starterkit-20221 kernel: platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
Nov 19 09:19:25 xilinx-kr260-starterkit-20221 kernel: sd 0:0:0:0: [sda] No Caching mode page found
Nov 19 09:19:25 xilinx-kr260-starterkit-20221 kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
Nov 19 09:19:28 xilinx-kr260-starterkit-20221 kernel: macb ff0b0000.ethernet eth0: unable to generate target frequency: 125000000 Hz
Nov 19 09:19:29 xilinx-kr260-starterkit-20221 kernel: dmaproxy: loading out-of-tree module taints kernel.
[  OK  ] Started inetd.busybox.service.
[  OK  ] Started User Login Management.
[  OK  ] Started Network Configuration.
         Starting Wait for Network to be Configured...
         Starting Network Name Resolution...
Nov 19 09:19:38 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
Nov 19 09:19:38 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets
[  OK  ] Finished Wait for Network to be Configured.
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Reached target Host and Network Name Lookups.
         Starting DNS forwarder and DHCP server...
[  OK  ] Started NFS status monitor for NFSv2/3 locking..
[  OK  ] Started Respond to IPv6 Node Information Queries.
         Starting Network Time Service...
[  OK  ] Started Network Router Discovery Daemon.
[  OK  ] Started som-dashboard-init.
         Starting Permit User Sessions...
         Starting Target Communication Framework agent...
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyPS1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started DNS forwarder and DHCP server.
[  OK  ] Started Target Communication Framework agent.
[  OK  ] Started Network Time Service.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Record Runlevel Change in UTMP...
[  OK  ] Finished Record Runlevel Change in U[   21.472908] som-dashboard.sh[1261]: SOM Dashboard will be running at http://192.168.3.28:5006/som-dashboard

PetaLinux 2022.1_update1_05131710 xilinx-kr260-starterkit-20221 ttyPS1

xilinx-kr260-starterkit-20221 login: [   30.734362] som-dashboard.sh[1292]: 2021-11-19 09:19:49,482 Starting Bokeh server version 2.4.2 (running on Tornado 6.1)
[   30.741897] som-dashboard.sh[1292]: 2021-11-19 09:19:49,490 User authentication hooks NOT provided (default user enabled)
[   30.766067] som-dashboard.sh[1292]: 2021-11-19 09:19:49,514 Bokeh app running at: http://localhost:5006/som-dashboard
[   30.766453] som-dashboard.sh[1292]: 2021-11-19 09:19:49,514 Starting Bokeh server with process id: 1292

  1. 2023年03月09日 04:00 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する5

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する4”の続き。

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加してみようということで、前回は、、PL デザインのデバイスツリー・オーバレイを生成して、KR260 の Petalinux に転送するファイルを集めて転送した。今回は、/lib/firmware ディレクトリにファイルをコピーし、PL デザインやデバイスツリー・オーバレイをロードした。/sys/devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform: にプラットホームの IP がロードされているのが確認できた。

/lib/firmware/xilinx/kr260_ip を作成し、kr260_ip.dtbo, kr260_ip.bit.bin, shell.json をそこに転送する。
cd kr260_ip
sudo mkdir /lib/firmware/xilinx/kr260_ip
sudo cp kr260_ip.dtbo kr260_ip.bin shell.json /lib/firmware/xilinx/kr260_ip

KR260_318_230306.png

デフォルトのアプリケーションをアンロードし、kr260_ip をロードする。
sudo xmutil listapps
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ip

KR260_319_230306.png

kr260_ip をロードした時のターミナルの様子を示す。
KR260_320_230306.png

ログを貼っておく。

Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay0
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay1
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking1
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/overlay2
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/DMA_pow2_0
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/PMOD_0
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/PMOD_1
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/PMOD_2
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/PMOD_3
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_dma_0
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_intc_0
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_timer_0
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/multi_axi4ls_0
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: xilinx-vdma 80050000.dma: error -EINVAL: failed to get irq
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: xilinx-vdma: probe of 80050000.dma failed with error -22
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: irq-xilinx: mismatch in kind-of-intr param
Mar  3 12:12:15 xilinx-kr260-starterkit-20221 kernel: zocl-drm axi:zyxclmm_drm: IRQ index 32 not found


やはり、dma でエラーが出ている。

kr260_ip のロードの前後で、どのモジュールが増えたのかを tree と diff を使って検証してみた。
現在 kr260_ip がロードされている状態で tree の結果を class_new.txt に保存した。
tree /sys/class > class_new.txt

kr260_ip をアンロードして、tree の結果を class_org.txt に保存した。
sudo xmutil unloadapp
tree /sys/class > class_org.txt


class_new.txt と class_org.txt の diff を取った。
diff class_new.txt class_org.txt > diff_class.txt
KR260_321_230307.png

diff_class.txt を示す。
KR260_322_230307.png

diff_class.txt を貼っておく。

114d113
< |   |-- platform:80000000.interrupt-controller--platform:axi:zyxclmm_drm -> ../../devices/virtual/devlink/platform:80000000.interrupt-controller--platform:axi:zyxclmm_drm
150,160d148
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:80000000.interrupt-controller -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:80000000.interrupt-controller
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:80010000.gpio -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:80010000.gpio
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:80020000.gpio -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:80020000.gpio
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:80030000.gpio -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:80030000.gpio
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:80040000.gpio -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:80040000.gpio
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:80050000.dma -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:80050000.dma
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:80060000.timer -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:80060000.timer
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:80070000.DMA_pow2 -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:80070000.DMA_pow2
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:80080000.multi_axi4ls -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:80080000.multi_axi4ls
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:axi:clocking0 -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:axi:clocking0
< |   |-- platform:firmware:zynqmp-firmware:clock-controller--platform:axi:clocking1 -> ../../devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform:axi:clocking1
247,248d234
< |   |-- card1 -> ../../devices/platform/axi/axi:zyxclmm_drm/drm/card1
< |   |-- renderD128 -> ../../devices/platform/axi/axi:zyxclmm_drm/drm/renderD128
260,263d245
< |   |-- gpiochip468 -> ../../devices/platform/axi/80040000.gpio/gpio/gpiochip468
< |   |-- gpiochip476 -> ../../devices/platform/axi/80030000.gpio/gpio/gpiochip476
< |   |-- gpiochip484 -> ../../devices/platform/axi/80020000.gpio/gpio/gpiochip484
< |   |-- gpiochip492 -> ../../devices/platform/axi/80010000.gpio/gpio/gpiochip492
1028c1010
< 1020 directories, 5 files
---
> 1002 directories, 5 files


結果によると、devices/virtual/devlink/platform:firmware:zynqmp-firmware:clock-controller--platform: にデバイスがロードされている様だ。
KR260_323_230307.png

/sys/devices/platform/axi ディレクトリにもデバイスがロードされている。
KR260_324_230307.png
  1. 2023年03月07日 05:10 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する4

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する3”の続き。

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加してみようということで、前回は、KR260 の Petalinux 2022.1 に必要なパッケージをインストールした。今回は、PL デザインのデバイスツリー・オーバレイを生成して、KR260 の Petalinux に転送するファイルを集めて転送した。

xsct を使って、AXI GPIO デザイン用にオーバレイ・ノードを含むデバイスツリー・ソースコードを用意する。
なお、ディレクトリがたくさんできて見にくいので、dtg ディレクトリを作って、その下にディレクトリを生成することにする。
cd ../kr260_custom_platform/
mkdir dtg
xsct
hsi::open_hw_design ../kr260_custom/kr260_custom.xsa
createdts -hw ../kr260_custom/kr260_custom.xsa -zocl -platform-name kr260_custom -git-branch xlnx_rel_v2022.1 -overlay -compile -out ./dtg/dtg_kr260_ip
exit

KR260_312_230306.png

KR260_313_230306.png

createdts コマンドでエラーが出ている。ログを示す。

(base) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform$ xsct
rlwrap: warning: your $TERM is 'xterm-256color' but rlwrap couldn't find it in the terminfo database. Expect some problems.
                                                                                
****** Xilinx Software Commandline Tool (XSCT) v2022.1.0
  **** SW Build 3524075 on 2022-04-13-17:42:45
    ** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.


xsct% hsi::open_hw_design ../kr260_custom/kr260_custom.xsa                      
INFO: [Hsi 55-2053] elapsed time for repository (/media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2022.1/data/embeddedsw) loading 11 seconds
hsi::open_hw_design: Time (s): cpu = 00:00:09 ; elapsed = 00:00:21 . Memory (MB): peak = 2412.008 ; gain = 0.000 ; free physical = 1276 ; free virtual = 34543
kr260_bd_wrapper
xsct% createdts -hw ../kr260_custom/kr260_custom.xsa -zocl -platform-name kr260_custom -git-branch xlnx_rel_v2022.1 -overlay -compile -out ./dtg/dtg_kr260_ip
INFO: Downloading DTG repo from https://github.com/Xilinx/device-tree-xlnx.git to /media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform/dtg/dtg_kr260_ip
Cloning into 'device-tree-xlnx'...                                              
remote: Enumerating objects: 12009, done.
remote: Counting objects: 100% (3377/3377), done.
remote: Compressing objects: 100% (748/748), done.
remote: Total 12009 (delta 2141), reused 3351 (delta 2118), pack-reused 8632
Receiving objects: 100% (12009/12009), 2.25 MiB | 6.81 MiB/s, done.
Resolving deltas: 100% (6478/6478), done.                                       
hsi::open_hw_design: Time (s): cpu = 00:00:08 ; elapsed = 00:00:08 . Memory (MB): peak = 2412.008 ; gain = 0.000 ; free physical = 987 ; free virtual = 34423
INFO: Creating platform kr260_custom at ./dtg/dtg_kr260_ip                      
Opening the hardware design, this may take few seconds.
INFO: Populating the default qemu data for the domain "device_tree_domain" from the install location /media/masaaki/Ubuntu_Disk/tools/Xilinx/Vitis/2022.1/data/emulation/platforms/zynqmp/sw/a53_standalone/qemu/
WARNING: Interrupt pin "interrupt" of IP block: "DMA_pow2_0" is not connected to any interrupt controller

WARNING: Interrupt pin "mm2s_introut" of IP block: "axi_dma_0" is not connected to any interrupt controller

WARNING: Interrupt pin "s2mm_introut" of IP block: "axi_dma_0" is not connected to any interrupt controller

WARNING: Interrupt pin "interrupt" of IP block: "axi_timer_0" is not connected to any interrupt controller

WARNING: Interrupt pin "interrupt" of IP block: "multi_axi4ls_0" is not connected to any interrupt controller

zocl:false                                                                      
ext_platform:
WARNING: axi_dma_0 connected ip is NULL for the pin M_AXIS_MM2S                 
WARNING: axi_dma_0 connected ip is NULL for the pin M_AXIS_MM2S
WARNING: ERROR: axi_dma_0: mm2s_introut port is not connected
WARNING: ERROR: axi_dma_0: s2mm_introut port is not connected
WARNING: label 'usb0' found in existing tree                                    
WARNING: label 'usb1' found in existing tree
INFO: Generating device tree                                                    
WARNING: Interrupt pin "interrupt" of IP block: "DMA_pow2_0" is not connected to any interrupt controller

WARNING: Interrupt pin "mm2s_introut" of IP block: "axi_dma_0" is not connected to any interrupt controller

WARNING: Interrupt pin "s2mm_introut" of IP block: "axi_dma_0" is not connected to any interrupt controller

WARNING: Interrupt pin "interrupt" of IP block: "axi_timer_0" is not connected to any interrupt controller

WARNING: Interrupt pin "interrupt" of IP block: "multi_axi4ls_0" is not connected to any interrupt controller

zocl:true                                                                       
ext_platform:
intr_ctrl_len:1
WARNING: axi_dma_0 connected ip is NULL for the pin M_AXIS_MM2S                 
WARNING: axi_dma_0 connected ip is NULL for the pin M_AXIS_MM2S
WARNING: ERROR: axi_dma_0: mm2s_introut port is not connected
WARNING: ERROR: axi_dma_0: s2mm_introut port is not connected
WARNING: label 'usb0' found in existing tree                                    
WARNING: label 'usb1' found in existing tree                                    
Building the BSP Library for domain  - device_tree_domain on processor psu_cortexa53_0
make: Nothing to be done for 'all'.                                             

system-top.dts:24.9-27.4: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name
zynqmp.dtsi:811.43-815.6: Warning (pci_device_reg): /axi/pcie@fd0e0000/legacy-interrupt-controller: missing PCI reg property
xsct% exit                                                                           


”WARNING: ERROR: axi_dma_0: mm2s_introut port is not connected”が出ている。この辺りのワードで検索すると 3 個検索に引っかかった。
petalinux error mm2s_introut port is not connected
Errors whilst compiling/loading devicetree for DMA and ACP
Device tree generator error - broken between 2015.4 and 2016.

エラーは出ているが、pl.dtbi は生成されているようなので、先に進める。

デバイスツリー・オーバレイを dtc でコンパイルする。
dtc -@ -O dtb -o ./dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo ./dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi
KR260_314_230306.png

ここでもメッセージが出ているが、pl.dtbo は生成されている。
KR260_315_230306.png

ログを示す。

(base) masaaki@masaaki-H110M4-M01:/media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/kr260_custom_platform$ dtc -@ -O dtb -o ./dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo ./dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi
./dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi:147.26-152.7: Warning (unit_address_vs_reg): /fragment@2/__overlay__/dma@80050000/dma-channel@80050000: node has a unit name, but no reg property
./dtg/dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtsi:153.26-158.7: Warning (unit_address_vs_reg): /fragment@2/__overlay__/dma@80050000/dma-channel@80050030: node has a unit name, but no reg property


./dtg/ip_file_transfer ディレクトリを作成して、必要なファイルを集める。
shell.json は以前作成したファイルがあるので、それをコピーする。
mkdir ./dtg/ip_file_transfer
cd ./dtg/ip_file_transfer
cp ../../vadd_file_transfer/shell.json ./
cp ../dtg_kr260_ip/dtg/dtg_kr260_ip/kr260_custom/psu_cortexa53_0/device_tree_domain/bsp/pl.dtbo ./kr260_ip.dtbo
cp ../../../kr260_custom/kr260_custom.runs/impl_1/kr260_bd_wrapper.bin ./kr260_ip.bin

KR260_316_230306.png

ip_file_transfer ディレクトリのファイルを KR260 の Petalinux に FileZilla で転送する。
最初に KR260 の /home/petalinux に kr260_ip ディレクトリを作成した。
kr260_ip ディレクトリに FileZilla でファイルを転送した。
KR260_317_230306.png
  1. 2023年03月06日 04:44 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

MicroBlaze で axi timer の割り込みを使用する

ZYBO Z7-20 で MicroBlaze プロセッサを使用した axi timer の割り込みを試してみたので、ブログに書いておく。

Vivado 2022.2 で ZYBO Z7-20 用の axi_timer_test プロジェクトを作成した。
axi_timer_test_2_230305.png

小林さんの”FPGAプログラミング大全 Xilinx編 第2版”を参考にして、MicroBlaze の設定をした。
最初、microblaze_0_local_memory を実装できずに悩んでいたのだが、”FPGAプログラミング大全 Xilinx編 第2版”を見て、MicroBlaze を Add IP してから、Run Block Automation をクリックすると MicroBlaze 周辺一式が実装される。
今回は、Run Block Automation ダイアログの Interrupt Controller にもチェックを入れて AXI Interrupt Contoller も実装した。
axi_timer_test_1_230305.png

axi timer を実装した。axi_timer_0 の設定を示す。
axi_timer_test_7_230305.png

axi gpio を実装した。設定を示す。
GPIO は Make External で leds_4bits に接続してある。
axi_timer_test_8_230305.png

timer_bd プロック・デザイン全体を示す。
axi_timer_test_3_230305.png

Address Editor 画面を示す。
axi_timer_test_4_230305.png

Vitis でアプリケーション・ソフトウェアを作成して、ビルドしてからになるが、microblaze_0 で実装するアプリケーション・ソフトウェアをロードする様に設定した。
Vivado の Tools メニューから Associate ELF File... を選択して、microblaze_0 に ELF ファイルを指定した。
axi_timer_test_9_230305.png

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

Vivado の Tools メニューから Launch Vitis IDE を選択して、Vitis 2022.2 を起動した。
axi_timer_test アプリケーション・プロジェクトを作成した。
timer_bd_wrapper プラットホームも一緒に生成された。
アプリケーション・ソフトウェアの axi_timer_test.c を書いた。
axi_timer_test.c を書く際には、”MicroBlazeのタイマー割り込みを使う”のコードを大幅に引用させていただいた。
また、GPIO のコードは、”Xilinx AXI GPIO の使い方”を参考にさせていただいた。
axi_timer_test.c を貼っておく。

// axi_timer_test.c
// 2023/03/02 by marsee
// ”MicroBlazeのタイマー割り込みを使う” https://e-trees.jp/wp/?p=316 からコードを引用
// gpio関連のコードを”Xilinx AXI GPIO の使い方” https://qiita.com/s_nkg/items/800e0559332495605056 から引用

#include <stdio.h>

#include "xtmrctr.h"
#include "xintc.h"
#include "xparameters.h"
#include "xbasic_types.h"
#include "xgpio.h"

void timer_int_handler();

XTmrCtr tmr;
XIntc intc;
XGpio gpio_0;
u32 gpio_status=0;

void timer_int_handler()
{
    volatile unsigned int csr;
    csr = XTmrCtr_GetControlStatusReg(XPAR_AXI_TIMER_0_BASEADDR, 0);
    if(gpio_status == 0)
        gpio_status = 0xf;
    else
        gpio_status = 0;
    XGpio_DiscreteWrite(&gpio_0, 1, gpio_status);
    XTmrCtr_SetControlStatusReg(XPAR_AXI_TIMER_0_BASEADDR, 0, csr);
}

int main()
{
    XIntc_Initialize(&intc, XPAR_INTC_0_DEVICE_ID);
    XTmrCtr_Initialize(&tmr, XPAR_AXI_TIMER_0_DEVICE_ID);
    XGpio_Initialize(&gpio_0, XPAR_GPIO_0_DEVICE_ID);

    XIntc_Connect(&intc, XPAR_INTC_0_TMRCTR_0_VEC_ID, (XInterruptHandler)XTmrCtr_InterruptHandler, (void*)&tmr);
    XIntc_Start(&intc, XIN_REAL_MODE);
    XIntc_Enable(&intc, XPAR_INTC_0_TMRCTR_0_VEC_ID);

    XTmrCtr_SetHandler(&tmr, (void*)timer_int_handler, (void*)0);

    microblaze_enable_interrupts();

    // see LogiCORE IP AXI Timer Product Guide, PG079
    XTmrCtr_SetOptions(&tmr, 0, XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION | XTC_DOWN_COUNT_OPTION);
    XTmrCtr_SetResetValue(&tmr, 0, 50000000);
    XTmrCtr_Start(&tmr, 0);

    for(;;){}

    return 0;
}


Vitis 画面を貼っておく。
axi_timer_test_6_230305.png

これで Run したところ、ZYBO Z7-20 の 4 個の LED が 0.5 秒ごとに値を反転して、点滅した。成功だ。
  1. 2023年03月05日 05:18 |
  2. FPGAを使用したシステム
  3. | トラックバック:0
  4. | コメント:0

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する3

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する2”の続き。

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加してみようということで、前回は、Petalinux 2022.1 の linux_os プロジェクトに XSA ファイルをインポートし、ビルドを行って成功した。wic イメージ・ファイルを作成した。wic ファイルを MicroSD カードに書き込んで、KR260 に挿入し、Petalinux 2022.1 を起動した。今回は、KR260 の Petalinux 2022.1 に必要なパッケージをインストールした。

まずはファイル・マネージャーから。pcmafm をインストールする。
sudo dnf install pcmanfm.cortexa72_cortexa53

pcmanfm & で起動できた。
KR260_310_230303.png

packagegroup-petalinux-opencv-dbg をインストールした。
sudo dnf install packagegroup-petalinux-opencv-dbg

openssh-sftp-server をインストールした。
sudo dnf install openssh-sftp-server.cortexa72_cortexa53

テキスト・エディタの l3afpad をインストールした。
sudo dnf install l3afpad.cortexa72_cortexa53

l3afpad & で起動した。
KR260_311_230303.png

gtk-play をインストールする。
gst-examples をインストールした。
sudo dnf install gst-examples.cortexa72_cortexa53

pcmanfm から gtk-play を起動できるようにした。
IMG_20191030_051740.jpg ファイルをダブルクリックで開くと、Choose Application ダイアログが開く。
Custom Command Line タブをクリックして、Command line to execute: に gtk-play %f と入力し、”Set selected application as default action for this file type”のチェックボックスにチェックを入れた。
なお、以前のキャプチャ図を使っているので、下図にも書かれていないが、今回は、Application namegtk-play と書いた。それは、Application name に書かないと、その時はファイルを開けるが、2回目に JPEG ファイルをダブルクリックで開くことができなかった、という理由だ。
KR260_111_230126.png

IMG_20191030_051740.jpg を表示できた。
KR260_228_230212.jpg
  1. 2023年03月04日 04:26 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する2

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する1”の続き。

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加してみようということで、前回は、の multi_axi4ls と DMA_pow2、そして、Xilinx 社の IP の axi timer、axi dma を Vivado 2022.1 の kr260_custom プロジェクトに追加して、XSA ファイルを生成した。今回は、Petalinux 2022.1 の linux_os プロジェクトに XSA ファイルをインポートし、ビルドを行って成功した。wic イメージ・ファイルを作成した。wic ファイルを MicroSD カードに書き込んで、KR260 に挿入し、Petalinux 2022.1 を起動した。

KR260 で Vitis アクセラレーション・プラットフォームを作成する4”で作成した Petalinux 2022.1 の linux_os プロジェクトを使用する。
最初に linux_os に axi_gpio を 4 個追加した Vivado プロジェクトの XSA ファイルをインポートする。
cd /media/masaaki/Ubuntu_Disk/KR260/kr260_custom_platform/linux_os
petalinux-config --get-hw-description ../kr260_custom

設定画面はデフォルトのまま exit した。
KR260_303_230302.png

KR260_304_230302.png

すでに設定済みなので、そのままビルドする。
petalinux-build
KR260_305_230302.png

ビルドに成功した。

wic イメージ・ファイルを作成する。
petalinux-package --wic --images-dir images/linux/ --bootfiles "ramdisk.cpio.gz.u-boot,boot.scr,Image,system.dtb,system-zynqmp-sck-kr-g-revB.dtb" --disk-name "sda"
KR260_306_230302.png

petalinux-sdimage.wic ファイルが再生成された。
KR260_307_230302.png

petalinux-sdimage.wic ファイルを balenaEtcher を使用して MicroSD カードに書き込んだ。

書き込み後に MicroSD カードに boot パーティションと root パーティションが生成された。

MicroSD カードを KV260 に挿入して電源 ON したところ、Petalinux 2022.1 が起動した。
KR260_308_230302.png

ID に petalinux を入力したところ、新しいパスワードを聞かれたので、入力した。
ifconfig をすると、KR260 の Petalinux 2022.1 に 192.168.3.28 の IP アドレスが割り当てられているのが分かった。
KR260_309_230302.png

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

Xilinx Zynq MP First Stage Boot Loader 
Release 2022.1   Sep 16 2022  -  04:56:15
MultiBootOffset: 0x1F0
Reset Mode  :   System Reset
Platform: Silicon (4.0), Running on A53-0 (64-bit) Processor, Device Name: XCZUUNKNEG
QSPI 32 bit Boot Mode 
FlashID=0x20 0xBB 0x20
Pr�NOTICE:  BL31: v2.6(release):0897efd
NOTICE:  BL31: Built : 04:58:29, Sep 16 2022


U-Boot 2022.01-g91ad7924-dirty (Sep 15 2022 - 23:00:49 -0600), Build: jenkins-BUILDS-2022.1-som_qspi_generation-131

CPU:   ZynqMP
Silicon: v3
Detected name: zynqmp-smk-k26-xcl2g-rev1-sck-kr-g-rev1
Model: ZynqMP SMK-K26 Rev1/B/A
Board: Xilinx ZynqMP
DRAM:  4 GiB
PMUFW:  v1.1
Xilinx I2C FRU format at nvmem0:
 Manufacturer Name: XILINX
 Product Name: SMK-K26-XCL2G
 Serial No: XFL1CYY0C2I3
 Part Number: 5057-04
 File ID: 0x0
 Revision Number: 1
Xilinx I2C FRU format at nvmem1:
 Manufacturer Name: XILINX
 Product Name: SCK-KR-G
 Serial No: XFL1V0BJCWOF
 Part Number: 5100-01
 File ID: 0x0
 Revision Number: 1
EL Level:   EL2
Chip ID:    xck26
NAND:  0 MiB
MMC:   
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Bootmode: QSPI_MODE
Reset reason:   SOFT 
Net:   
ZYNQ GEM: ff0b0000, mdio bus ff0c0000, phyaddr 4, interface sgmii
eth0: ethernet@ff0b0000
ZYNQ GEM: ff0c0000, mdio bus ff0c0000, phyaddr 8, interface rgmii-id
, eth1: ethernet@ff0c0000
starting USB...
Bus usb@fe200000: Register 2000440 NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@fe300000: Register 2000440 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@fe200000 for devices... 5 USB Device(s) found
scanning bus usb@fe300000 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0 
model=SMK-K26-XCL2G

Device 0: Vendor: Generic  Rev: 1.98 Prod: Ultra HS-COMBO
            Type: Removable Hard Disk
            Capacity: 29554.0 MB = 28.8 GB (60526592 x 512)
... is now current device
Scanning usb 0:1...
Found U-Boot script /boot.scr
2777 bytes read in 1 ms (2.6 MiB/s)
## Executing script at 20000000
Trying to load boot images from usb0
22401536 bytes read in 1489 ms (14.3 MiB/s)
46929 bytes read in 6 ms (7.5 MiB/s)
23217456 bytes read in 1542 ms (14.4 MiB/s)
## Loading init Ramdisk from Legacy Image at 04000000 ...
   Image Name:   petalinux-initramfs-image-xilinx
   Created:      2011-04-05  23:00:00 UTC
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    23217392 Bytes = 22.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00100000
   Booting using the fdt blob at 0x100000
   Loading Ramdisk to 779db000, end 78fff4f0 ... OK
   Loading Device Tree to 000000000fff1000, end 000000000ffff750 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.19-xilinx-v2022.1 (oe-user@oe-host) (aarch64-xilinx-linux-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP Thu May 12 09:05:30 UTC 2022
[    0.000000] Machine model: ZynqMP SMK-K26 Rev1/B/A
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] printk: bootconsole [cdns0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000000000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000087fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003ecfffff]
[    0.000000]   node   0: [mem 0x000000003ed00000-0x000000003ee47fff]
[    0.000000]   node   0: [mem 0x000000003ee48000-0x000000007fefffff]
[    0.000000]   node   0: [mem 0x0000000800000000-0x000000087fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000087fffffff]
[    0.000000] On node 0, zone Normal: 256 pages in unavailable ranges
[    0.000000] cma: Reserved 900 MiB at 0x000000003f400000
[    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: 1031940
[    0.000000] Kernel command line: earlycon console=ttyPS1,115200 clk_ignore_unused xilinx_tsn_ep.st_pcp=4 init_fatal_sh=1 cma=900M 
[    0.000000] Unknown kernel command line parameters "init_fatal_sh=1", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x000000007bf00000-0x000000007ff00000] (64MB)
[    0.000000] Memory: 3078456K/4193280K available (14528K kernel code, 1012K rwdata, 4056K rodata, 2176K init, 571K bss, 193224K reserved, 921600K cma-reserved)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    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/0x6d4 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 99.99MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171015c90f, max_idle_ns: 440795203080 ns
[    0.000000] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046511101ns
[    0.008308] Console: colour dummy device 80x25
[    0.012397] Calibrating delay loop (skipped), value calculated using timer frequency.. 199.99 BogoMIPS (lpj=399996)
[    0.022752] pid_max: default: 32768 minimum: 301
[    0.027505] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.034699] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.043443] rcu: Hierarchical SRCU implementation.
[    0.047498] EFI services will not be available.
[    0.051860] smp: Bringing up secondary CPUs ...
[    0.056570] Detected VIPT I-cache on CPU1
[    0.056608] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.056978] Detected VIPT I-cache on CPU2
[    0.057000] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.057335] Detected VIPT I-cache on CPU3
[    0.057356] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.057396] smp: Brought up 1 node, 4 CPUs
[    0.091692] SMP: Total of 4 processors activated.
[    0.096364] CPU features: detected: 32-bit EL0 Support
[    0.101468] CPU features: detected: CRC32 instructions
[    0.106605] CPU: All CPU(s) started at EL2
[    0.110648] alternatives: patching kernel code
[    0.116057] devtmpfs: initialized
[    0.124020] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.128120] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.160102] pinctrl core: initialized pinctrl subsystem
[    0.160577] DMI not present or invalid.
[    0.163743] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.170340] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    0.176477] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.184297] audit: initializing netlink subsys (disabled)
[    0.189704] audit: type=2000 audit(0.132:1): state=initialized audit_enabled=0 res=1
[    0.190050] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.204125] ASID allocator initialised with 65536 entries
[    0.209531] Serial: AMBA PL011 UART driver
[    0.231417] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.232479] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.239150] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.245808] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    1.215015] cryptd: max_cpu_qlen set to 1000
[    1.237423] DRBG: Continuing without Jitter RNG
[    1.337138] raid6: neonx8   gen()  2374 MB/s
[    1.405185] raid6: neonx8   xor()  1763 MB/s
[    1.473242] raid6: neonx4   gen()  2422 MB/s
[    1.541291] raid6: neonx4   xor()  1725 MB/s
[    1.609354] raid6: neonx2   gen()  2292 MB/s
[    1.677401] raid6: neonx2   xor()  1588 MB/s
[    1.745476] raid6: neonx1   gen()  1956 MB/s
[    1.813512] raid6: neonx1   xor()  1348 MB/s
[    1.881578] raid6: int64x8  gen()  1519 MB/s
[    1.949620] raid6: int64x8  xor()   859 MB/s
[    2.017692] raid6: int64x4  gen()  1775 MB/s
[    2.085734] raid6: int64x4  xor()   946 MB/s
[    2.153806] raid6: int64x2  gen()  1552 MB/s
[    2.221850] raid6: int64x2  xor()   829 MB/s
[    2.289928] raid6: int64x1  gen()  1147 MB/s
[    2.357977] raid6: int64x1  xor()   575 MB/s
[    2.358015] raid6: using algorithm neonx4 gen() 2422 MB/s
[    2.361968] raid6: .... xor() 1725 MB/s, rmw enabled
[    2.366899] raid6: using neon recovery algorithm
[    2.371944] iommu: Default domain type: Translated 
[    2.376331] iommu: DMA domain TLB invalidation policy: strict mode 
[    2.382754] SCSI subsystem initialized
[    2.386402] usbcore: registered new interface driver usbfs
[    2.391753] usbcore: registered new interface driver hub
[    2.397019] usbcore: registered new device driver usb
[    2.402068] mc: Linux media interface: v0.10
[    2.406272] videodev: Linux video capture interface: v2.00
[    2.411736] pps_core: LinuxPPS API ver. 1 registered
[    2.416637] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.425728] PTP clock support registered
[    2.429628] EDAC MC: Ver: 3.0.0
[    2.432994] zynqmp-ipi-mbox mailbox@ff990400: Registered ZynqMP IPI mbox with TX/RX channels.
[    2.441388] zynqmp-ipi-mbox mailbox@ff990600: Registered ZynqMP IPI mbox with TX/RX channels.
[    2.449788] FPGA manager framework
[    2.453143] Advanced Linux Sound Architecture Driver Initialized.
[    2.459403] Bluetooth: Core ver 2.22
[    2.462666] NET: Registered PF_BLUETOOTH protocol family
[    2.467933] Bluetooth: HCI device and connection manager initialized
[    2.474250] Bluetooth: HCI socket layer initialized
[    2.479094] Bluetooth: L2CAP socket layer initialized
[    2.484115] Bluetooth: SCO socket layer initialized
[    2.489277] clocksource: Switched to clocksource arch_sys_counter
[    2.495117] VFS: Disk quotas dquot_6.6.0
[    2.498933] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    2.509739] NET: Registered PF_INET protocol family
[    2.510693] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    2.519352] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    2.526448] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    2.534461] TCP bind hash table entries: 32768 (order: 7, 524288 bytes, linear)
[    2.541900] TCP: Hash tables configured (established 32768 bind 32768)
[    2.548101] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    2.554759] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    2.561910] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.567704] RPC: Registered named UNIX socket transport module.
[    2.573301] RPC: Registered udp transport module.
[    2.577965] RPC: Registered tcp transport module.
[    2.582633] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.589587] PCI: CLS 0 bytes, default 64
[    2.593069] Trying to unpack rootfs image as initramfs...
[    2.598965] armv8-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
[    2.606350] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    3.591163] Freeing initrd memory: 22672K
[    3.622127] Initialise system trusted keyrings
[    3.622257] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    3.628033] NFS: Registering the id_resolver key type
[    3.632371] Key type id_resolver registered
[    3.636577] Key type id_legacy registered
[    3.640502] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.647147] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    3.654510] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    3.694715] NET: Registered PF_ALG protocol family
[    3.694764] xor: measuring software checksum speed
[    3.702383]    8regs           :  2626 MB/sec
[    3.706113]    32regs          :  3110 MB/sec
[    3.711109]    arm64_neon      :  2563 MB/sec
[    3.711594] xor: using function: 32regs (3110 MB/sec)
[    3.716616] Key type asymmetric registered
[    3.720681] Asymmetric key parser 'x509' registered
[    3.725559] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    3.732879] io scheduler mq-deadline registered
[    3.737376] io scheduler kyber registered
[    3.766859] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.768575] Serial: AMBA driver
[    3.771455] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    3.780701] brd: module loaded
[    3.783887] loop: module loaded
[    3.784744] mtdoops: mtd device (mtddev=name/number) must be supplied
[    3.791863] tun: Universal TUN/TAP device driver, 1.6
[    3.794375] CAN device driver interface
[    3.798704] SPI driver wl1271_spi has no spi_device_id for ti,wl1271
[    3.804425] SPI driver wl1271_spi has no spi_device_id for ti,wl1273
[    3.810740] SPI driver wl1271_spi has no spi_device_id for ti,wl1281
[    3.817051] SPI driver wl1271_spi has no spi_device_id for ti,wl1283
[    3.823365] SPI driver wl1271_spi has no spi_device_id for ti,wl1285
[    3.829680] SPI driver wl1271_spi has no spi_device_id for ti,wl1801
[    3.835994] SPI driver wl1271_spi has no spi_device_id for ti,wl1805
[    3.842309] SPI driver wl1271_spi has no spi_device_id for ti,wl1807
[    3.848623] SPI driver wl1271_spi has no spi_device_id for ti,wl1831
[    3.854938] SPI driver wl1271_spi has no spi_device_id for ti,wl1835
[    3.861253] SPI driver wl1271_spi has no spi_device_id for ti,wl1837
[    3.867655] usbcore: registered new interface driver asix
[    3.872970] usbcore: registered new interface driver ax88179_178a
[    3.879004] usbcore: registered new interface driver cdc_ether
[    3.884799] usbcore: registered new interface driver net1080
[    3.890422] usbcore: registered new interface driver cdc_subset
[    3.896305] usbcore: registered new interface driver zaurus
[    3.901848] usbcore: registered new interface driver cdc_ncm
[    3.908113] usbcore: registered new interface driver uas
[    3.912754] usbcore: registered new interface driver usb-storage
[    3.919291] rtc_zynqmp ffa60000.rtc: registered as rtc0
[    3.923893] rtc_zynqmp ffa60000.rtc: setting system clock to 2023-03-02T11:52:09 UTC (1677757929)
[    3.932752] i2c_dev: i2c /dev entries driver
[    3.938449] usbcore: registered new interface driver uvcvideo
[    3.943374] Bluetooth: HCI UART driver ver 2.3
[    3.947070] Bluetooth: HCI UART protocol H4 registered
[    3.952168] Bluetooth: HCI UART protocol BCSP registered
[    3.957456] Bluetooth: HCI UART protocol LL registered
[    3.962552] Bluetooth: HCI UART protocol ATH3K registered
[    3.967922] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    3.974170] Bluetooth: HCI UART protocol Intel registered
[    3.979513] Bluetooth: HCI UART protocol QCA registered
[    3.984713] usbcore: registered new interface driver bcm203x
[    3.990337] usbcore: registered new interface driver bpa10x
[    3.995876] usbcore: registered new interface driver bfusb
[    4.001320] usbcore: registered new interface driver btusb
[    4.006782] usbcore: registered new interface driver ath3k
[    4.012275] EDAC MC: ECC not enabled
[    4.015881] EDAC DEVICE0: Giving out device to module edac controller cache_err: DEV edac (POLLED)
[    4.024806] EDAC DEVICE1: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    4.037139] sdhci: Secure Digital Host Controller Interface driver
[    4.042911] sdhci: Copyright(c) Pierre Ossman
[    4.047232] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.053180] ledtrig-cpu: registered to indicate activity on CPUs
[    4.058919] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    4.065291] zynqmp_firmware_probe Platform Management API v1.1
[    4.071021] zynqmp_firmware_probe Trustzone version v1.0
[    4.104476] securefw securefw: securefw probed
[    4.104750] alg: No test for xilinx-zynqmp-aes (zynqmp-aes)
[    4.108943] zynqmp_aes firmware:zynqmp-firmware:zynqmp-aes: AES Successfully Registered
[    4.117040] alg: No test for xilinx-keccak-384 (zynqmp-keccak-384)
[    4.123183] alg: No test for xilinx-zynqmp-rsa (zynqmp-rsa)
[    4.128703] usbcore: registered new interface driver usbhid
[    4.134089] usbhid: USB HID core driver
[    4.140658] ARM CCI_400_r1 PMU driver probed
[    4.141243] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    4.148918] usbcore: registered new interface driver snd-usb-audio
[    4.155421] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    4.162903] Initializing XFRM netlink socket
[    4.166510] NET: Registered PF_INET6 protocol family
[    4.171800] Segment Routing with IPv6
[    4.175021] In-situ OAM (IOAM) with IPv6
[    4.178955] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.185083] NET: Registered PF_PACKET protocol family
[    4.189806] NET: Registered PF_KEY protocol family
[    4.194566] can: controller area network core
[    4.198906] NET: Registered PF_CAN protocol family
[    4.203634] can: raw protocol
[    4.206576] can: broadcast manager protocol
[    4.210729] can: netlink gateway - max_hops=1
[    4.215120] Bluetooth: RFCOMM TTY layer initialized
[    4.219903] Bluetooth: RFCOMM socket layer initialized
[    4.225010] Bluetooth: RFCOMM ver 1.11
[    4.228722] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.233994] Bluetooth: BNEP filters: protocol multicast
[    4.239188] Bluetooth: BNEP socket layer initialized
[    4.244115] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    4.249998] Bluetooth: HIDP socket layer initialized
[    4.254952] 8021q: 802.1Q VLAN Support v1.8
[    4.259177] 9pnet: Installing 9P2000 support
[    4.263339] Key type dns_resolver registered
[    4.267687] registered taskstats version 1
[    4.271625] Loading compiled-in X.509 certificates
[    4.277395] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
[    4.291420] ff010000.serial: ttyPS1 at MMIO 0xff010000 (irq = 48, base_baud = 6249999) is a xuartps
[    4.300450] printk: console [ttyPS1] enabled
[    4.300450] printk: console [ttyPS1] enabled
[    4.304741] printk: bootconsole [cdns0] disabled
[    4.304741] printk: bootconsole [cdns0] disabled
[    4.313994] of-fpga-region fpga-full: FPGA Region probed
[    4.324165] xilinx-zynqmp-dma fd500000.dma-controller: ZynqMP DMA driver Probe success
[    4.332244] xilinx-zynqmp-dma fd510000.dma-controller: ZynqMP DMA driver Probe success
[    4.340312] xilinx-zynqmp-dma fd520000.dma-controller: ZynqMP DMA driver Probe success
[    4.348378] xilinx-zynqmp-dma fd530000.dma-controller: ZynqMP DMA driver Probe success
[    4.356450] xilinx-zynqmp-dma fd540000.dma-controller: ZynqMP DMA driver Probe success
[    4.364514] xilinx-zynqmp-dma fd550000.dma-controller: ZynqMP DMA driver Probe success
[    4.372589] xilinx-zynqmp-dma fd560000.dma-controller: ZynqMP DMA driver Probe success
[    4.380648] xilinx-zynqmp-dma fd570000.dma-controller: ZynqMP DMA driver Probe success
[    4.388787] xilinx-zynqmp-dma ffa80000.dma-controller: ZynqMP DMA driver Probe success
[    4.396849] xilinx-zynqmp-dma ffa90000.dma-controller: ZynqMP DMA driver Probe success
[    4.404915] xilinx-zynqmp-dma ffaa0000.dma-controller: ZynqMP DMA driver Probe success
[    4.412975] xilinx-zynqmp-dma ffab0000.dma-controller: ZynqMP DMA driver Probe success
[    4.421045] xilinx-zynqmp-dma ffac0000.dma-controller: ZynqMP DMA driver Probe success
[    4.429112] xilinx-zynqmp-dma ffad0000.dma-controller: ZynqMP DMA driver Probe success
[    4.437179] xilinx-zynqmp-dma ffae0000.dma-controller: ZynqMP DMA driver Probe success
[    4.445238] xilinx-zynqmp-dma ffaf0000.dma-controller: ZynqMP DMA driver Probe success
[    4.453627] xilinx-zynqmp-dpdma fd4c0000.dma-controller: Xilinx DPDMA engine is probed
[    4.464705] zynqmp-display fd4a0000.display: vtc bridge property not present
[    4.474590] xilinx-dp-snd-codec fd4a0000.display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    4.484636] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    4.492671] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    4.501497] xilinx-dp-snd-card fd4a0000.display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    4.505710] zynqmp_pll_disable() clock disable failed for dpll_int, ret = -13
[    4.511065] OF: graph: no port node found in /axi/display@fd4a0000
[    4.524582] xlnx-drm xlnx-drm.0: bound fd4a0000.display (ops 0xffff800008f030e0)
[    4.695890] Console: switching to colour frame buffer device 240x67
[    4.718797] zynqmp-display fd4a0000.display: [drm] fb0: xlnxdrmfb frame buffer device
[    4.726830] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.display on minor 0
[    4.734332] zynqmp-display fd4a0000.display: ZynqMP DisplayPort Subsystem driver probed
[    4.744036] spi-nor spi0.0: mt25qu512a (65536 Kbytes)
[    4.747915] tpm_tis_spi spi2.0: 2.0 TPM (device-id 0x1B, rev-id 22)
[    4.749146] 16 fixed-partitions partitions found on MTD device spi0.0
[    4.761763] Creating 16 MTD partitions on "spi0.0":
[    4.762604] random: fast init done
[    4.766636] 0x000000000000-0x000000080000 : "Image Selector"
[    4.776465] 0x000000080000-0x000000100000 : "Image Selector Golden"
[    4.783384] 0x000000100000-0x000000120000 : "Persistent Register"
[    4.790120] 0x000000120000-0x000000140000 : "Persistent Register Backup"
[    4.797494] 0x000000140000-0x000000200000 : "Open_1"
[    4.803110] 0x000000200000-0x000000f00000 : "Image A (FSBL, PMU, ATF, U-Boot)"
[    4.810979] 0x000000f00000-0x000000f80000 : "ImgSel Image A Catch"
[    4.817808] 0x000000f80000-0x000001c80000 : "Image B (FSBL, PMU, ATF, U-Boot)"
[    4.825693] 0x000001c80000-0x000001d00000 : "ImgSel Image B Catch"
[    4.832523] 0x000001d00000-0x000001e00000 : "Open_2"
[    4.838130] 0x000001e00000-0x000002000000 : "Recovery Image"
[    4.844442] 0x000002000000-0x000002200000 : "Recovery Image Backup"
[    4.851369] 0x000002200000-0x000002220000 : "U-Boot storage variables"
[    4.858553] 0x000002220000-0x000002240000 : "U-Boot storage variables backup"
[    4.866323] 0x000002240000-0x000002250000 : "SHA256"
[    4.871938] 0x000002250000-0x000004000000 : "User"
[    4.877904] macb ff0b0000.ethernet: Not enabling partial store and forward
[    4.910016] macb ff0b0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0b0000 irq 38 (00:0a:35:0f:2b:0e)
[    4.921576] macb ff0c0000.ethernet: Not enabling partial store and forward
[    4.962201] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    4.968719] xilinx-axipmon fd0b0000.perf-monitor: Probed Xilinx APM
[    4.975187] xilinx-axipmon fd490000.perf-monitor: Probed Xilinx APM
[    4.981642] xilinx-axipmon ffa10000.perf-monitor: Probed Xilinx APM
[    4.989258] i2c i2c-1: Added multiplexed i2c bus 3
[    4.994154] i2c i2c-1: Added multiplexed i2c bus 4
[    4.999043] i2c i2c-1: Added multiplexed i2c bus 5
[    5.003936] i2c i2c-1: Added multiplexed i2c bus 6
[    5.008727] pca954x 1-0074: registered 4 multiplexed busses for I2C switch pca9546
[    5.017260] at24 1-0050: supply vcc not found, using dummy regulator
[    5.023906] at24 1-0050: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
[    5.030736] at24 1-0051: supply vcc not found, using dummy regulator
[    5.037366] at24 1-0051: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
[    5.044260] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 41
[    5.051666] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer with timeout 60s
[    5.059093] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    5.068504] macb ff0c0000.ethernet: Not enabling partial store and forward
[    5.075412] macb ff0c0000.ethernet: invalid hw address, using random
[    5.089175] macb ff0c0000.ethernet eth1: Cadence GEM rev 0x50070106 at 0xff0c0000 irq 39 (de:db:64:aa:d4:2e)
[    5.118392] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.123891] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[    5.131638] xhci-hcd xhci-hcd.1.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x0000000002010810
[    5.141056] xhci-hcd xhci-hcd.1.auto: irq 55, io mem 0xfe200000
[    5.147169] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[    5.155433] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.162651] usb usb1: Product: xHCI Host Controller
[    5.167519] usb usb1: Manufacturer: Linux 5.15.19-xilinx-v2022.1 xhci-hcd
[    5.174298] usb usb1: SerialNumber: xhci-hcd.1.auto
[    5.181433] hub 1-0:1.0: USB hub found
[    5.185189] hub 1-0:1.0: 1 port detected
[    5.189312] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.194798] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[    5.202455] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    5.209087] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[    5.217349] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.224568] usb usb2: Product: xHCI Host Controller
[    5.229436] usb usb2: Manufacturer: Linux 5.15.19-xilinx-v2022.1 xhci-hcd
[    5.236213] usb usb2: SerialNumber: xhci-hcd.1.auto
[    5.241373] hub 2-0:1.0: USB hub found
[    5.245122] hub 2-0:1.0: 1 port detected
[    5.272996] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[    5.278492] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
[    5.286230] xhci-hcd xhci-hcd.2.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x0000000002010810
[    5.295650] xhci-hcd xhci-hcd.2.auto: irq 58, io mem 0xfe300000
[    5.301741] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[    5.310009] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.317227] usb usb3: Product: xHCI Host Controller
[    5.322095] usb usb3: Manufacturer: Linux 5.15.19-xilinx-v2022.1 xhci-hcd
[    5.328873] usb usb3: SerialNumber: xhci-hcd.2.auto
[    5.333996] hub 3-0:1.0: USB hub found
[    5.337757] hub 3-0:1.0: 1 port detected
[    5.342035] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[    5.347521] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 4
[    5.355177] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed
[    5.361845] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[    5.370108] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.377331] usb usb4: Product: xHCI Host Controller
[    5.382204] usb usb4: Manufacturer: Linux 5.15.19-xilinx-v2022.1 xhci-hcd
[    5.388983] usb usb4: SerialNumber: xhci-hcd.2.auto
[    5.394106] hub 4-0:1.0: USB hub found
[    5.397864] hub 4-0:1.0: 1 port detected
[    5.404815] gpio-keys gpio-keys: Button without keycode
[    5.410050] gpio-keys: probe of gpio-keys failed with error -22
[    5.416058] of_cfs_init
[    5.418516] of_cfs_init: OK
[    5.421439] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    5.469287] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    5.547323] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    5.553853] clk: Not disabling unused clocks
[    5.558378] ALSA device list:
[    5.561335]   #0: DisplayPort monitor
[    5.565244] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    5.573859] cfg80211: failed to load regulatory.db
[    5.579146] Freeing unused kernel memory: 2176K
[    5.601327] Run /init as init process
[    5.625336] usb 3-1: new high-speed USB device number 2 using xhci-hcd
[    5.632540] usb 1-1: New USB device found, idVendor=0424, idProduct=2744, bcdDevice= 2.21
[    5.640755] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.647942] usb 1-1: Product: USB2744
[    5.651610] usb 1-1: Manufacturer: Microchip Tech
[    5.666923] random: python3: uninitialized urandom read (24 bytes read)
[    5.689236] hub 1-1:1.0: USB hub found
[    5.693086] hub 1-1:1.0: 4 ports detected
[    5.761391] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    5.785846] usb 2-1: New USB device found, idVendor=0424, idProduct=5744, bcdDevice= 2.21
[    5.794051] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    5.801200] usb 2-1: Product: USB5744
[    5.804864] usb 2-1: Manufacturer: Microchip Tech
[    5.809865] usb 3-1: New USB device found, idVendor=0424, idProduct=2744, bcdDevice= 2.21
[    5.818048] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.825176] usb 3-1: Product: USB2744
[    5.828829] usb 3-1: Manufacturer: Microchip Tech
[    5.873906] hub 3-1:1.0: USB hub found
[    5.877713] hub 3-1:1.0: 3 ports detected
[    5.881950] hub 2-1:1.0: USB hub found
[    5.885897] hub 2-1:1.0: 3 ports detected
[    5.937755] usb 4-1: new SuperSpeed USB device number 2 using xhci-hcd
[    5.961793] usb 4-1: New USB device found, idVendor=0424, idProduct=5744, bcdDevice= 2.21
[    5.969998] usb 4-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    5.977134] usb 4-1: Product: USB5744
[    5.980799] usb 4-1: Manufacturer: Microchip Tech
[    6.045311] usb 1-1.1: new high-speed USB device number 3 using xhci-hcd
[    6.052275] hub 4-1:1.0: USB hub found
[    6.056153] hub 4-1:1.0: 2 ports detected
[    6.159581] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2240, bcdDevice= 1.98
[    6.167929] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    6.175234] usb 1-1.1: Product: Ultra Fast Media 
[    6.179932] usb 1-1.1: Manufacturer: Generic
[    6.184192] usb 1-1.1: SerialNumber: 000000225001
[    6.189502] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[    6.196049] scsi host0: usb-storage 1-1.1:1.0
[    6.245284] usb 3-1.3: new high-speed USB device number 3 using xhci-hcd
[    6.277322] usb 1-1.4: new high-speed USB device number 4 using xhci-hcd
[    6.317718] macb ff0c0000.ethernet eth1: PHY [ff0c0000.ethernet-ffffffff:08] driver [TI DP83867] (irq=POLL)
[    6.327475] macb ff0c0000.ethernet eth1: configuring for phy/rgmii-id link mode
[    6.335355] pps pps0: new PPS source ptp0
[    6.339447] macb ff0c0000.ethernet: gem-ptp-timer ptp clock registered.
MAC address for eth1 is updated to 00:0a:35:0f:40:0f
[    6.350057] usb 3-1.3: New USB device found, idVendor=0424, idProduct=2740, bcdDevice= 2.00
[    6.354198] random: python3: uninitialized urandom read (24 bytes read)
[    6.360480] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.374388] usb 3-1.3: Product: Hub Controller
[    6.378838] usb 3-1.3: Manufacturer: Microchip Tech
[    6.406019] usb 1-1.4: New USB device found, idVendor=0424, idProduct=2740, bcdDevice= 2.00
[    6.414404] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.421727] usb 1-1.4: Product: Hub Controller
[    6.426186] usb 1-1.4: Manufacturer: Microchip Tech
[    6.963758] macb ff0b0000.ethernet eth0: PHY [ff0c0000.ethernet-ffffffff:04] driver [TI DP83867] (irq=POLL)
[    6.973520] macb ff0b0000.ethernet eth0: configuring for phy/sgmii link mode
[    6.981141] pps pps1: new PPS source ptp1
[    6.985226] macb ff0b0000.ethernet: gem-ptp-timer ptp clock registered.
MAC address for eth0 is updated to 00:0a:35:0f:2b:0e
[    7.226087] scsi 0:0:0:0: Direct-Access     Generic  Ultra HS-COMBO   1.98 PQ: 0 ANSI: 0
[    7.235428] sd 0:0:0:0: [sda] 60526592 512-byte logical blocks: (31.0 GB/28.9 GiB)
[    7.243529] sd 0:0:0:0: [sda] Write Protect is off
[    7.248865] sd 0:0:0:0: [sda] No Caching mode page found
[    7.254174] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    7.263983]  sda: sda1 sda2
[    7.268498] sd 0:0:0:0: [sda] Attached SCSI removable disk
^[[6~root: clean, 70523/524288 files, 420085/1048576 blocks
[    8.638853] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[    9.388226] 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)
[    9.418733] systemd[1]: Detected architecture arm64.

Welcome to PetaLinux 2022.1_update1_05131710 (honister)!

[    9.462296] systemd[1]: Hostname set to <xilinx-kr260-starterkit-20221>.
[    9.620093] systemd-sysv-generator[505]: SysV service '/etc/init.d/reboot' 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.
[    9.645493] systemd-sysv-generator[505]: 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.
[    9.671071] systemd-sysv-generator[505]: SysV service '/etc/init.d/halt' 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.
[    9.696518] systemd-sysv-generator[505]: SysV service '/etc/init.d/umountnfs.sh' 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.
[    9.721208] systemd-sysv-generator[505]: SysV service '/etc/init.d/save-rtc.sh' 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.
[    9.746423] systemd-sysv-generator[505]: SysV service '/etc/init.d/sendsigs' 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.
[    9.770590] systemd-sysv-generator[505]: 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.
[    9.795174] systemd-sysv-generator[505]: 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.
[    9.820061] systemd-sysv-generator[505]: SysV service '/etc/init.d/single' 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.
[    9.843879] systemd-sysv-generator[505]: SysV service '/etc/init.d/urandom' 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.
[    9.868861] systemd-sysv-generator[505]: SysV service '/etc/init.d/umountfs' 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.
[   10.041558] macb ff0b0000.ethernet eth0: unable to generate target frequency: 125000000 Hz
[   10.050938] macb ff0b0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   10.058637] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.321159] systemd[1]: Queued start job for default target Graphical Interface.
[   10.329470] random: systemd: uninitialized urandom read (16 bytes read)
[   10.363980] systemd[1]: Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/getty.
[   10.385433] random: systemd: uninitialized urandom read (16 bytes read)
[   10.393325] systemd[1]: Created slice Slice /system/modprobe.
[  OK  ] Created slice Slice /system/modprobe.
[   10.413357] random: systemd: uninitialized urandom read (16 bytes read)
[   10.421183] systemd[1]: Created slice Slice /system/serial-getty.
[  OK  ] Created slice Slice /system/serial-getty.
[   10.442341] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[   10.465533] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password …ts to Console Directory Watch.
[   10.489463] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
[   10.513619] systemd[1]: Reached target Path Units.
[  OK  ] Reached target Path Units.
[   10.529379] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[   10.549359] systemd[1]: Reached target Slice Units.
[  OK  ] Reached target Slice Units.
[   10.565390] systemd[1]: Reached target Swaps.
[  OK  ] Reached target Swaps.
[   10.582804] systemd[1]: Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[   10.605371] systemd[1]: Reached target RPC Port Mapper.
[  OK  ] Reached target RPC Port Mapper.
[   10.625587] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[   10.641493] systemd[1]: Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[   10.665794] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[   10.685564] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[   10.705621] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[   10.721801] systemd[1]: Listening on Network Service Netlink Socket.
[  OK  ] Listening on Network Service Netlink Socket.
[   10.746543] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[   10.769571] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[   10.789571] systemd[1]: Listening on User Database Manager Socket.
[  OK  ] Listening on User Database Manager Socket.
[   10.815811] systemd[1]: Mounting Huge Pages File System...
         Mounting Huge Pages File System...
[   10.835837] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[   10.859945] systemd[1]: Mounting Kernel Debug File System...
         Mounting Kernel Debug File System...
[   10.881713] systemd[1]: Condition check resulted in Kernel Trace File System being skipped.
[   10.893749] systemd[1]: Mounting Temporary Directory /tmp...
         Mounting Temporary Directory /tmp...
[   10.915074] systemd[1]: Condition check resulted in Create List of Static Device Nodes being skipped.
[   10.927218] systemd[1]: Starting Load Kernel Module configfs...
         Starting Load Kernel Module configfs...
[   10.948440] systemd[1]: Starting Load Kernel Module drm...
         Starting Load Kernel Module drm...
[   10.968212] systemd[1]: Starting Load Kernel Module fuse...
         Starting Load Kernel Module fuse...
[   10.988209] systemd[1]: Starting RPC Bind...
         Starting RPC Bind...
[   11.001488] systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
[   11.023035] systemd[1]: Starting Load Kernel Modules...
         Starting Load Kernel Modules...
[   11.040120] systemd[1]: Starting Remount Root and Kernel File Systems...
         Starting Remount Root and Kernel File Systems...
[   11.056106] EXT4-fs (sda2): re-mounted. Opts: (null). Quota mode: none.
[   11.064299] dmaproxy: loading out-of-tree module taints kernel.
[   11.076213] systemd[1]: Starting Coldplug All udev Devices...
         Starting Coldplug All udev Devices...
[   11.098884] systemd[1]: Started RPC Bind.
[  OK  ] Started RPC Bind.
[   11.113862] systemd[1]: Mounted Huge Pages File System.
[  OK  ] Mounted Huge Pages File System.
[   11.133805] systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
[   11.157713] systemd[1]: Mounted Kernel Debug File System.
[  OK  ] Mounted Kernel Debug File System.
[   11.177677] systemd[1]: Mounted Temporary Directory /tmp.
[  OK  ] Mounted Temporary Directory /tmp.
[   11.198334] systemd[1]: modprobe@configfs.service: Deactivated successfully.
[   11.206682] systemd[1]: Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module configfs.
[   11.230268] systemd[1]: modprobe@drm.service: Deactivated successfully.
[   11.238152] systemd[1]: Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module drm.
[   11.262307] systemd[1]: modprobe@fuse.service: Deactivated successfully.
[   11.270319] systemd[1]: Finished Load Kernel Module fuse.
[  OK  ] Finished Load Kernel Module fuse.
[   11.295183] systemd[1]: Finished Load Kernel Modules.
[  OK  ] Finished Load Kernel Modules.
[   11.310932] systemd[1]: Finished Remount Root and Kernel File Systems.
[  OK  ] Finished Remount Root and Kernel File Systems.
[   11.337854] systemd[1]: Mounting NFSD configuration filesystem...
         Mounting NFSD configuration filesystem...
[   11.353831] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[   11.364915] systemd[1]: Mounting Kernel Configuration File System...
         Mounting Kernel Configuration File System...
[   11.391589] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
[   11.400218] systemd[1]: Condition check resulted in Platform Persistent Storage Archival being skipped.
[   11.412627] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...
[   11.429559] systemd[1]: Condition check resulted in Create System Users being skipped.
         Starting Create Static Device Nodes in /dev...
[   11.461171] systemd[1]: Failed to mount NFSD configuration filesystem.
[FAILED] Failed to mount NFSD configuration filesystem.
See 'systemctl status proc-fs-nfsd.mount' for details.
[DEPEND] Dependency failed for NFS Mount Daemon.
[DEPEND] Dependency failed for NFS server and services.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Finished Apply Kernel Variables.
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Preparation for Local File Systems.
         Mounting /var/volatile...
[  OK  ] Started Entropy Daemon based on the HAVEGE algorithm.
         Starting Journal Service...
         Starting Rule-based Manage…for Device Events and Files...
[  OK  ] Mounted /var/volatile.
         Starting Load/Save Random Seed...
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Started Journal Service.
[  OK  ] Started Rule-based Manager for Device Events and Files.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Finished Flush Journal to Persistent Storage.
[  OK  ] Reached target Sound Card.
[  OK  ] Found device Ultra_HS-COMBO boot.
[  OK  ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
         Mounting /boot...
[  OK  ] Mounted /boot.
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
[  OK  ] Finished Create Volatile Files and Directories.
         Starting Network Time Synchronization...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target System Time Set.
[  OK  ] Started Daily rotation of log files.
[  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 archconfig.
[  OK  ] Started Job spooling tools.
[  OK  ] Started Periodic Command Scheduler.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started dfx-mgrd Dynamic Function eXchange.
[  OK  ] Started Start fan control, if configured.
         Starting inetd.busybox.service...
         Starting IPv6 Packet Filtering Framework...
         Starting IPv4 Packet Filtering Framework...
[  OK  ] Started System Logging Service.
         Starting User Login Management...
[  OK  ] Started Xserver startup without a display manager.
[  OK  ] Finished IPv6 Packet Filtering Framework.
[  OK  ] Finished IPv4 Packet Filtering Framework.
[  OK  ] Reached target Preparation for Network.
Mar  2 03:52:05 xilinx-kr260-starterkit-20221 kernel: GIC: Adjusting CPU interface base to 0x00000000f902f000
Mar  2 03:52:07 xilinx-kr260-starterkit-20221 kernel: armv8-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
         Starting Network Configuration...
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: cacheinfo: Unable to detect cache hierarchy for CPU 0
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: mtdoops: mtd device (mtddev=name/number) must be supplied
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1271
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1273
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1281
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1283
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1285
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1801
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1805
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1807
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1831
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1835
Mar  2 03:52:08 xilinx-kr260-starterkit-20221 kernel: SPI driver wl1271_spi has no spi_device_id for ti,wl1837
Mar  2 03:52:09 xilinx-kr260-starterkit-20221 kernel: zynqmp_pll_disable() clock disable failed for dpll_int, ret = -13
Mar  2 03:52:09 xilinx-kr260-starterkit-20221 kernel: OF: graph: no port node found in /axi/display@fd4a0000
Mar  2 03:52:10 xilinx-kr260-starterkit-20221 kernel: at24 1-0050: supply vcc not found, using dummy regulator
Mar  2 03:52:10 xilinx-kr260-starterkit-20221 kernel: at24 1-0051: supply vcc not found, using dummy regulator
Mar  2 03:52:10 xilinx-kr260-starterkit-20221 kernel: gpio-keys gpio-keys: Button without keycode
Mar  2 03:52:10 xilinx-kr260-starterkit-20221 kernel: gpio-keys: probe of gpio-keys failed with error -22
Mar  2 03:52:10 xilinx-kr260-starterkit-20221 kernel: clk: Not disabling unused clocks
Mar  2 03:52:10 xilinx-kr260-starterkit-20221 kernel: platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
Mar  2 03:52:12 xilinx-kr260-starterkit-20221 kernel: sd 0:0:0:0: [sda] No Caching mode page found
Mar  2 03:52:12 xilinx-kr260-starterkit-20221 kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
Mar  2 03:52:15 xilinx-kr260-starterkit-20221 kernel: macb ff0b0000.ethernet eth0: unable to generate target frequency: 125000000 Hz
Mar  2 03:52:16 xilinx-kr260-starterkit-20221 kernel: dmaproxy: loading out-of-tree module taints kernel.
[  OK  ] Started inetd.busybox.service.
[  OK  ] Started User Login Management.
[  OK  ] Started Network Configuration.
         Starting Wait for Network to be Configured...
         Starting Network Name Resolution...
Mar  2 03:52:20 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
Mar  2 03:52:20 xilinx-kr260-starterkit-20221 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Network.
[  OK  ] Reached target Host and Network Name Lookups.
         Starting DNS forwarder and DHCP server...
[  OK  ] Started NFS status monitor for NFSv2/3 locking..
[  OK  ] Started Respond to IPv6 Node Information Queries.
         Starting Network Time Service...
[  OK  ] Started Network Router Discovery Daemon.
         Starting Permit User Sessions...
         Starting Target Communication Framework agent...
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyPS1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started DNS forwarder and DHCP server.
[  OK  ] Started Target Communication Framework agent.
[  OK  ] Started Network Time Service.
[  OK  ] Stopped Xserver startup without a display manager.
[  OK  ] Started Xserver startup without a display manager.
[  OK  ] Stopped Xserver startup without a display manager.
[  OK  ] Started Xserver startup without a display manager.

PetaLinux 2022.1_update1_05131710 xilinx-kr260-starterkit-20221 ttyPS1

xilinx-kr260-starterkit-20221 login: 

  1. 2023年03月03日 03:12 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加する1

KR260 の kr260_custom アクセラレーション・プラットホームにいろいろな IP を追加してみようということで、今回は、の multi_axi4ls と DMA_pow2、そして、Xilinx 社の IP の axi timer、axi dma を Vivado 2022.1 の kr260_custom プロジェクトに追加する。

”RPi+PMOD Connector GPIO with Custom PL Design in Kria KR260”をやってみる1”を参照してやっていく。

Vitis HLS 2022.1 で KR260 用の multi_axi4ls IP を作成する”の multi_axi4ls IP を追加する。
kr260_custom プロジェクトのディレクトリに multi_axi4ls ディレクトリを新規作成した。
KR260/multi_axi4ls/solution1/impl/export.zip を展開して、multi_axi4ls ディレクトリにファイルをコピーした。
KR260_291_230302.png

DMA_pow2 を Kria-PYNQ の jupyter Notebook で動作させる1(DMA pow2 IP を Vitis HLS で作成する)”の DMA_pow2 IP を追加する。
kr260_custom プロジェクトのディレクトリに DMA_pow2 ディレクトリを新規作成した。
KIRA_KV260/DMA_pow2/solution1/impl/export.zip を展開して、multi_axi4ls ディレクトリにファイルをコピーした。
なお、この IP は KV260 の IP だが、FPGA パーツが KR260 と同じ xck26-sfvc784-2LV-c なので、IP を共用できる。
KR260_292_230302.png

multi_axi4ls IP と DMA_pow2 IP を追加するために Vivado 2022.1 の Flow Navigator から IP Catalog をクリックし、IP Catalog を表示させた。
IP Catalog 内で右クリックし右クリックメニューから Add Repository... を選択して、multi_axi4ls IP と DMA_pow2 IP を IP Catalog に追加した。
KR260_293_230302.png

kr260_bd ブロック・デザインの zynq_ultra_ps_e_0 をダブルクリックして、設定を変更する。
Page Navigator から PS-PL Configuration をクリックする。
PS-PL Interface -> Slave Interface -> AXI HPC0 FPD のチェックボックスをチェックした。
KR260_294_230302.png

Platform Setup ウインドウで、M_AXI_HPM0_FPD のチェックボックスのチェックを外した。
M_AXI_HPM0_FPD はブロック・デザインで使用する。
KR260_295_230302.png

multi_axi4ls IP と DMA_pow2 IP、それに Xilinx 社の IP から axi_timer と axi_dma IP を kr260_bd ブロック・デザインに追加して配線した。
KR260_296_230302.png

axi_dma の設定を示す。
Enable Scatter Gather Engine のチェックを外した。
KR260_297_230302.png

axi_timer の設定はデフォルトのままとした。

Address Editor 画面を示す。
KR260_298_230302.png

論理合成、インプリメンテーション、ビットストリームの生成を行った。
KR260_299_230302.png

Project Summary を示す。
KR260_300_230302.png

KR260/kr260_custom_platform/kr260_custom/kr260_custom.runs/impl_1 ディレクトリに kr260_bd_wrapper.bin と kr260_bd_wrapper.bit が再生成された。
KR260_301_230302.png

KR260 で Vitis アクセラレーション・プラットフォームを作成する3”に書いてあるようにハードウェアをエクスポートした。

File メニューから Export -> Export Platform... を選択する。
Export Hardware Platform ダイアログが開く。
Next > ボタンをクリックする。

Platform Type 画面では、Hardware ラジオボタンをクリックしてあることを確認した。
Next > ボタンをクリックする。

Platform State 画面では Pre-synthesis のラジオボタンがクリックされていることを確認し、Include bitstream のチェックボックスをチェックする。

Platform Properties 画面では、Name に kr260_custom_platform と入力されていることを確認した。
Next > ボタンをクリックする。

Output File 画面では、XSA file name に kr260_custom と入力した。
Next > ボタンをクリックする。

kr260_custom.xsa ファイルが再生成された。
KR260_302_230302.png
  1. 2023年03月02日 05:04 |
  2. KR260
  3. | トラックバック:0
  4. | コメント:0

Vitis HLS 2022.1 で KR260 用の multi_axi4ls IP を作成する

”RPi+PMOD Connector GPIO with Custom PL Design in Kria KR260”をやってみる1”の axi gpio を 4 こ追加した kr260_bd ブロック・デザインに追加するために”Vitis HLS 2022.1 で multi_axi4ls IP を作成する”の multi_axi4ls IP を KR260 用に作り直した。

ソースコードとテストベンチ・コードは”Vitis HLS 2022.1 で multi_axi4ls IP を作成する”のコードを使用した。

VItis HLS 2022.1 で multi_axi4ls プロジェクトを作成する。
New Vitis HLS Project ダイアログの Project Configuration 画面を示す。
KR260_282_230301.png

パートを選ぶ Device Selection Dialog を示す。
パートは Vivado のログを見ると xck26-sfvc784-2LV-c だった。
KR260_283_230301.png

multi_axi4ls プロジェクトを示す。
KR260_284_230301.png

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

C コードの合成を行った。結果を示す。
KR260_286_230301.png
KR260_287_230301.png

C/RTL 協調シミュレーションを行った。結果を示す。
KR260_288_230301.png

C/RTL 協調シミュレーションの波形を示す。
KR260_289_230301.png

Export RTL を行って IP を生成した。

Implementation を行った。結果を示す。
KR260_290_230301.png
  1. 2023年03月01日 04:23 |
  2. Vitis HLS
  3. | トラックバック:0
  4. | コメント:0