AN 1011: TinyML Applications in Altera FPGAs Using LiteRT for Microcontrollers
ID
848984
Date
4/07/2025
Public
4.1. GHRD Hardware Design
Altera provides several GHRDs based on the FPGA SoC devices. This includes Stratix® 10, Agilex™ 7, and Agilex™ 5. The GHRD contains the following items:
- Arm* Cortex* processors
- Secure Digital/Embedded Multimedia Card (SD/eMMC) host controller
- Ethernet Media Access Controller (EMAC)
- USB UART
- HPS External Memory Interface (EMIF)
- FPGA peripherals, which can be customized based on the design needs.
A generic system-level design of Altera GHRD can be seen in the following figure. For more information, refer to the Hard Processor System Technical Reference Manual for specific Altera FPGA SoC devices.
Figure 18. Altera GHRD System Level Design
Refer to the following steps to prepare the GHRD:
- Identify the target Altera FPGA SoC devices. This example uses the Agilex™ 5 FPGA E-Series 065B Premium Development Kit.
- Install the appropriate Quartus® Prime Pro Edition software version. This example uses Quartus® Prime Pro Edition software version 24.3.
- Start with the toolchain setup:
$ wget https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel /gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz $ tar xf gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz $ rm -f gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz $ export PATH=`pwd`/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin:$PATH $ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-none-linux-gnu- $ export QUARTUS_ROOTDIR=~/intelFPGA_pro/24.3/quartus/ $ export PATH=$QUARTUS_ROOTDIR/bin:$QUARTUS_ROOTDIR/linux64:$QUARTUS_ROOTDIR/../qsys/bin:$PATH
- Follow the steps below to build the GHRD for Agilex™ 5 SoC:
$ mkdir tinyml_dev && cd tinyml_dev $ export TOP_FOLDER=$(pwd) $ git clone -b QPDS24.3_REL_GSRD_PR https://github.com/altera-opensource/ghrd-socfpga $ mv ghrd-socfpga/agilex5_soc_devkit_ghrd . $ rm -rf ghrd-socfpga $ cd agilex5_soc_devkit_ghrd $ make config $ make DEVICE=A5ED065BB32AE6SR0 HPS_EMIF_MEM_CLK_FREQ_MHZ=800 HPS_EMIF_REF_CLK_FREQ_MHZ=100 generate_from_tcl $ make all
These steps generate the bitstream file that programs the board. You can start programming the board once the ATF bootloader is generated.