How-to Rebuild an AVED Design for Yourself¶
This is a getting-started guide for the AMD Alveo Versal™ Example Design (AVED) to be used with the provided AVED source code on GitHub. The source code comprises a hardware design, firmware library, and a host operating system driver and utility application. This guide details downloading the appropriate source code for your card and rebuilding the complete design. After running through these steps, you will have created a PDI that can be installed on your system.
Before You Begin¶
Build Dependencies¶
IP
Download SMBus IP from https://www.xilinx.com/member/v80.html
Tools
Use the AMD Vivado™ version associated with the AVED release
Python 3.6.8 or later.
Cmake 3.5.0 or later.
System Memory Requirements
64GB
Hardware Test Dependencies¶
The Example Design has been tested with the operating systems in the following table. AVED may work with other versions of these operating systems, but they have not been tested. All supported operating systems are tested with general access versions (GA). Ubuntu Hardware Enablement (HWE) is not supported. By default, HWE is disabled by Ubuntu Server versions and enabled by desktop versions.
Operating System | Architecture | Supported Versions | Kernel-Version |
---|---|---|---|
Ubuntu | x86_64 | 22.04 | 5.4.0 5.15.0 |
RHEL | x86_64 | 8.3 | 4.18.0 |
Note: root/sudo permissions are required.
Install Python from python.org¶
To install Python, navigate to: https://www.python.org/downloads/. Locate and install the latest Python 3.6.8 or newer for your operating system.
Download the Source Code¶
Get the latest AVED installation package for your Alveo card.
Refer to the AVED release table to find the latest example design version. The AVED Git Release Tag will direct you to the tagged source code in GitHub. The AVED Deployment Archive is a zipped AVED installation package; it is pre-built from the tagged source code using the Vivado tool version noted in the table.
Clone the latest tagged AVED source code repository that applies to your Alveo card. Confirm that you cloned the repository to a development server with sufficient system memory to build AVED, either locally on the server or remotely through LSF.
Make a note of the listed Vivado tool version used to build this source code, as AVED has been verified to build with this tool version. You will use the same Vivado version to build AVED.
In this example, we will clone the AVED repo with the tag “amd_v80_gen5x8_24.1_20240926” (which has been verified with Vivado 2024.1) and we will build the AVED design for the V80 card. The high-level directory structure will look similar to the following:
AVED
├── deploy
│ └── scripts
├── fw
│ └── AMC
├── hw
│ ├── amd_v80_gen5x8_24.1
│ └── hw_version.json
└── sw
└── AMI
Get SMBus IP¶
Download SMBus IP from https://www.xilinx.com/member/v80.html. Copy the IP into the AVED hardware design as noted by an asterisk in the directory tree below. This step is required before building the design.
AVED
└── hw
└── amd_v80_gen5x8_24.1
└── src
└── iprepo
├── cmd_queue_v2_0
├── hw_discovery_v1_0
├── shell_utils_uuid_rom_v2_0
└── smbus_v1_1*
Build the Design¶
Hardware¶
The following steps will guide you through setting up your Vivado environment and building an AVED V80 PDI from the cloned source code.
Set up the desired version of Vivado in your environment by sourcing the
settings64.(c)sh
script from your Vivado install directory.# for csh $ source settings64.csh # for bash $ source settings64.sh
Navigate to the hardware directory for the V80 board. Run the
build_all.sh
script to build the AVED hardware and AMC firmware.
For more information on the build script, refer to AVED Build Scripts.
# To build V80 hardware and firmware
$ cd <aved>/hw/amd_v80_gen5x8_24.1
$ ./build_all.sh
To confirm that the build completed successfully, review the generated output and verify that the required output files from each build step are present as indicated in the next section.
Software¶
The following steps will guide you through building the AMI software from the cloned source code.
On your development server, navigate to the AMI directory in <AVED cloned repo>/sw/AMI/.
Run scripts/gen_package.py, which will build the software and package it. After successfully building, the software package will be in <AVED>/sw/AMI/output/<timestamp>. Copy this to your deployment server.
On your deployment server, install the AMI package..
# development server
$ cd <AVED>/sw/AMI
$ python3 scripts/gen_package.py
# deployment server
$ sudo apt install <path/to/ami_xxx.deb>
Review the Generated Output¶
By default, the build_all.sh
script creates a build directory within the AVED hardware design directory (e.g. <AVED>/hw/amd_v80_gen5x8_24.1/build/). This output directory is where the hardware build takes place. After the script successfully
completes, review your output directory to confirm it looks like the following.
<AVED>/hw/amd_v80_gen5x8_24.1/
├── amd_v80_gen5x8_24.1.pdi*
├── build/
│ ├── amc.elf*
│ ├── amd_v80_gen5x8_24.1_nofpt.pdi*
│ ├── amd_v80_gen5x8_24.1.xsa*
│ ├── bd_gen/
│ ├── fpt.bin
│ ├── prj.cache/
│ ├── prj.gen/
│ ├── prj.hw/
│ ├── prj.ip_user_files
│ ├── prj.runs/
│ ├── prj.srcs/
│ ├── prj.xpr
│ └── vivado.log
├── build_all.sh
├── fpt/
├── scripts/
└── src/
Important Note: Generated files followed by a '*' are required files created by each step in the build flow, which can be used as an indication that the build has completed successfully. Verify that these files exist after building the design.
The build directory contains the Vivado project. You should open this project (with the following command) to explore the Vivado Block Design for this build.
$ vivado <AVED>/hw/amd_v80_gen5x8_24.1/build/prj.xpr &
After the Vivado IDE launches with the specified project, find IP INTEGRATOR in the Flow Navigator pane, and click on “Open Block Design”.
Cross reference this Vivado design with the AVED Hardware Design documentation to get a better understanding of the the AVED design.
Next, we will explore using the generated design PDI, <aved>/hw/amd_v80_gen5x8_24.1/build/amd_v80_gen5x8_24.1_nofpt.pdi, to gain familiarity with the process of updating the flash using the AMI cfgmem commands.
Programming and Testing the Design¶
In this section, you will use the AMI cfgmem_program command to program your new design PDI to flash. As a prerequisite, review AVED - Device Programming and complete the steps on How-to install and run a pre-built AVED design on an ALVEO card to verify your deployment server and Alveo card are properly set up, and note the card BDF which you will use to program the PDI.
To program the PDI to flash, your deployment server will need access to the new design PDI. You will use the AMI cfgmem_program command, specifying the card BDF, path to the design PDI, and which flash partition to program. In this example, the BDF
is c1:00.0 and the PDI will be programmed to flash partition 0. Successful programming is indicated by the message “OK. Image has been programmed successfully.
” A hot reset is automatically performed to boot the updated design in partition 0. The
incoming UUID may be reported as “N/A” if no UUID metadata is provided with the PDI. This is normal behavior and does not affect the programming.
# usage: sudo ami_tool cfgmem_program -d <bdf> -t <type> -i <pdi path> -p <flash partition number>
$ sudo ami_tool cfgmem_program -d c1:00.0 -t primary -i /home/builds/latest/amd_v80_gen5x8_24.1_nofpt.pdi -p 0
----------------------------------------------
Device | 21:00.0
----------------------------------------------
Current Configuration
----------------------------------------------
UUID | 4b85bf2b90fbe3b9ed912f24e2c3ede6
----------------------------------------------
Incoming Configuration
----------------------------------------------
UUID | 51074aa2b75b033b2ec36570094bff92
Path | /home/builds/latest/amd_v80_gen5x8_24.1_nofpt.pdi
Partition | 0
----------------------------------------------
Are you sure you wish to proceed? [Y/n]: Y
Updating base flash image...
[####################################################################################################] 100% |
Image programming complete.
Will do a hot reset to boot into partition 0. This may take a minute...
Next Steps¶
This getting started guide outlined the steps to download the AVED source code, build the AVED V80, and program the PDI using AMI. If you would like to explore other available hardware test commands, see:
For a deeper dive into the AVED hardware architecture, read the Hardware Design chapter and refer to AVED V80 - Source File Overview.
Page Revision: v. 60