Skip to content

HPS Cache Coherent Accelerator Linux System Example Design

Introduction

This system example design demonstrates a hardware accelerator in the FPGA fabric that communicates with the HPS over a cache-coherent FPGA2HPS AXI interface, performing bulk read/modify/write operations on HPS SDRAM. The example includes a couple of Linux applications that demonstrate the data transfer from one memory location to another keeping cache coherency and capturing some benchmark metrics.

Overview

This example illustrates the implementation of a System Verilog hardware accelerator (CCA - Cache Coherent Accelerator) in the FPGA fabric that is capable of process data coming from the HPS SDRAM and sending it back to SDRAM keeping cache coherency. The example makes use of FPGA2HPS bridge to implement the cache coherency and the LWHPS2FPGA bridge for the configuration of the FPGA fabric components.

Note: The term accelerator is used to refer that the data processing is off-loaded from the software running in the HPS into the hardware in the FPGA fabric. This is done to speed up the data processing or to allow HPS to preform some other tasks.

Some of the most important features of this example design are listed next:

  • Quartus design is based on the Baseline System Example Design for Agilex® 5 FPGA E-Series 065A using HPS Boot first mode booting from an Arm® Cortex®-A55 core processor.
  • The Cache Coherent Accelerator (CCA) core that performs pipelined read/modify/write operations on HPS DRAM over the F2H coherent bridge. This includes a custom CSR block for the accelerator control and status, accessible from the HPS. The CCA component is implemented in System Verilog and the source code is available as part of the example design.
  • F2H AXI bridge configured for cache-coherent access via SMMU.
  • A couple of Modular Scatter-Gather DMA (MSGDMA) components are included in the Quartus design to implement read and write channels in prefetcher mode for bulk data movement between FPGA fabric and HPS memory. The MSGDMA components generate interrupts to signal to HPS about data transfer completion.
  • The design includes an On-Chip Memory for DMA descriptor storage and local scratch buffering.
  • This example includes a couple of Linux applications running in the HPS. These applications makes use of a CCA driver that is in charge of configuring the design in the fabric and coordinate the data movement in the Quartus design using the LWHPS2FPGA bridge. The HPS software is composed by:
    • ARM Trusted Firmware used secure monitor.
    • U-Boot used as bootloader (FSBL and SSBL). The SSBL is used to launch Linux and also to configure 2nd phase FPGA configuration.
    • Linux used as OS in which the applications run.
    • Cache Coherent Accelerator platform Linux kernel driver used to control the hardware in the fabric design and allocate SDRAM memory for the applications.
    • Two Linux applications running in user space. One of the applications exercise the data transfer from one memory location in SDRAM to another passing through the CCA component keeping cache coherency. The 2nd application performs throughput benchmarking over data that also is being transferred from one memory location in the SDRAM to another location passing through the CCA component. Both applications make use of the CCA driver. In both applications the CCA component is being configured in PROCESS_DATA mode.

The HPS software, the initial bitstream and the 2nd Phase fabric design are integrated into a .jic image that is loaded into the QSPI device in the development kit.

The complete CCA System Example Design is located at the following path: https://github.com/altera-fpga/agilex5-ed-hps-fpga-bridges/tree/QPDS26.3_REL_BASELINE_PR/dk-a5e065ab32aea-enablement/cache_coh_accel/

Cache Coherent Accelerator (CCA) Example Quartus Design

The Quartus design in this system example design allows data transfer from one region of the SDRAM to another region passing through the Cache Coherent Accelerator component that could be used to process the data if needed. The data transfer is performed by MSGDMA IPs, one for reading from the SDRAM and other for writing to the SDRAM. The Read MSGDMA reads the data from SDRAM and sends it to the CCA. The Write MSGDMA reads the data from CCA and writes back to the SDRAM. The MSGDMA components gets the source/destination addresses and data size to be transferred from descriptors that are stored in a On-Chip memory in the fabric. The HPS is in charge of create these descriptors. These descriptors are read sequentially by the MSGDMAs components and when all of them have been processed and the data transfer finishes, these trigger an interrupt to the HPS, so this can continue with the application flow.

The most important components that integrates the Quartus design are described next:

  • HPS IP: The HPS controls the application execution flow and also controls all data transaction functionalities, including DMA operations, EMIF data transfer. In this design, the System MMU Ports setting in the FPGA2HPS bridge is enabled so that F2H transactions go through the SMMU for cache-coherent transactions. All other parameters are the same as the HPS IP in the baseline-a55 Quartus design (including Enabling FPGA-to-HPS interrupts).
  • Modular Scatter-Gather DMA (MSGDMA) IP and AvMM-to-AXI4 Bridge: The Quartus design uses 2 MSGDMA IPs components. One for reading from SDRAM (referred as Read MSGDMA) and other for writing to SDRAM (referred as Write MSGDMA). These components are configured in prefetcher mode to facilitate bulk data movement between FPGA fabric and HPS DRAM over the F2H bridge. The prefetcher reads linked descriptor lists stored in the on-chip memory, enabling chained multi-block transfers without software intervention between data blocks. One AvMM-to-AXI4 Bridge block combines the AvMM write channel of the Write MSGDMA and the AvMM read channel of the Read MSGDMA into one single AXI channel interfacing the fabric-to-HPS bridge. As the source port (write) of the Read MSGDMA component is connected to the CCA component, the write address in the descriptors for this component is not used. Similarly, as the sink port (read) of the Write MSGDMA is connected to the CCA component, the read address in the descriptors for this component is not used.
  • On-Chip Memory II IP: This is used for MSGDMA descriptor storage and also serves as a local scratch buffer during transfer setup. It is configured as dual-port RAM, being accessible from both the HPS subsystem (via LWHPS2FPGA Bridge) and the MSGDMA's prefetchers. The size of the memory is 4 KB with a data size of 32 bits. The first 2KB area is used for descriptors of the Read MSGDMA and the second 2 KB area is used for descriptors of the Write MSGDMA.
  • Cache Coherent Accelerator (CCA) Core: The CCA core (src/cca_accel_core.sv) implements a pipelined read/modify/write engine that fetches data from HPS SDRAM, processes it in the FPGA fabric, and writes the processed data back over the F2H coherent AXI bridge. A custom CSR block (src/cca_accel_csr.sv) exposes control and status registers for software configuration and step-by-step execution tracking. The CCA supports PROCESS_DATA mode and PASS_THROUGH mode. In the PROCESS_DATA the input data is bit-wise inverted. In PASS_THROUGH mode the data is not modified at all.

A block diagram of the Quartus design for this example is shown next:

The configuration interface in the AVMM component has a base address relative to the LWH2F bridge (address 0x20000000). The following table shows the starting address of the CSRs for each component. The table also shows the address from the HPS perspective.

Component AVMM Base Address Physical address from HPS
OCM 0x00200000 0x20200000¹
Write MSGDMA Pre-Fetcher CSR 0x00204000 0x20204000
Read MSGDMA Pre-Fetcher CSR 0x00204020 0x20204020
Write MSGDMA CSR 0x00204040 0x20204040
Read MSGDMA CSR 0x00204060 0x20204060
CCA Accel 0x00400000 0x20400000

¹ This address is the same that MSGDMA uses to access the descriptors from OCM.

Cache Coherent Accelerator (CCA) Example HPS Software

The HPS Software exercises the data transfer from a SDRAM location to another passing through the CCA component to perform some data processing (if configured to do it). The example performs the following operations:

  • The cca-demo application exercise the reading of a set of data from a source location in the SDRAM using the Read MSGDMA, which then sends the data to the CCA component to do some processing and the sending back to a destination location in the SDRAM using the Write MSGDMA. The Read and Write operations from the SDRAM through the MSGDMA components, is controlled by descriptors stored in the OCM. The software verifies that the data recovered at the destination SDRAM location matches the expected result from the CCA processing.
  • The cca-benchmark application also performs data transfer from one SDRAM location to another passing through the CCA for processing the data, repeating this flow several times with different number of sets of data and different sizes, and capturing transfer data throughput metrics.

    Both applications make use of the CCA Kernel driver which facilitates the hardware configuration and the memory allocation for the source and destination buffers.

HPS Linux Software

The HPS Linux application software relies on U-Boot as the bootloader and to configure the FPGA fabric, for which the TF-A BL31 is also used as a secure monitor. U-Boot is used as a FSBL and SSBL. The u-boot.itb file includes U-Boot SSBL and the TF-A BL31. The FSBL and 1st Phase FPGA fabric are included as part of the bitstream. The core.rbf 2nd Phase FPGA fabric is integrated with the kernel.itb together with the Linux kernel and the Linux device tree. The Linux file system includes the 2 CCA applications. All the components are grouped in to a .jic image that needs to be stored in the QSPI device to boot from this. The layout of the .jic is shown next.

Note: The .jic includes a UBI partition that keeps the components that run after the SSBL.

The following sections briefly describe the most relevant software components in the application.

  • Cache Coherent Accelerator Driver. This is a Platform Kernel driver that interacts with the hardware in the Quartus design and also is used to dynamically allocate memory in SDRAM for the source and destination buffers used in the data transfer that the applications exercises. The driver needs its own node in the device tree whose name is cca and has the altr,cache-coh-accel-1.0 compatible string. The driver is initialized by executing its probe - cca_probe() function, creating the /dev/cca0 device in the Linux file system. When an application needs to make use of the driver, it needs to open this device. The driver exposes most of its functionality through IOCT calls. The most important of these functions are listed next:

    IOCTL Command Description
    CCA_IOC_ALLOC Allocates memory in SDRAM dinamically for certain number of jobs, each one with its specific transfer data length. It allocates twice of the memory defined in the lengths because it is needed a source (in) and destination(out) buffer. In the SDRAM the allocated memory will keep each pair of in/out buffers contiguous. Function: cca_ioctl_alloc().
    CCA_IOC_SUBMIT From the number of jobs and data sizes for each one, it creates the corresponding descriptors and stores them in the On-Chip Memory. It also configures the ISR to trigger once the Write MSGDMA finishes the data transfer(the driver only uses the interrupt from Write MSGDMA component). It also configures the CCA to start the data processing and the MSGDMAs prefetchers to start fetching the descriptors from the OCM. When the transfer starts the driver sets the xfer_submitted flag and clears the xfer_done flag. Function: cca_ioctl_submit().
    CCA_IOC_WAIT This waits until the data transfer completes or a defined timeout occurs. The driver make use of the xfer_done flag to determine if the transfer finishes. This flag is set by the Write MSGDMA interrupt handler (cca_wr_isr()) when the data transfer finishes. This handler also clears the xfer_submitted flag. The driver only makes use of the Write MSGDMA interrupt which is connected to f2h_irq0_in[0] as defined in the device tree cca node. Function: cca_ioctl_wait().
    CCA_IOC_RESET Stop and flush a MSGDMA prefetcher and dispatcher. Function: cca_ioctl_reset().
    CCA_IOC_FREE Release allocated memory without resetting the hardware. Function: cca_ioctl_free()

    The driver also supports the mmap() function that allows the application to map the allocated memory by the driver for the source/destination buffers into the User space. In this way, the application can write to the src buffer to initialize its content or read the buffers content to verify that data transfer was performed correclty.

    The source code of the driver is located at: cca.c. There is a helper file that the driver uses whose source code is located at: cca-dma-helper.c.

    The cca node in the device tree is defined at: cache_coh_accel.dts.

    The following figure describes the data flow that occurs when the cca_transfer_submit() function is executed.

  • cca-demo Application: This application exercises the data movement in the data path of the Quartus design, transferring data from source to destination buffers passing through the CCA component as shown in the previous figure. The application creates 3 jobs with a data length of 128 bytes each one. The next sequence describe the operations that the application coordinates:

    1. Request the driver to allocate memory for the source/destination buffers for the 3 jobs using the ioctl() function with the CCA_IOC_ALLOC command.

    2. Map all the memory allocated for the source and destination buffers into a pointer that the application can access (from User space).

    3. Initialize source buffers with the 0xAxxxxxxx data pattern.

    4. Request data transfer from source to destination buffers using the ioctl() function with the CCA_IOC_SUBMIT command using the PROCESS_DATA mode in the CCA component.

    5. Waits until the transfer completes using the ioctl() function with the CCA_IOC_WAIT command.

    6. Print the content in the destination buffers and compare this with the expected processed data (data from source buffer inverted).

    7. Free the allocated buffers using the ioctl() function with the CCA_IOC_FREE command.

    The source code of the cca-demo application is located at cca-demo.c.

  • cca-benchmark Application: This task performs a CCA throughput benchmark exercising the data transfer from a source memory location to other passing through the CCA. This task defines 2 groups in which are defined several data transfers instructions. These instructions define a a certain number of jobs and a size of data to transfer. For each one of the groups, and each one of the data transfers defined on them, the application calls the run_config() function. This one, converts the data transfer information in a set of jobs and for each job it request to the cca driver to allocate memory for source and destination buffers (ioctl() - CCA_IOC_ALLOC), maps the buffers into a pointer accessible from the application (using mmap()), initializes the source buffers with a 0xAxxxxxxx pattern. Later this function request the driver to start the transfer (ioctl() - CCA_IOC_SUBMIT) and wait for the transfer completion (ioctl() - CCA_IOC_WAIT), measuring the transfer time and counting the total number of bytes transferred. The data transfer request and waiting for this to complete is repeated several times (indicated by MEASURE_ITERS definition). Finally the allocated buffers are released (ioctl() - CCA_IOC_FREE), and the data transfer throughput metrics are calculated and printed.

    The following table describes the jobs groups defined:

    Group # Jobs Size of the Job (KB) Total Data Transfer (KB)
    0 1 32 32
    2 32 64
    4 32 128
    8 32 256
    16 32 512
    32 32 1024
    1 8 4 32
    8 16 128
    8 32 256
    8 64 512
    8 96 768

    The source code of the cca-benchmark application is located at cca-benchmark.c.

Prerequisites

The following are required to be able to fully exercise this System Example Design:

  • Altera® Agilex™ 5 FPGA E-Series 065A Premium Development Kit, ordering code DK-A5E065AB32AEA. Refer to board documentation for more information.

    • HPS Enablement Expansion Board. Included with the development kit.
    • Mini USB Cable. Included with the development kit.
    • Micro USB Cable. Included with the development kit.
    • Ethernet Cable. Included with the development kit.
    • Micro SD card and USB card writer. Included with the development kit.
  • Host PC with:

    • 64 GB of RAM. Less will be fine for only exercising the binaries, and not rebuilding the System Example Design.
    • 10 GB of free disk space for FreeRTOS builds
    • Linux OS installed. Ubuntu 22.04LTS was used to create this page, other versions and distributions may work too
    • Serial terminal (for example GtkTerm or Minicom on Linux and TeraTerm or PuTTY on Windows)
    • Altera® Quartus® Prime Pro Edition Version 26.3
  • Local Ethernet network, with DHCP server
  • Internet connection. For downloading the files, especially when rebuilding the System Example Design.

For more information about the development kit setup, please refer to the corresponding Baseline System Example Design user guide.

Component Versions

Altera® Quartus® Prime Pro Edition Version 26.3 and the following software component versions integrate the 26.3 release.

Component Location Branch Commit ID/Tag
Agilex 5 System Example Design https://github.com/altera-fpga/agilex5-ed-hps-fpga-bridges main QPDS26.3_REL_BASELINE_PR
Arm Trusted Firmware https://github.com/altera-fpga/arm-trusted-firmware socfpga_v2.15.0 QPDS26.3_REL_BASELINE_PR
FreeRTOS https://github.com/altera-fpga/freertos-socfpga main QPDS26.3_REL_BASELINE_PR

Note: The combination of the component versions indicated in the table above has been validated through the use cases described in this page and it is strongly recommended to use these versions together. If you decided to use any component with different version than the indicated, there is not warranty that this will work.

Rebuild Linux Binaries

This section guides you to build the binaries for the Cache Coherent Accelerator example.

Setup Environment

1. Create the top folder to store all the build artifacts:

sudo rm -rf agilex5_065a_linux_cca
mkdir agilex5_065a_linux_cca
cd agilex5_065a_linux_cca
export TOP_FOLDER=`pwd`

Enable Quartus tools to be called from command line:

source ~/altera_pro/26.3/qinit.sh

Build Hardware Design

cd $TOP_FOLDER
rm -rf dk-a5e065ab32aea-enablement-cache_coh_accel && mkdir dk-a5e065ab32aea-enablement-cache_coh_accel && cd dk-a5e065ab32aea-enablement-cache_coh_accel
wget https://github.com/altera-fpga/agilex5-ed-hps-fpga-bridges/releases/download/QPDS26.3_REL_BASELINE_PR/dk-a5e065ab32aea-enablement-cache_coh_accel.zip 
unzip dk-a5e065ab32aea-enablement-cache_coh_accel.zip
rm -f dk-a5e065ab32aea-enablement-cache_coh_accel.zip
make cache_coh_accel-build

The following files are created:

  • $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/output_files/cache_coh_accel.sof - FPGA Fabric design
  • $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/output_files/cache_coh_accel.core.rbf- 2nd Phase FPGA Fabric design

Build Binaries for CCA Applications

You can build the final .jic binary following the steps below. The build.sh script allows you to build the binaries for the Linux applications. The applications will be included as partof the Linux file system.

Note: To Build the HPS Baseline System Example Design you need to have the KAS version 4.8.2 in your Linux build machine. You also need also install python3-newt, and python3.10-venv packages. You can get them with:

$ sudo apt-get install python3-newt python3.10-venv
$ python3 -m pip install --upgrade kas
$ kas --version
kas 4.8.2 (configuration format version 19, earliest compatible version 1)
These are the instructions to build the HPS binaries. This make use of KAS and Yocto.

#Optional to Cash yocto downloads and sstate dirs
export BB_ENV_PASSTHROUGH_ADDITIONS="DL_DIR SSTATE_DIR"
export DL_DIR="$HOME/tasks/yocto/downloads"
export SSTATE_DIR="$HOME/tasks/yocto/sstate"

# Build sd binaries with kas
cd $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux
# Remove optimizations that are not needed in machines with high amount of memory.
sed -i '/BB_NUMBER_THREADS\|PARALLEL_MAKE/d' kas.yml

time ./build.sh  $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/output_files/cache_coh_accel.core.rbf qspi

The output files from this step are:

* $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/u-boot-spl-dtb.hex * $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/u-boot.itb * $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/console-image-minimal-agilex5e.rootfs_nor.ubifs * $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/kernel.itb * $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/boot.scr.uimg * $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/uboot.env

Generate the QSPI image from the binaries obtained above

cd $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/
rm -rf qspi_jic 
mkdir qspi_jic && cd qspi_jic
# Create links for the binaries needed and scripts used
ln -s $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/output_files/cache_coh_accel.sof ghrd.sof
ln -s $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/u-boot-spl-dtb.hex .
ln -s $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/u-boot.itb u-boot.bin
ln -s $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/console-image-minimal-agilex5e.rootfs_nor.ubifs .
ln -s $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/kernel.itb .
ln -s $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/boot.scr.uimg .
ln -s $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/build/tmp/deploy/images/agilex5e/uboot.env .
ln -s $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/scripts/ubinize_nor.cfg .
ln -s $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/scripts/qspi_boot.pfg .
# Create the .ubi for the UBI partition and renaming this
ubinize -o root.ubi -p 65536 -m 1 -s 1 ubinize_nor.cfg
ln -s root.ubi hps.bin
# Create the jic with the pfg file
quartus_pfg -c qspi_boot.pfg
# Rename the .jic to something more related to the example
mv qspi_boot.hps.jic qspi_cca_linux.hps.jic

The following JIC file is created:

  • $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/software/yocto_linux/qspi_jic/qspi_cca_linux.hps.jic

Note: Alternatively to the build method described above, you can fully build the System Example Design binaries (including Quartus project and HPS binaries) in a single step using the following command from $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel/ directory:

cd $TOP_FOLDER/dk-a5e065ab32aea-enablement-cache_coh_accel
make software-yocto_linux_qspi-build-sw

Exercise Built Binaries

This section presents how to use the built binaries created from Rebuild Linux Binaries section in this System Example Design for the DK-A5E065AB32AEA development kit.

Configure Board

1. Leave all jumpers and switches in their default configuration.

2. Install the appropriate HPS Daughtercard.

3. Connect mini USB cable from vertical connector on HPS Daughtercard to host PC. This is used for the HPS serial console.

4. Connect micro USB cable from development board to host PC. This is used by the tools for JTAG communication.

Configure Serial Console

All the scenarios included in this release require a serial connection. This section presents how to configure the serial connection.

1. Install a serial terminal emulator application on your host PC:

  • For Windows: TeraTerm or PuTTY are available
  • For Linux: GtkTerm or Minicom are available

2. Power down your board if powered up. This is important, as once powered up, with the micro USB JTAG cable connected, a couple more USB serial ports will enumerate, and you may choose the wrong port.

3. Connect mini-USB cable from the vertical mini-USB connector on the HPS Board to the host PC

4. On the host PC, an USB serial port will enumerate. On Windows machines it will be something like COM4, while on Linux machines it will be something like /dev/tty/USB0.

5. Configure your serial terminal emulator to use the following settings:

  • Serial port: as mentioned above
  • Baud rate: 115,200
  • Data bits: 8
  • Stop bits: 1
  • CRC: disabled
  • Hardware flow control: disabled

6. Connect your terminal emulator

Program the Application JIC File

1. Power down board

2. Set MSEL dipswitch SW27 to JTAG: OFF-OFF-OFF-OFF

3. Power up the board

4. Write the JIC file to QSPI:

jtagconfig --setparam 1 JtagClock 16M
quartus_pgm -c 1 -m jtag -o "pvi;qspi_cca_linux.hps.jic"

Exercise cca-demo Application

Once the QSPI has been programmed with the qspi_cca_linux.hps.jic file, you need perform the following steps to launch the application.

1. Power down board

2. Set MSEL dipswitch SW27 to ASX4 (QSPI): OFF-ON-ON-OFF

3. Power up the board

4. Observe in the Serial console the output that the application displays. Here you can see that U-Boot starts booting after the power cycle. Later U-Boot performs the 2nd FPGA configuration and later this launches the Linux. Once that you boot to Linux shell, the cca-demo application is launched with ./cca/cca-demo:

U-Boot SPL 2026.07 (Oct 13 2026 - 06:39:50 +0000)
Reset state: Cold
MPU          1500000 kHz
L4 Main       400000 kHz
L4 sys free   100000 kHz
L4 MP         200000 kHz
L4 SP         100000 kHz
SDMMC         200000 kHz
:
Trying to boot from SPI
## Checking hash(es) for config board-0 ... OK
## Checking hash(es) for Image atf ... crc32+ OK
## Checking hash(es) for Image uboot ... crc32+ OK
## Checking hash(es) for Image fdt-0 ... crc32+ OK
NOTICE:  SOCFPGA: Boot Core = 0
NOTICE:  SOCFPGA: CPU ID = 0
NOTICE:  SOCFPGA: Setting CLUSTERECTRL_EL1
NOTICE:  BL31: v2.15.1(release):QPDS26.3_REL_BASELINE_PR
NOTICE:  BL31: Built : 13:19:17, Oct 12 2026

U-Boot 2026.07 (Oct 13 2026 - 06:39:50 +0000)socfpga_agilex5

CPU: Altera FPGA SoCFPGA Platform (ARMv8 64bit Cortex-A55)
Model: SoCFPGA Agilex5 SoCDK
DRAM:  2 GiB (total 8 GiB)
Core:  53 devices, 26 uclasses, devicetree: separate
WDT:   Started watchdog@10d00200 with servicing every 1000ms (30s timeout)
WDT:   Not starting watchdog@10d00300
:
Hit any key to stop autoboot: 0
SF: Detected mt25qu02g with page size 256 Bytes, erase size 64 KiB, total 256 MiB
Select Environment on UBI: OK
Saving Environment to UBI... Could not find a valid device for nand.0
done
OK
UBI partition 'root' already selected
UBI partition 'root' already selected
No size specified -> Using max size (196224)
Read 196224 bytes from volume script to 0000000081000000
QSPI: Running script from UBIFS
QSPI: Trying to boot script at 0x81000000
## Executing script at 81000000
sha256+ Trying to boot Linux from device qspi
:
   Loading fpga from 0x82a91070 to 0x8a000000
'fpga' image without 'compatible' property
..FPGA reconfiguration OK!
Enable FPGA bridges
:
Starting kernel ...

Deasserting all peripheral resets
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[    0.000000] Linux version 6.18.37-altera-g0c0e456cdde0-dirty (oe-user@oe-host) (aarch64-poky-linux-gcc (GCC) 15.3.0, GNU ld (GNU Binutils) 2.46.1.20260718) #1 SMP PREEMPT Thu Oct 15 06:08:33 UTC 2026
[    0.000000] KASLR disabled due to lack of seed
[    0.000000] Machine model: SoCFPGA Agilex5 SoCDK
:
[    0.000000] Kernel command line: earlycon panic=-1 ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs rw rootwait
[    0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes
[    0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
:

agilex5e login: root

WARNING: Poky is a reference Yocto Project distribution that should be used for
testing and development purposes only. It is recommended that you create your
own distribution for production use.

root@agilex5e:~# ./cca/cca-demo 
========================================
  CCA Linux Demo
  3 jobs x 128 bytes (out=~in)
========================================

--- Run 1/1 ---
  Job 0 input:
    [00-03]  0xa0000000  0xa0000001  0xa0000002  0xa0000003  
    [04-07]  0xa0000004  0xa0000005  0xa0000006  0xa0000007  
    [08-11]  0xa0000008  0xa0000009  0xa000000a  0xa000000b  
    [12-15]  0xa000000c  0xa000000d  0xa000000e  0xa000000f  
    [16-19]  0xa0000010  0xa0000011  0xa0000012  0xa0000013  
    [20-23]  0xa0000014  0xa0000015  0xa0000016  0xa0000017  
    [24-27]  0xa0000018  0xa0000019  0xa000001a  0xa000001b  
    [28-31]  0xa000001c  0xa000001d  0xa000001e  0xa000001f  
  Job 1 input:
    [00-03]  0xa1000000  0xa1000001  0xa1000002  0xa1000003  
    [04-07]  0xa1000004  0xa1000005  0xa1000006  0xa1000007  
    [08-11]  0xa1000008  0xa1000009  0xa100000a  0xa100000b  
    [12-15]  0xa100000c  0xa100000d  0xa100000e  0xa100000f  
    [16-19]  0xa1000010  0xa1000011  0xa1000012  0xa1000013  
    [20-23]  0xa1000014  0xa1000015  0xa1000016  0xa1000017  
    [24-27]  0xa1000018  0xa1000019  0xa100001a  0xa100001b  
    [28-31]  0xa100001c  0xa100001d  0xa100001e  0xa100001f  
  Job 2 input:
    [00-03]  0xa2000000  0xa2000001  0xa2000002  0xa2000003  
    [04-07]  0xa2000004  0xa2000005  0xa2000006  0xa2000007  
    [08-11]  0xa2000008  0xa2000009  0xa200000a  0xa200000b  
    [12-15]  0xa200000c  0xa200000d  0xa200000e  0xa200000f  
    [16-19]  0xa2000010  0xa2000011  0xa2000012  0xa2000013  
    [20-23]  0xa2000014  0xa2000015  0xa2000016  0xa2000017  
    [24-27]  0xa2000018  0xa2000019  0xa200001a  0xa200001b  
    [28-31]  0xa200001c  0xa200001d  0xa200001e  0xa200001f  
  Job 0 received:
    [00-03]  0x5fffffff  0x5ffffffe  0x5ffffffd  0x5ffffffc  
    [04-07]  0x5ffffffb  0x5ffffffa  0x5ffffff9  0x5ffffff8  
    [08-11]  0x5ffffff7  0x5ffffff6  0x5ffffff5  0x5ffffff4  
    [12-15]  0x5ffffff3  0x5ffffff2  0x5ffffff1  0x5ffffff0  
    [16-19]  0x5fffffef  0x5fffffee  0x5fffffed  0x5fffffec  
    [20-23]  0x5fffffeb  0x5fffffea  0x5fffffe9  0x5fffffe8  
    [24-27]  0x5fffffe7  0x5fffffe6  0x5fffffe5  0x5fffffe4  
    [28-31]  0x5fffffe3  0x5fffffe2  0x5fffffe1  0x5fffffe0  
  Job 0: PASS
  Job 1 received:
    [00-03]  0x5effffff  0x5efffffe  0x5efffffd  0x5efffffc  
    [04-07]  0x5efffffb  0x5efffffa  0x5efffff9  0x5efffff8  
    [08-11]  0x5efffff7  0x5efffff6  0x5efffff5  0x5efffff4  
    [12-15]  0x5efffff3  0x5efffff2  0x5efffff1  0x5efffff0  
    [16-19]  0x5effffef  0x5effffee  0x5effffed  0x5effffec  
    [20-23]  0x5effffeb  0x5effffea  0x5effffe9  0x5effffe8  
    [24-27]  0x5effffe7  0x5effffe6  0x5effffe5  0x5effffe4  
    [28-31]  0x5effffe3  0x5effffe2  0x5effffe1  0x5effffe0  
  Job 1: PASS
  Job 2 received:
    [00-03]  0x5dffffff  0x5dfffffe  0x5dfffffd  0x5dfffffc  
    [04-07]  0x5dfffffb  0x5dfffffa  0x5dfffff9  0x5dfffff8  
    [08-11]  0x5dfffff7  0x5dfffff6  0x5dfffff5  0x5dfffff4  
    [12-15]  0x5dfffff3  0x5dfffff2  0x5dfffff1  0x5dfffff0  
    [16-19]  0x5dffffef  0x5dffffee  0x5dffffed  0x5dffffec  
    [20-23]  0x5dffffeb  0x5dffffea  0x5dffffe9  0x5dffffe8  
    [24-27]  0x5dffffe7  0x5dffffe6  0x5dffffe5  0x5dffffe4  
    [28-31]  0x5dffffe3  0x5dffffe2  0x5dffffe1  0x5dffffe0  
  Job 2: PASS

========================================
  Overall result: PASSED
========================================

Exercise cca-benchmark Application

Once the QSPI has been programmed with the qspi_cca_linux.hps.jic file, you need perform the following steps to launch the application.

1. Power down board

2. Set MSEL dipswitch SW27 to ASX4 (QSPI): OFF-ON-ON-OFF

3. Power up the board

4. Observe in the Serial console the output that the application displays. Here you can see that U-Boot starts booting after the power cycle. Later U-Boot performs the 2nd FPGA configuration and later this launches the Linux. Once that you boot to Linux shell, the cca-benchmark application is launched with ./cca/cca-benchmark.

root@agilex5e:~# ./cca/cca-benchmark 
=====================================================
  CCA Throughput Benchmark - Linux
=====================================================

Benchmark 1: job_size=32 KB, n_jobs = 1 to 32
  jobs= 1  job= 32 KiB  xfer=  32 KiB  avg=  0.026 ms (min=0.026 max=0.026)  2526.31 MB/s (min=2496.13 max=2553.52)
  jobs= 2  job= 32 KiB  xfer=  64 KiB  avg=  0.039 ms (min=0.039 max=0.051)  3348.65 MB/s (min=2579.14 max=3386.70)
  jobs= 4  job= 32 KiB  xfer= 128 KiB  avg=  0.073 ms (min=0.072 max=0.093)  3581.65 MB/s (min=2805.69 max=3617.28)
  jobs= 8  job= 32 KiB  xfer= 256 KiB  avg=  0.131 ms (min=0.130 max=0.144)  4008.71 MB/s (min=3649.00 max=4039.98)
  jobs=16  job= 32 KiB  xfer= 512 KiB  avg=  0.241 ms (min=0.239 max=0.246)  4342.21 MB/s (min=4268.44 max=4384.50)
  jobs=32  job= 32 KiB  xfer=1024 KiB  avg=  0.524 ms (min=0.520 max=0.529)  4005.97 MB/s (min=3965.05 max=4034.07)

Benchmark 2: n_jobs=8, job_size = 4 to 96 KB
  jobs= 8  job=  4 KiB  xfer=  32 KiB  avg=  0.060 ms (min=0.059 max=0.060)  1101.12 MB/s (min=1097.94 max=1103.11)
  jobs= 8  job= 16 KiB  xfer= 128 KiB  avg=  0.094 ms (min=0.094 max=0.095)  2783.78 MB/s (min=2763.92 max=2791.44)
  jobs= 8  job= 32 KiB  xfer= 256 KiB  avg=  0.131 ms (min=0.129 max=0.148)  4014.93 MB/s (min=3531.75 max=4054.35)
  jobs= 8  job= 64 KiB  xfer= 512 KiB  avg=  0.203 ms (min=0.201 max=0.208)  5169.30 MB/s (min=5048.07 max=5213.99)
  jobs= 8  job= 96 KiB  xfer= 768 KiB  avg=  0.288 ms (min=0.283 max=0.291)  5463.82 MB/s (min=5408.15 max=5562.19)

=====================================================
  Benchmark complete.
=====================================================
root@agilex5e:~# 

Notices & Disclaimers

Altera® Corporation technologies may require enabled hardware, software or service activation. No product or component can be absolutely secure. Performance varies by use, configuration and other factors. Your costs and results may vary. You may not use or facilitate the use of this document in connection with any infringement or other legal analysis concerning Altera or Intel products described herein. You agree to grant Altera Corporation a non-exclusive, royalty-free license to any patent claim thereafter drafted which includes subject matter disclosed herein. No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document, with the sole exception that you may publish an unmodified copy. You may create software implementations based on this document and in compliance with the foregoing that are intended to execute on the Altera or Intel product(s) referenced in this document. No rights are granted to create modifications or derivatives of this document. The products described may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Altera disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade. You are responsible for safety of the overall system, including compliance with applicable safety-related requirements or standards. © Altera Corporation. Altera, the Altera logo, and other Altera marks are trademarks of Altera Corporation. Other names and brands may be claimed as the property of others.

OpenCL* and the OpenCL* logo are trademarks of Apple Inc. used by permission of the Khronos Group™.

Ask in the Forum