Intel Agilex® 7 Hard Processor System Remote System Update User Guide

ID 683184
Date 6/09/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

7.1.2. Building the Hardware Projects

Create four different hardware projects, based on the GHRD from GitHub with a few changes:
  • Change the boot mode to FPGA first
  • Use a different ID in the SystemID component, to make the binaries for each project slightly different.
  • Enable watchdog reset action and change the behavior of watchdog timeout, to trigger an RSU event.
  • Disable SGMII mode for Ethernet in HPS.
  • Disable partial reconfiguration.
  • Set the max retry parameter to 3, so that each application image and the factory image are tried up to three time when configuration failures occur.
The commands to create and compile the projects are listed below:
cd $TOP_FOLDER
# compile hardware designs: 0-factory, 1,2-applications, 3-factory update
rm -rf hw && mkdir hw && cd hw
wget https://github.com/altera-opensource/ghrd-socfpga/archive/refs/tags/QPDS-22.1pro-21.1std.zip
unzip QPDS-22.1pro-21.1std.zip
mv ghrd-socfpga-QPDS-22.1pro-21.1std/agilex_soc_devkit_ghrd agilex_soc_devkit_ghrd
rm -rf ghrd-socfpga-QPDS-22.1pro-21.1std QPDS-22.1pro-21.1std.zip

export DAUGHTER_CARD=devkit_dc_oobe
for version in {0..3}
do
rm -rf ghrd.$version
cp -r agilex_soc_devkit_ghrd ghrd.$version
cd ghrd.$version
sed -i 's/BOOTS_FIRST .*= .*/BOOTS_FIRST := fpga/g' Makefile
sed -i 's/ENABLE_WATCHDOG_RST .*= .*/ENABLE_WATCHDOG_RST := 1/g' Makefile
sed -i 's/WATCHDOG_RST_ACTION .*= .*/WATCHDOG_RST_ACTION := remote_update/g' Makefile
sed -i 's/HPS_ENABLE_SGMII .*= .*/HPS_ENABLE_SGMII := 0/g' Makefile
sed -i 's/ENABLE_PARTIAL_RECONFIGURATION .*= .*/ENABLE_PARTIAL_RECONFIGURATION := 0/g' Makefile
sed -i 's/0xACD5CAFE/0xABAB000'$version'/g' create_ghrd_qsys.tcl
~/intelFPGA_pro/22.1/nios2eds/nios2_command_shell.sh \
make scrub_clean_all
~/intelFPGA_pro/22.1/nios2eds/nios2_command_shell.sh \
make generate_from_tcl
echo "set_global_assignment -name RSU_MAX_RETRY_COUNT 3" >> ghrd_agfb014r24b2e2v.qsf
# Change the board id to be zero - the one used when booting from SD card
sed -i 's/set_global_assignment -name STRATIX_JTAG_USER_CODE .*/set_global_assignment -name STRATIX_JTAG_USER_CODE 0/g' ghrd_agfb014r24b2e2v.qsf 
~/intelFPGA_pro/22.1/nios2eds/nios2_command_shell.sh \
make all
cd ..
done
rm -rf agilex_soc_devkit_ghrd
cd ..
After completing the above steps, the following SOF files are created:
  • hw/ghrd.0/output_files/ghrd_agfb014r24b2e2v.sof
  • hw/ghrd.1/output_files/ghrd_agfb014r24b2e2v.sof
  • hw/ghrd.2/output_files/ghrd_agfb014r24b2e2v.sof
  • hw/ghrd.3/output_files/ghrd_agfb014r24b2e2v.sof