ALPHA DATA ADM-VA601 Software Development Kit
Introduction
This application note provides instructions for creating, modifying, and deploying a Versal ACAP image for the ADM-VA601, including all necessary features for programming and booting from Avalanche’s space-grade P-SRAM (MRAM) QSPI configuration memory. The package includes all required software components to build this image.
Hardware Requirements
- ADK-VA601 kit
- ADM-VA601-FL3 Daughter board with Avalanche QSPI P-SRAM™ (MRAM)
- VITA46 Backplane
- Host PC with Vitis Unified IDE 2022.2 installed
- Micro SD card reader and micro SD card
- USB-Serial cable with DSUB9 connector
Software Tools
The FPGA project requires Vivado 2022.2, running on either Windows or Linux. See https://www.xilinx.com/support/documentation-navigation/design-hubs/dh0013-vivado-installation-and-licensing-hub.html for more details about supported operating systems. Building a bootable Linux image requires PetaLinux 2022.2 and a compatible Linux operating system. See https://docs.xilinx.com/r/en-US/ug1144-PetaLinux-tools-reference-guide/Overview for more details aboutsupported operating systems.
Package Structure
Creating the Hardware Platform in Vivado
The Vivado project includes a block design featuring CIPS and NoC IPs, the fundamental building blocks that enable the processing system (PS) to run applications. The NoC configuration provides access to PS peripherals, the PL, and DDR4 SDRAM memory, allowing PetaLinux to operate within its own memory space.
To generate the Vivado project you can use the Makefiles included in the package, assuming a Linux-based OS is used. Open a bash shell in Linux and enter the following commands:
export XILINX_TOOLS_VERSION=2022.2
source $(XILINX_LOC)/Vivado/$(XILINX_TOOLS_VERSION)/settings64.sh
{pkg_root}/fpga/proj:$ make
Note:
Alternavely, if you run make from the package root folder, all the other output products for Vitis and Petalinux will be generated after the .xsa file is obtained.
The created Vivado project can later be modified by opening it in Vivado’s GUI. Below is an example of the block diagram as it appears in Vivado’s IPI:
The project can also be generated by running the script in Vivado’s GUI. For that, open Vivado and select the following option from the main menu:
Tools -> Run Tcl script…
In the file selection dialog box that appears, navigate to {pkg_root}/fpga/proj/ps-test-va601-ava.tcl. This script will generate the block diagram, execute the build steps to create the device image, and export the platform’s XSA file (ps-test-va601-ava.vitis/ps-test-va601-ava.xsa) for use in Vitis/PetaLinux. In addition to the CIPS IP configurations required to enable platform compatibility with the ADM-VA601 board, the script pre-populates the QSPI settings to work with the ADM-VA601-FL3 module, which is fitted with the
Avalanche QSPI configuration memory. The provided script for generating the project (ps-test-va601-ava.tcl) performs the following actions, which are also outlined below for manual execution by the user:
- Run Vivado, and open the project
- Select “Boot Mode”
- Select “QSPI” as a Boot/Storage
- Select “Dual Parallel” as QSPI Mode
- Select “x4” as Data Mode
- Enter “80” for Requested QSPI Reference Clock Frequency (MHz)
MRAM QSPI Interface Frequency (MHz) = QSPI Reference Clock Frequency (MHz)/2
Modifying Existing QSPI Driver and PLM (Platform Loader and Manager)
To enable the Versal ACAP’s PLM (Platform Loader and Manager, or First Stage Bootloader) to detect and operate the Avalanche QSPI configuration memory, custom PLM firmware is required. This firmware must include bare-metal drivers patched with the new source code for the Avalanche component. To achieve this, we will create a Vitis platform using the hardware platform exported in the previous step (.xsa). This platform will contain only the Platform Loader and Manager (PLM) and can be created from a template in Vitis.
In Linux, open a bash shell and run make:
source $(XILINX_LOC)/Vivado/$(XILINX_TOOLS_VERSION)/settings64.sh{pkg_root}/sw/vitis:$ make
Note:
make regenerates the .xsa file only from the root folder. If the Vivado hardware platform has been updated, run make from the root or Vivado folder first. Ensure the environment setup script is sourced, then run: export XILINX_TOOLS_VERSION=2022.2
This will create a new PLM firmware and patch the bare-metal drivers in the BSP. For more information on how to create the PLM, visit this link: https://xilinx.github.io/Embedded-DesignTutorials/docs/2021.2/build/html/docs/Introduction/Versal-EDT/docs/A-creating-plm.html
The user can manually create this PLM project using the Vitis GUI or by running the following command in the XSCT console view (also accessible in the GUI): app create -name ${app_name} -hw ${xsa_path} -proc versal_cips_0_pspmc_0_psv_pmc_0-os standalone -template “versal PLM”
Where:
app_name = ps-test-va601-ava-plm
xsa_path = path to .xsa file (normally under {pkg_root}/fpga/proj/prj_name/prj_name.vitis)
The bare-metal drivers that are patched are in the files xloader.c and xloader.h, where Avalanche’s IDs get added to the the driver source code. These changes are indicated in the figures below:
Creating the Petalinux Image
The package provides scripts to create a PetaLinux image from the Vivado hardware platform, as usual. However, additional steps are required for the PetaLinux image to work with the Avalanche QSPI configuration memory:
- Define the QSPI configuration memory partitions.
- Update U-Boot (secondary bootloader) to include the Avalanche device ID.
- Update the Linux kernel to include the Avalanche device ID.
- Replace the PLM generated by PetaLinux with the modified PLM created in Vitis in the previous step.
To generate the Petalinux image with from the previously generated hardware platform (.xsa) and patched PLM (plm.elf), open a bash shell in Linux and run make from the specified path: {pkg_root}/sw/petalinux:$ make
Note:
Note that make will regenerate the .xsa and .elf files only when run from the package root folder. If updates are made to the Vivado hardware platform or Vitis PLM, run make from the root or respective folders first. Ensure the environment setup script is sourced, then run: export XILINX_TOOLS_VERSION=2022.2
Steps to create the Petalinux image (manually)
- Source the Petalinux enviroment: source $(PETALINUX)/$(XILINX_TOOLS_VERSION)/settings.sh
- Create the Petalinux project with the standard BSP settings for Versal: petalinux-create -t project –template versal -n $(PRJ_DIR)
- Change BSP settings for our custom platform: petalinux-config –get-hw-description=$(XSA_ORIG) –silentconfig
- Apply the specific device tree for the ADM-VA601:
cp pkg_root/sw/petalinux/device-tree/system-user.dtsi project-spec/meta-user/recip
es-bsp/device-tree/files/system-user.dtsi - Apply Avalanche’s patches to U-boot:
cp patches/u-boot/*.bbappend project-spec/meta-user/recipes-bsp/u-boot/u-boot-xlnx _%.bbappend
cp patches/u-boot/*.patch project-spec/meta-user/recipes-bsp/u-boot/files/ava_u-bo ot_2022.2.patch - Apply Avalanche’s patches to Linux Kernel:
cp patches/kernel/*.bbappend project-spec/meta-user/recipes-kernel/linux/linux-xln x_%.bbappend
cp patches/kernel/*.patch project-spec/meta-user/recipes-kernel/linux/linux-xlnx/a
va_kernel_2022.2_p1.patch
cp patches/kernel/*.patch project-spec/meta-user/recipes-kernel/linux/linux-xlnx/a
va_kernel_2022.2_p2.patch - Build the Petalinux image: petalinux-build –> build Petalinux image
- Package BOOT.BIN in the Petalinux image with the patched PLM: petalinux-package –boot –u-boot –plm $(ELF_ORIG) –force
Programming and booting from QSPI configuration memory
- Copy the provided PetaLinux image files to an SD card. These are the following:
- BOOT.BIN
- image.ub
- boot.scr
- Insert the micro-SD into the uSD socket.
- Insert the ADM-VA600-FL3 into the top side of the VA601 (image for representation, FL3 module may differ).
- Connect the USB-Serial converter cable to the UART port on the RTM.
- Set the SW2 position in microSD boot mode.
Mode Switch SW2 [4:1]: OFF, OFF, OFF, ON - Open a terminal on the USB-Serial port with the following configuration: 115200bps, 8bits, No parity, 1bit Stop, Flow Control OFF
- Power on the ADM-VA601. U-Boot and Kernel will load:
Uboot verification command: sf probe 0 0 0 Avalance device details will be displayed. Kernel verification command: mtdinfo configuration memory partitions will be displayed. - Copy the files in SD card to memory using the following commands.
cd /run/media/mmcblk0p1
flashcp BOOT.BIN /dev/mtd0
flashcp image.ub /dev/mtd1
flashcp boot.scr /dev/mtd2 - Power off the ADM-VA601.
- Enable QSPI boot mode by changing SW2 switches positions: Mode Switch SW2 [4:1]–>ON, ON, OFF, ON
- Power on the ADM-VA601 and the system should boot from memory.
Contact
- Address: Suite L4A, 160 Dundee Street,
- Edinburgh, EH11 1DQ, UK
- Telephone: +44 131 558 2600
- Fax: +44 131 558 2700
- email: sales@alpha-data.com
- Website: http://www.alpha-data.com
- Address: 10822 West Toller Drive, Suite 250
- Littleton, CO 80127
- Telephone: (303) 954 8768
- Fax: (866) 820 9956 – toll-free
- email: sales@alpha-data.com
- Website: http://www.alpha-data.com
FAQ
- Q: What software tools are required for the ADM-VA601 Software Development Kit?
- A: Vivado 2022.2 and PetaLinux 2022.2 are required for the FPGA and Linux image projects, respectively.
- Q: Can I modify the Vivado project after generation?
- A: Yes, the Vivado project can be modified using Vivado’s GUI.
Documents / Resources
![]() |
ALPHA DATA ADM-VA601 Software Development Kit [pdf] User Guide ADM-VA601 Software Development Kit, ADM-VA601, Software Development Kit, Development Kit |