DE-25 FPGA開発キットの追加セットアップ(パート6)(Zephyr Agilex™ 5 Simics仮想プラットフォームへのプロセス)

次の手順に進む前に、DE-25 Agilex 5 Simicsシミュレータの追加セットアップに関する前回の記事パート5を参照してください。この記事の目的は、DE-25 FPGA開発キットに関連するAgilex™ 5 Simics仮想プラットフォーム上で動作するZephyr RTOSアプリケーションのビルドプロセスを完了することです。

image

前回の記事パート5では、Agilex 5 Simicsシミュレータ上でのZephyr RTOSの「食事する哲学者」のビルドをほぼ終了しました。このプロセスを完了するには、以下の手順に進み、bl2.binから bl2.hexを作成します。

cd $TOP_FOLDER/qspi_bin
aarch64-none-linux-gnu-objcopy -v -I binary -O ihex --change-addresses 0x00000000 bl2.bin bl2.hex

これで、fip.binとbl2.hexからflash_image_jic.rpd qspiイメージを作成する準備が整いました。

cd $TOP_FOLDER/qspi_bin
ln -s $TOP_FOLDER/ghrd_a5ed065bb32ae6sr0_hps.sof agilex5_factory.sof
quartus_pfg -c qspi_flash_image_agilex5_boot.pfg

次に、トップディレクトリの下にSimicsプロジェクトディレクトリを作成します。

cd $TOP_FOLDER
rm -rf project-1
mkdir project-1
cd project-1

先ほど作成した新しいプロジェクトディレクトリにおいて、以下に示すようにagilex5e-universal仮想プラットフォームを有効にします。

simics_intelfpga_cli --deploy agilex5e-universal

仮想プラットフォームの要素を以下のようにビルドします。

make

QSPIバイナリから起動するには、

cd $TOP_FOLDER/project-1
cputypestring=""
if [ $cputype = "a76" ]; then
cputypestring='$hps_boot_core = 2 
$hps_core0_1_power_on = TRUE 
$hps_core2_power_on = TRUE 
$hps_core3_power_on = TRUE '
fi;

tee zephyr_qspi.simics << 'EOF'
# TOP-LEVEL CONFIG Script TO BOOT ZEPHYR.
local $board_name = "system.board.fpga"

# Ensure the nand_mem.img & bl2.bin paths are relative to the simics executable

# First stage boot loader, ATF BL2 path
$fsbl_image_filename = ../qspi_bin/bl2.bin
#Boot from QSPI
$qspi_image_filename = ../qspi_bin/flash_image_jic.rpd  
# Enable Console
$create_hps_serial0_console=TRUE 
EOF

echo "$cputypestring" >> zephyr_qspi.simics 

echo 'run-command-file "targets/agilex5e-universal/agilex5e-universal.simics"
run' >> zephyr_qspi.simics

この時点で、Zephyr RTOSアプリケーションデモを実行する準備が整いました。

cd $TOP_FOLDER/project-1
ln -s zephyr_qspi.simics  zephyr.simics
./simics zephyr.simics

...
...
....


HPS Status:
Status of system.board.fpga.soc_inst.hps_subsys.agilex_hps [class vp_intel_agilex_5_soc]
========================================================================================

Setup:
                   Top component : system
                    Instantiated : True

Attributes:
                       boot_core : 0
    combophy_iface_select_enable : False
                core0_1_power_on : True
                  core2_power_on : True
                  core3_power_on : True
      create_hps_serial0_console : True
      create_hps_serial1_console : False
                      fsbl_image : ../qspi_bin/bl2.bin
                hps_cpu_freq_mhz : 400
                    reset_vector : 0
                        stepping : A0

Connections:
                 f2s_fpga_irq[0] : system.board.fpga.soc_inst.periph_subsys:periph_button_irq
                 hps2fpga_0_down : system.board.fpga.soc_inst.example_design:design_mem_conn
                        hps_conn : system.board.fpga.soc_inst.hps_subsys.emif:emif_conn
                 lwhps2fpga_down : system.board.fpga.soc_inst.periph_subsys:periph_mem_conn
                         serial0 : system.board.fpga.soc_inst.hps_subsys.agilex_hps.console0:serial
                      usb31_slot : system.board.fpga.soc_inst.hps_subsys.agilex_hps.usb31:usb31_hps_slot
[system.board.fpga.soc_inst.hps_subsys.agilex_hps.gicr[0] info] Calling hard reset default
[system.board.fpga.soc_inst.hps_subsys.agilex_hps.gicr[0] info] pendr clear
[system.board.fpga.soc_inst.hps_subsys.agilex_hps.gicr[1] info] Calling hard reset default
[system.board.fpga.soc_inst.hps_subsys.agilex_hps.gicr[1] info] pendr clear
[system.board.fpga.soc_inst.hps_subsys.agilex_hps.gicr[2] info] Calling hard reset default
[system.board.fpga.soc_inst.hps_subsys.agilex_hps.gicr[2] info] pendr clear
[system.board.fpga.soc_inst.hps_subsys.agilex_hps.gicr[3] info] Calling hard reset default
[system.board.fpga.soc_inst.hps_subsys.agilex_hps.gicr[3] info] pendr clear
[system.board.fpga.soc_inst.hps_subsys.agilex_hps.uart0.bank.regs unimpl] Write to unimplemented field regs.FCR.DMAM (value written = 0x1, contents = 0).


これにより、以下のデモ動画に示すように、zephyr.simicsを使用してDE-25 FPGA開発キットに対応したAgilex™ 5 Simics仮想プラットフォームが別のウィンドウで起動します。

このAgilex™ 5 Simics仮想プラットフォーム向けの「食事する哲学者」デモは、コーヒーを飲むバージョン(Coffee Drinking)に改変されており、同期のためにSEMAPHORES、MUTEXES、STACKS、FIFOS、LIFOSといったさまざまなオブジェクトタイプを使用するように構成できます。

DE-25 FPGA開発キットは、Tensor AIスライスを実装できるHPS/FPGA Agilex 5(ケースに応じてDシリーズとEシリーズが利用可能)を搭載した強力なプラットフォームです。

これらは、従来のDSPスライスが過去に実装していた機能をはるかに超える能力を備えています。

この製品はDigiKeyで入手可能です。

どうぞ素晴らしい一日を!

この記事はスペイン語でこちらからご覧いただけます。

Este artículo está disponible en español aquí.




オリジナル・ソース(English)