AWS FPGA: Programmer’s View of the Custom Logic#

This document describes how an application running in Linux userspace could interface with FPGA Custom Logic (CL) during runtime.

Working with an AWS FPGA requires two components: Management and Runtime. The figure below provides an overview of these components and their relationship to the underlying FPGA hardware.

AWS FPGA Software Overview

AWS FPGA Software Overview#

Management: Management Physical Function Interface#

This interface is used for loading/clearing an AFI, checking AFI status, debugging the AFI, and controlling emulated LEDs and emulated DIP switches. The management interface can be used in one or more of the following ways, concurrently or independently:

[A] Linux Shell Commands Run the FPGA Management Tools#

  • The FPGA management tools expose the C library via a series of CLI commands after sourcing the SDK setup.

[B] C/C++ Application Compiled with the FPGA Management C Library#

  • By integrating the FPGA management C library into their applications, developers can achieve native support for actions like FPGA image describes, loads, and clears.

Runtime: Application Physical Function Interface#

This interface is used for reading from and writing to the Custom Logic, handling interrupts, and performing DMA. It is provided through:

[C] Userspace Interrupt/Event Notification#

  • Uses standard POSIX APIs (such as open() and poll()) for use in any C/C++ application.

[D] Standard DMA Operations#

  • A DMA Interface using standard POSIX API like open()/read()/write() to be used in any C/C++ application for data transfer using DMA.

[E] FPGA PCIe Lib#

  • A C library for accessing FPGA memory space through the AppPF PCIe BARs from Linux userspace (e.g., for register access or message passing). This library can be compiled and linked with C/C++ applications.

[F] Xilinx Runtime (XRT) Support for AWS Vitis Applications#

  • The XRT communicates with the AWS management interface via aws_dev.

  • Links with OpenCL runtime application, such as those generated by Xilinx Vitis.

[G] DMA Kernel Driver#

Back to Home