Skip to content

HPS Desktop Linux System Example Design for Agilex 5 FPGA E-Series 065A Modular Development Kit

Introduction

This document describes the desktop-linux-dp design.

HPS Desktop Linux System Example Design Overview

The Desktop Linux DisplayPort (DP) Application demonstrates a complete Linux desktop environment running on the Agilex® 5 E-Series SoC FPGA platform using the Quartus Design. The design showcases the integration of the HPS, Linux software stack, graphics subsystem, and DisplayPort video output to enable a graphical desktop experience on the target hardware. The Agilex 5 Quartus Design provides the hardware foundation, while the Linux BSP, bootloader, kernel, device tree, and graphics drivers work together to deliver display functionality and user interaction.

This System Example Design comprises the following components:

  • Quartus Design
  • Reference HPS software including:
    • Arm Trusted Firmware
    • U-Boot
    • Linux Kernel
    • Linux Drivers
    • Sample Applications

HPS Desktop Linux Solution Architecture for this SED is illustrated as:

Desktop Linux Solution Arch

Prerequisites

This system example design is based on the Agilex 5 E-Series Development Kit HPS Baseline System Example Design (formerly known as "GSRD" or "Golden System Reference Design"). It is recommended that you familiarize yourself with the Baseline System Example Design development flow before proceeding with this design. The Desktop Linux System Example Design requires the HPS Enablement Expansion Board (also referred as HPS Daughter Card), which is included with the development kit.

Development Kit

This Example Design targets the Agilex 5 FPGA E-Series Development Kit, utilizing the Baseline System Example Design. Refer to GSRD#Development Kit for details about the board, including how to install the HPS Daughter Card.

  • Altera® Agilex™ 5 FPGA E-Series Development Kit
  • HPS Enablement Expansion Board. Included with the development kit.
  • Mini USB Cable
  • Micro USB Cable
  • Micro SD card and USB card writer
  • DP cable
  • USB-C JTAG Cable
  • 1080p Monitor

Altera® Agilex™ 5 FPGA E-Series Development Kit:

Agilex 5 FPGA E-Series Development Kit

Development Environment

Host PC with:

  • 64 GB of RAM. Less will be fine for only exercising the binaries, and not rebuilding the HPS Baseline System Example Design (formerly known as "GSRD" or "Golden System Reference Design").
  • 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. Used to recompile the hardware design. If only writing binaries is required, then the smaller Altera® Quartus® Prime Pro Edition Programmer is sufficient.
  • The prebuilt binaries were built using Quartus version 26.3
  • The instructions for rebuilding the binaries use Quartus version 26.3
  • Local Ethernet network, with DHCP server
  • Internet connection. For downloading the files, especially when rebuilding the HPS Baseline System Example Design (formerly known as "GSRD" or "Golden System Reference Design").

Release Contents

This page documents the following:

Prebuilt Binaries

The Agilex 5 Development Kit 26.3 Example Design binaries are located at https://releases.rocketboards.org/2026.10/desktop-linux-dp/agilex5_mk_a5e065ab32aea_desktop-linux-dp/:

HPS Daughter Card Boot Source Link
Enablement Board SD Card https://releases.rocketboards.org/2026.10/desktop-linux-dp/agilex5_mk_a5e065ab32aea_desktop-linux-dp/

Desktop Linux Solution

This application is intended to help developers evaluate and accelerate the development of embedded graphical solutions on Agilex 5 SoC FPGAs. It demonstrates how the hardware platform, Linux software stack, and display subsystem can be combined to create a fully functional desktop environment suitable for industrial, edge computing, HMI, vision, and embedded applications.

  • HPS Peripherals connected to HPS Enablement Expansion Board for this design:

    • Micro SD Card
    • EMAC
    • HPS JTAG debug
    • UART

HPS Subsystem

Refer to the Agilex 5 Hard Processor System Technical Reference Manual and Hard Processor System Component Reference Manual: Agilex 5 SoCs for additional HPS configuration information.

Bridges

Bridges move data between the FPGA fabric and HPS logic. The HPS and FPGA address maps are the same for Agilex 5, so the base address used from U-Boot or Linux is the same address used when accessing the corresponding FPGA-fabric interface through the Nios V subsystem.

Bridge Use case Access
F2SDRAM Moves data from FPGA fabric to HPS logic without coherency HPS EMIF
F2S Moves data from FPGA fabric to HPS logic coherently HPS peripherals except the GIC
LWS2F Moves data from HPS logic to FPGA fabric FPGA peripheral control/status registers
H2F Moves data from HPS logic to FPGA fabric FPGA on-chip memory used as scratchpad

For more information, refer to the HPS Bridges documentation and the Total Address Map Graphical reference.

Fabric Subsystem

The FPGA fabric subsystem contains:

  • Nios V subsystem.
  • 256 KB of FPGA on-chip memory.
  • System ID.
  • PIO IP for controlling the DIP switches, push buttons, and LEDs.

The Nios V subsystem includes a JTAG Avalon Master Bridge and Address Span Extender IP. These components allow System Console debug activity and FPGA content access through JTAG without relying on HPS software drivers.

Refer to the Quartus Prime Pro Edition User Guide: Analyzing and Debugging Designs with System Console for System Console information.

Nios V Subsystem

The Nios V address map is shown below.

Component Attribute Address offset Size (bytes)
ocm On-Chip Memory II 0x0 262144
jtag_uart JTAG UART 0x0005_0040 8
fpga2hps_address_span_extender Address Span Extender control 0x0005_0070 8
fpga2hps_address_span_extender Window slave 0x4000_0000 1073741824
f2sdram_address_span_extender Address Span Extender control 0x0005_0080 8
f2sdram_address_span_extender Window slave 0x8000_0000 1073741824
pio_in PIO inputs 0x0005_0050 16
pio_out PIO outputs 0x0005_0060 16
SDRAM Access Through the Address Span Extender

The development kit provides 8 GB of SDRAM mapped across two physical address regions:

Region Global address range Local address range
Lower 2 GB 0x00_8000_0000 – 0x00_FFFF_FFFF 0x0_0000_0000 – 0x0_7FFF_FFFF
Upper 6 GB 0x08_8000_0000 – 0x09_FFFF_FFFF 0x0_8000_0000 – 0x1_FFFF_FFFF

System Console and Nios V operate in a 32-bit address space and cannot directly access 64-bit SDRAM addresses. The Address Span Extender IP uses CSR_L and CSR_H to construct a full 64-bit physical SDRAM address from a 32-bit data address.

Register Base address Holds
CSR_L 0x50070 (F2H) Bits [31:0] of the 64-bit target address
CSR_H 0x50074 (F2H) Bits [63:32] of the 64-bit target address
CSR_L 0x50080 (F2SDRAM) Bits [31:0] of the 64-bit target address
CSR_H 0x50084 (F2SDRAM) Bits [63:32] of the 64-bit target address

The Address Span Extender provides a fixed 1 GB window into the 8 GB SDRAM space:

  • The F2SDRAM window is located at 0x8000_0000 through 0xBFFF_FFFF.
  • The F2H window is located at 0x4000_0000 through 0x7FFF_FFFF.
  • The window covers 2^28 × 4 = 1 GB through a 28-bit word address.

For F2SDRAM, setting CSR_L to 0x8000_0000 anchors the window at that address. If the target address exceeds the current 1 GB window, update CSR_L to the next 1 GB-aligned boundary. For example, setting CSR_L to 0xC000_0000 shifts the window to 0xC000_0000 through 0xFFFF_FFFF.

To read SDRAM through System Console:

  1. Set the applicable CSR_L register to the lower 32 bits of the target address.
  2. Set the applicable CSR_H register to the upper 32 bits of the target address.
  3. Compute the data address:
    • F2SDRAM: 0x8000_0000 + offset from target address.
    • F2H: 0x4000_0000 + offset from target address.
  4. Read the computed address through System Console.
Target address CSR_H CSR_L Window address plus offset
0xC200_0000 (F2SDRAM, lower 2 GB) 0x0 0xC000_0000 0x8000_0000 + 0x0200_0000 = 0x8200_0000
0x9_0200_0000 (F2SDRAM, upper 6 GB) 0x9 0x0000_0000 0x8000_0000 + 0x0200_0000 = 0x8200_0000
0x8200_0000 (F2H, lower 2 GB) 0x0 0x8000_0000 0x4000_0000 + 0x0200_0000 = 0x4200_0000
0x8_8200_0000 (F2H, upper 6 GB) 0x8 0x8000_0000 0x4000_0000 + 0x0200_0000 = 0x4200_0000

The System Console input address (master_address) is derived from the Address Span Extender window base address plus the offset from the lower 32 bits of the target address. CSR_H selects the SDRAM bank, CSR_L positions the window within that bank, and master_address identifies the access address inside the window.

Peripherals
Peripheral Address offset Size (bytes) Attribute Interrupt number
sysid 0x0001_0000 8 Unique system ID None
led_pio 0x0001_0080 16 LED outputs None
button_pio 0x0001_0060 16 Push-button inputs 0
dipsw_pio 0x0001_0070 16 DIP-switch inputs None

The 065A Modular Development Kit provides two user DIP-switch inputs, two user push-button inputs, and one FPGA-connected LED output. All LED outputs can be manipulated by software.

The fabric peripheral components are accessible through the LWS2F bridge with an offset of 0x0_2000_0000.

The FPGA IRQ has offset 17 when mapped to the Generic Interrupt Controller in the device-tree structure. Refer to fpga2hps_interrupt_irq0[0] in the GIC Shared Peripheral Interrupts Map for the SoC HPS.

USB Modes

The design supports USB 3.1 in both host and device modes. The USB mode is selected during configuration and remains fixed until the system is powered down.

Configure the Linux device tree with the dr_mode property:

dr_mode value USB mode
host Host
peripheral Device

User Flow

There are two ways to test the design based on use case.

User Flow Description Required for Userflow#1 Required for Userflow#2
Environment Setup Tools Download and Installation Yes Yes
Install dependencies for SW compilation No Yes
Compilation Simulation No No
Hardware Compilation No Yes
Software Compilation No Yes
Programming Programming the binaries Yes Yes
Linux boot Yes Yes
Testing Testing Yes Yes

Environment Setup

Tools Download and Installation

  1. Quartus Prime Pro

    Please download and install the Quartus® Prime Pro Edition version 26.3 version software.

  2. Win32 Disk Imager

    Please download and install the latest Win32 Disk Imager, available at https://win32diskimager.org/

Download and setup the build toolchain

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

sudo rm -rf deskstop_linux_dp.enablement
mkdir deskstop_linux_dp.enablement
cd deskstop_linux_dp.enablement
export TOP_FOLDER=`pwd` # The $TOP_FOLDER must be defined for every fresh terminal session.

Note that this is installed in the TOP_FOLDER. You may installed this is in other location, but note the path and export it accordingly

Install dependencies for SW compilation

2. Set up the Quartus tools in the PATH, so they are accessible without full path.

Note: The following must be re-done for fresh terminal session

export QUARTUS_ROOTDIR=~/altera_pro/26.3/quartus/
export PATH=$QUARTUS_ROOTDIR/bin:$QUARTUS_ROOTDIR/linux64:$QUARTUS_ROOTDIR/../qsys/bin:$PATH

Compilation Flow

Hardware Compilation Flow

cd $TOP_FOLDER
rm -rf agilex5_mk_a5e065ab32aea_desktop-linux-dp && mkdir agilex5_mk_a5e065ab32aea_desktop-linux-dp && cd agilex5_mk_a5e065ab32aea_desktop-linux-dp
wget https://github.com/altera-fpga/agilex5-ed-hps-baseline/releases/download/QPDS26.3_REL_BASELINE_PR/mk-a5e065ab32aea-desktop-linux-dp.zip
unzip mk-a5e065ab32aea-desktop-linux-dp.zip
rm -f mk-a5e065ab32aea-desktop-linux-dp.zip
make desktop_linux_dp-build

The following files are created:

  • $TOP_FOLDER/agilex5_mk_a5e065ab32aea_desktop-linux-dp/output_files/desktop_linux_dp.sof
Build Core RBF
make desktop_linux_dp-install-core-rbf

The following file is created:

  • $TOP_FOLDER/agilex5_mk_a5e065ab32aea_desktop-linux-dp/output_files/desktop_linux_dp.core.rbf

Software Compilation Flow

The following page shows an overview of how the build process works for this use case:

Please refer this page: Rebuild Binaries

[Note:] SKip "Build Hardware Design" and direct to "Build Yocto Using Kas" and rename the design file as below $TOP_FOLDER/agilex5_mk_a5e065ab32aea_desktop-linux-dp/software/yocto_linux/meta-custom/recipes-fpga/fpga-bitstream/files/baseline_hps_debug.core.rbf to $TOP_FOLDER/agilex5_mk_a5e065ab32aea_desktop-linux-dp/software/yocto_linux/meta-custom/recipes-fpga/fpga-bitstream/files/desktop_linux_dp_hps_debug.core.rbf

Build QSPI Image

cd $TOP_FOLDER
rm -f desktop_linux_dp.hps.jic desktop_linux_dp.core.rbf
quartus_pfg \
-c agilex5_mk_a5e065ab32aea_desktop-linux-dp/output_files/desktop_linux_dp.sof desktop_linux_dp.jic \
-o device=MT25QU128 \
-o flash_loader=A5ED065AB32AE1V \
-o hps_path=agilex5_mk_a5e065ab32aea_desktop-linux-dp/software/yocto_linux/build/tmp/deploy/images/agilex5e/u-boot-spl-dtb.hex \
-o mode=ASX4 \
-o hps=1
The following file is created:

  • $TOP_FOLDER/desktop_linux_dp.hps.jic

Programming the Binaries

This section presents how to use the prebuilt binaries included with the System Example Design release.

Note: Please download Prebuilt Binaries, if you are leveraging userflow#1.

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.

5. Connect Ethernet cable from HPS Daughter Card to an Ethernet switch connected to local network. Local network must provide a DCHP server.

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 Daughter Card 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

Write QSPI Flash

1. Power down board

2. Power up the board

3. Write QSPI Flash:

Using pre-built image
  • Download and extract the JIC image, then write it to QSPI
cd $TOP_FOLDER
wget https://releases.rocketboards.org/2026.10/desktop-linux-dp/agilex5_mk_a5e065ab32aea_desktop-linux-dp/ghrd.hps.jic
quartus_pgm -c 1 -m jtag -o "pvi;ghrd.hps.jic"
Using compiled image
  • Write JIC image to QSPI:
cd $TOP_FOLDER
quartus_pgm -c 1 -m jtag -o "pvi;desktop_linux_dp.hps.jic"

Programming Software Image

For Prebuilt:
For compiled image:

The following relevant files are created in $TOP_FOLDER/agilex5_mk_a5e065ab32aea_desktop-linux-dp/software/yocto_linux/build/tmp/deploy/images/agilex5e/:

  • gsrd-console-image-agilex5e.rootfs.wic
  • u-boot-spl-dtb.hex
Write SD Card:

1. Write the gsrd-console-image-agilex5e.rootfs.wic SD card image to the micro SD card using the included USB writer in the host computer:

  • On Linux, use the dd utility as shown next:
# Determine the device associated with the SD card on the host computer.
cat /proc/partitions
# This will return for example /dev/sdx
# Use dd to write the image in the corresponding device
sudo dd if=gsrd-console-image-agilex5e.rootfs.wic of=/dev/sdx bs=1M
# Flush the changes to the SD card
sync
  • On Windows, use the Win32DiskImager program. For this, first rename the extension of gsrd-console-image-agilex5e.rootfs.wic to an .img file (sdcard.img for example) and write the image as shown in the next figure:

Linux Boot

  1. Power down board
  2. Power up the board
  3. Wait for Linux to boot, use root as user name, and no password will be requested.

Testing

1. Connect DisplayPort Monitor

  • Connect the DP TX port on the Agilex 5 E-Series 065A Modular Development Kit to a DisplayPort monitor using a DP cable.

DP_TX_Connector

Note: The display output is currently limited to 1080p60 (1920×1080 @ 60 Hz). Tested and verified with the following monitors and peripherals.

  • Dell P2319H
  • Samsung S27F350
  • USB Hub: SSK Type-C 4-Port USB Hub 0.25m White (SHU808)
  • Keyboard: Dell KB216 Wired Keyboard
  • Mouse: Dell USB Laser Mouse

2. Connect Keyboard and Mouse

  • Connect a USB hub to one of the USB ports on the board, then connect a keyboard and mouse to the hub.

3. Boot and Log In * Power down board * Set MSEL dipswitch S1 on SOM to ASX4 (QSPI): ON-ON * Power up the board * Wait for Linux to boot, use root as user name, and no password wil be requested.

alt text

4. Run Sanity Check

  • Once logged in, run the built-in DP sanity script to verify the display pipeline:

cd alteraFPGA
./dp_sanity.sh
alt text

5. Expected Result * After a successful boot and login you should see the Weston desktop on the connected monitor:

alt text

![alt text]images/image-3.png)

h7>6. Advanced Run modetest

  • modetest requires exclusive DRM master access. Stop Weston first, run your tests, then restart Weston:
# Stop Weston (releases DRM master)
systemctl stop weston-drm.service

# Query all DRM objects (connectors, CRTCs, planes, formats)
modetest -M altera-vvp-dp

# Display colour-bar test pattern at 1920x1080@60
modetest -M altera-vvp-dp -s 37:1920x1080

alt text

# Same, with vsync (verifies vblank interrupt)
modetest -M altera-vvp-dp -s 37:1920x1080 -v

# Restart Weston when done
systemctl start weston-drm.service

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