aws-fpga-f2-vitis-to-afi-poc

A proof-of-concept repository that helps FPGA software engineers bridge an AMD/Xilinx Vitis HLS RTL export into an AWS EC2 FPGA F2 HDK Customer Logic (CL) project, which can then be packaged into an AFI using the standard AWS flow.

Note: Despite the repository name, this repo generates an AWS F2 HDK CL project from a Vitis HLS RTL export.
AFI creation is performed using the standard AWS HDK CL → DCP → AFI flow.

Contents

Overview

This repository provides a lightweight, opinionated bridge from Vitis HLS RTL export to a buildable AWS EC2 F2 HDK CL project. Once generated, you can proceed with the standard AWS tooling to produce an AFI via CL → DCP → AFI.

Status note (as of 2025-12-25): AWS F2 Vitis documentation indicates that Vitis-based AFI generation is not supported on F2 instances. Please verify the latest status in the AWS docs:
https://awsdocs-fpga-f2.readthedocs-hosted.com/latest/vitis/README.html

What this repo does

Given a Vitis HLS synthesis/export output directory, the generator automates the following:

  1. Create a new CL project using AWS FPGA HDK tooling/templates.
  2. Import HLS outputs into the project (RTL plus required collateral).
  3. Validate the HLS top-level interfaces in the generated CL:
    • Requires exactly one s_axilite control interface
    • Allows zero or one m_axi memory-mapped master interface
    • Rejects designs with multiple s_axilite and/or multiple m_axi
  4. Patch the CL template sources to integrate the HLS RTL top module into the AWS CL wrapper.
  5. If m_axi is present, include DDR crossbar in the CL project.
  6. Update CL build scripts so all imported RTL sources are picked up during synthesis/implementation.
  7. Print next-step commands to run the AWS flow for CL → DCP → AFI.

What this repo does not do

Expected inputs and outputs

Input

Output

Repository Contents

Platform

Tested environments

This workflow has two stages with different environment requirements:

A) Vitis HLS (RTL export stage)

B) AWS F2 HDK (CL build + DCP/AFI stage)

Note: The generator can run anywhere, but building DCP/AFI requires an AWS HDK-capable environment (recommended: AWS FPGA Developer AMI).

AWS Shell interface notes (F2)

For authoritative and up-to-date details, refer to the AWS Shell Interface Specification:
https://awsdocs-fpga-f2.readthedocs-hosted.com/latest/hdk/docs/AWS-Shell-Interface-Specification.html

High-Level Integration Flow

  1. Develop the kernel in Vitis HLS
  2. Export RTL from Vitis HLS
  3. Run the generator to integrate RTL into an AWS FPGA CL project
  4. Build the CL and generate a DCP
  5. Package the DCP into an AFI
  6. Deploy and validate on an AWS EC2 FPGA F2 instance

Quickstart and Tutorial

For a step-by-step walkthrough, see:

Project Disclaimer

Maintainer Disclaimer

This repository is maintained as a portfolio-quality proof of concept focused on cloud FPGA acceleration workflows, CL/shell integration, and build automation around AWS EC2 F2.

For collaboration or opportunities related to FPGA acceleration and systems-level tooling, please reach out via:

Third-Party Code and Licenses

Repository license (original work)

Unless otherwise indicated in a file’s header or accompanying notices, all original source code authored by this repository’s owner is licensed under the Apache License 2.0 (see LICENSE.md).

Third-party materials (AWS FPGA HDK and others)

This repository includes third-party materials, including files copied from and/or modified from the AWS FPGA Hardware Development Kit (HDK). Such files retain their original copyright and license notices and are licensed under the license identified in the relevant file headers and/or accompanying notice files.

AWS-provided/AWS-derived files may be licensed under the Amazon Software License (see LICENSES/Amazon-Software-License.txt). The Amazon Software License is not the Apache License 2.0; it contains a use limitation and other terms that govern use of the AWS-provided/AWS-derived files. In the event of any conflict, the applicable third-party license terms control.