次の手順に進む前に、DE-25 Agilex 5 Simicsシミュレータの追加セットアップに関する前回の記事パート2を参照してください。この記事の目的は、DE-25 FPGA開発キットに関連するAgilex™ 5 Simics仮想プラットフォーム上で動作するZephyr RTOSアプリケーションをビルドすることです。
パート1のARM Trustedに関する前回の記事と同様に、以下を実行してください。
git clone -b QPDS24.3_REL_GSRD_PR https://github.com/altera-opensource/arm-trusted-firmware arm-trusted-firmware-sdcard
cd arm-trusted-firmware-sdcard
git switch -c test
make realclean
ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- make PLAT=agilex5 SOCFPGA_BOOT_SOURCE_SDMMC=1 bl2 bl31 PRELOADED_BL33_BASE=0x80100000 -j$(nproc)
make fiptool
cp tools/fiptool/fiptool $TOP_FOLDER
Zephyr RTOSの「DigiKey drinking coffee cup哲学者」のZephyrアプリケーションをビルドします。
cd $TOP_FOLDER
source venv/bin/activate
cd $TOP_FOLDER/zephyrproject/zephyr
west build -b intel_socfpga_agilex5_socdk samples/philosophers -d agilex5 --pristine
deactivate
このZephyrアプリケーションをSimics Agilex 5シミュレータで実行するには、
cd $TOP_FOLDER
mkdir qspi_bin && cd qspi_bin
cp $TOP_FOLDER/arm-trusted-firmware-qspi/build/agilex5/release/bl2.bin .
$TOP_FOLDER/fiptool create --soc-fw $TOP_FOLDER/arm-trusted-firmware-qspi/build/agilex5/release/bl31.bin --nt-fw $TOP_FOLDER/zephyrproject/zephyr/agilex5/zephyr/zephyr.bin fip.bin
対応する.pfgファイルを作成します。
#CREATE PFG FILE
cd $TOP_FOLDER/qspi_bin
tee qspi_flash_image_agilex5_boot.pfg << 'EOF'
<pfg version="1">
<settings custom_db_dir="./" mode="ASX4"/>
<output_files>
<output_file name="flash_image" directory="." type="JIC">
<file_options/>
<secondary_file type="MAP" name="flash_image_jic">
<file_options/>
</secondary_file>
<secondary_file type="SEC_RPD" name="flash_image_jic">
<file_options bitswap="1"/>
</secondary_file>
<flash_device_id>Flash_Device_1</flash_device_id>
</output_file>
</output_files>
<bitstreams>
<bitstream id="Bitstream_1">
<path hps_path="bl2.hex">agilex5_factory.sof</path>
</bitstream>
</bitstreams>
<raw_files>
<raw_file bitswap="1" type="RBF" id="Raw_File_1">bin/fip.bin</raw_file>
</raw_files>
<flash_devices>
<flash_device type="MT25QU02G" id="Flash_Device_1">
<partition reserved="1" fixed_s_addr="1" s_addr="0x00000000" e_addr="0x001FFFFF" fixed_e_addr="1" id="BOOT_INFO" size="0"/>
<partition reserved="0" fixed_s_addr="0" s_addr="auto" e_addr="auto" fixed_e_addr="0" id="P1" size="0"/>
<partition reserved="0" fixed_s_addr="0" s_addr="0x03C00000" e_addr="auto" fixed_e_addr="0" id="fip" size="0"/>
</flash_device>
<flash_loader>A5ED065BB32AE6SR0</flash_loader>
</flash_devices>
<assignments>
<assignment page="0" partition_id="P1">
<bitstream_id>Bitstream_1</bitstream_id>
</assignment>
<assignment page="0" partition_id="fip">
<raw_file_id>Raw_File_1</raw_file_id>
</assignment>
</assignments>
</pfg>
EOF
そして最後に、
cd $TOP_FOLDER/qspi_bin
aarch64-none-linux-gnu-objcopy -v -I binary -O ihex --change-addresses 0x00000000 bl2.bin bl2.hex
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
これで、次回の記事でZephyr RTOSのDigiKey drinking coffee cupの「食事する哲学者」を実行するための最終ステップに進む準備が整いました。DE-25 FPGA開発キットは、Tensor AIスライスを実装できるHPS/FPGA Agilex 5(ケースに応じてDシリーズとEシリーズが利用可能)を搭載した強力なプラットフォームです。
これらは、従来のDSPスライスが過去に実装していた機能をはるかに超える能力を備えています。
この製品はDigiKeyで入手可能です。
どうぞ素晴らしい一日を!
この記事はスペイン語でこちらからご覧いただけます。
Este artículo está disponible en español aquí.


