MIT License

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

FPGA Drive AXI-MM PCIE 项目深度分析

项目背景与痛点

FPGA(Field-Programmable Gate Array)由于其灵活的硬件定制能力,在高性能计算、信号处理和网络通信等领域有着广泛的应用。然而,想要充分发挥 FPGA 的潜能,并不是一件容易的事。特别是在与 CPU 交互方面,PCIE(Peripheral Component Interconnect Express)接口提供了高速的数据传输通道,但仍存在编程接口复杂、难以适配不同应用场景等问题。FPGA Drive AXI-MM PCIE 项目正是在这种背景下诞生的,它旨在简化 FPGA 与外部系统的交互,通过提供一系列示例设计,降低了开发者在这一领域的技术门槛。

核心技术揭秘

该项目的核心价值在于提供了一套高度模块化的 FPGA 设计框架,针对 AXI (Advanced eXtensible Interface) 和 PCIE 协议,借助 FPGA Drive FMC (FPGA Mezzanine Card) 模块,实现高效的数据处理和传输。以下通过一张 Mermaid 图来展示其架构设计。

graph TD subgraph "FPGA模块" A[AXI-MM控制器] --> B("FMC接口") end subgraph "外部系统" C[PCIE控制器] --> D[内存映射] end B --->|"PCIE接口"| C B -.->|"中断信号"| D D --->|"DMA传输"| A

AXI-MM 控制器负责处理 FPGA 内部的高速数据传输,它与 FMC 接口连接,通过 PCIE 接口与外部系统的 PCIE 控制器进行通信,进一步与内存映射单元对接,实现数据的高效传输。此外,中断信号机制确保了中断请求能够及时被外部系统捕获,而 DMA (Direct Memory Access) 传输则在内存映射和 FPGA 内部数据间搭建了高效通道。

功能亮点与差异

该项目的独特之处在于其高度可定制性和灵活性。一方面,AXI-MM 接口提供了强大的数据传输能力,使得 FPGA 能够直接访问外部内存,从而实现数据的高效处理。另一方面,PCIE 接口规范允许 FPGA 连接到广泛的计算平台,并且通过易于理解的示例设计文件,许多开发过程被简化,使得用户可以快速上手。此外,该项目提供的中断信号和 DMA 支持功能无疑增强了 FPGA 与外部系统的交互能力。

应用场景与落地建议

在高性能计算领域,如数据中心、网络传输和人工智能加速中,本项目尤其适用。由于 PCIE 接口提供的是高速数据传输通道,这意味着项目适用于需要大量数据交换的应用场景。需要注意的是,开发者在实际部署过程中,必须仔细配置 FPGA 和 PCIE 控制器之间的映射关系,以确保最佳性能。此外,建议对 DMA 传输机制进行详细理解,以避免潜在的数据传输瓶颈。

综合评价

FPGA Drive AXI-MM PCIE 项目的优势在于其成熟的设计框架和高效的数据处理能力,通过提供一系列示例设计,极大地简化了 FPGA 与外部系统的交互复杂度。同时,项目也具有较高的灵活性和可定制性,适合广泛的高性能计算应用场景。不足之处在于,部分外部系统具体的配置细节可能仍需用户自行探索,对初学者的友好性稍有欠缺。

总的来说,该项目对于有经验的 FPGA 开发者而言,是一个值得推荐的工具集。

简要分析

热度分
562
价值分
220
活跃状态
活跃
暂无主题

语言占比

Batchfile
BitBake
C
GDB
Jupyter Notebook
Makefile
Python
Shell
Tcl

README

FPGA Drive FMC Reference Designs

Description

This repository provides example designs for connecting NVMe SSDs and other M.2 M-key modules to various FPGA, MPSoC, and ACAP evaluation boards. These designs are compatible with both standalone and PetaLinux environments, and all scripts and code are provided for building these environments. The interface between the evaluation board and M.2 modules is facilitated by Opsero’s FPGA Drive FMC Gen4 (OP063) and M.2 M-key Stack FMC (OP073) mezzanine cards, either of which can be used with these designs.

FPGA Drive FMC Gen4 M.2 M-key Stack FMC
FPGA Drive FMC Gen4 M.2 M-key Stack FMC

Important links:

Requirements

This project is designed for version 2025.2 of the Xilinx tools (Vivado/Vitis/PetaLinux). If you are using an older version of the Xilinx tools, then refer to the release tags to find the version of this repository that matches your version of the tools.

In order to test this design on hardware, you will need the following:

Target designs

This repo contains several designs that target various supported development boards and their FMC connectors. The table below lists the target design name, the M2 ports supported by the design and the FMC connector on which to connect the mezzanine card. Some of the target designs require a license to generate a bitstream with the AMD Xilinx tools.

FPGA designs

Target board Target design M2 Slot 1
PCIe Lanes
M2 Slot 2
PCIe Lanes
FMC Slot Standalone PetaLinux Yocto Vivado
Edition
IP
License
KC705 kc705_hpc 4 - HPC :white_check_mark: :x: :x: Enterprise -
KC705 kc705_lpc 1 - LPC :white_check_mark: :x: :x: Enterprise -
KCU105 kcu105_hpc 4 4 HPC :white_check_mark: :x: :x: Enterprise -
KCU105 kcu105_lpc 1 - LPC :white_check_mark: :x: :x: Enterprise -
VC707 vc707_hpc1 4 - HPC1 :white_check_mark: :x: :x: Enterprise -
VC707 vc707_hpc2 4 - HPC2 :white_check_mark: :x: :x: Enterprise -
VC709 vc709_hpc 4 - HPC :white_check_mark: :x: :x: Enterprise -
VCU118 vcu118 4 4 FMCP :white_check_mark: :x: :x: Enterprise -

Zynq-7000 designs

Target board Target design M2 Slot 1
PCIe Lanes
M2 Slot 2
PCIe Lanes
FMC Slot Standalone PetaLinux Yocto Vivado
Edition
IP
License
PicoZed 7015 pz_7015 1 - LPC :white_check_mark: :white_check_mark: :white_check_mark: Standard :free: -
PicoZed 7030 pz_7030 1 - LPC :white_check_mark: :white_check_mark: :white_check_mark: Standard :free: -
ZC706 zc706_hpc 4 - HPC :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
ZC706 zc706_lpc 1 - LPC :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -

Zynq UltraScale+ designs

Target board Target design M2 Slot 1
PCIe Lanes
M2 Slot 2
PCIe Lanes
FMC Slot Standalone PetaLinux Yocto Vivado
Edition
IP
License
UltraZed-EV Carrier uzev 4 4 HPC :white_check_mark: :white_check_mark: :white_check_mark: Standard :free: -
ZCU104 zcu104 1 - LPC :white_check_mark: :white_check_mark: :white_check_mark: Standard :free: -
ZCU106 zcu106_hpc0 4 4 HPC0 :white_check_mark: :white_check_mark: :white_check_mark: Standard :free: -
ZCU106 zcu106_hpc1 1 - HPC1 :white_check_mark: :white_check_mark: :white_check_mark: Standard :free: -
ZCU111 zcu111 4 4 FMCP :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
ZCU208 zcu208 4 4 FMCP :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
ZCU216 zcu216 4 4 FMCP :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -

Versal designs

Target board Target design M2 Slot 1
PCIe Lanes
M2 Slot 2
PCIe Lanes
FMC Slot Standalone PetaLinux Yocto Vivado
Edition
IP
License
VCK190 vck190_fmcp1 4 4 FMCP1 :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
VCK190 vck190_fmcp2 4 4 FMCP2 :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
VHK158 vhk158 4 - FMCP :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
VMK180 vmk180_fmcp1 4 4 FMCP1 :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
VMK180 vmk180_fmcp2 4 4 FMCP2 :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
VEK280 vek280 4 4 FMCP :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
VPK120 vpk120 4 - FMCP :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -
VPK180 vpk180 4 - FMCP :white_check_mark: :white_check_mark: :white_check_mark: Enterprise -

Notes:

  1. The Vivado Edition column indicates which designs are supported by the Vivado Standard Edition, the FREE edition which can be used without a license. Vivado Enterprise Edition requires a license however a 30-day evaluation license is available from the AMD Xilinx Licensing site.
  2. The VPK120, VPK180 and VHK158 have enough GTs to interface with both M.2 slots, however they have only 2 integrated PCIe blocks one of which is on the opposite side of the device with respect to the relevant GT quads, making routing a challenge. For this reason these designs supports only 1x M.2 slot.

Software

These reference designs can be driven by a standalone (bare-metal) application or from within an embedded Linux environment. The repository includes all the scripts and code needed to build either one.

For Linux, two build flows are provided, both based on AMD’s 2025.2 tools:

  • PetaLinux — AMD’s long-standing embedded Linux build tool (see the PetaLinux/ directory).
  • Yocto / EDF — AMD’s Embedded Development Framework, the announced successor to PetaLinux, built with the gen-machineconf parse-sdt flow (see the Yocto/ directory).

[!IMPORTANT] The PetaLinux flow is being retired for this repository. Version 2025.2 is the last tool release for which we will support PetaLinux; from the next tool version onward, Linux images will be built with the Yocto / EDF flow only. New work should use the Yocto flow.

For 2025.2, both flows produce an equivalent Linux image with the same applications, so you can pick whichever fits your workflow. The target design tables show which boards are supported by each flow.

Environment Build flow Available applications
Standalone Vitis PCIe enumeration test
Linux PetaLinux / Yocto Built-in Linux commands
Additional tools: nvme-cli, pciutils (lspci), mke2fs, mkfs, mount, blkid, fdisk
Versal: SSD speed-test scripts

The standalone application reports on the status of the PCIe link and performs enumeration of the detected PCIe end-points (i.e. the M.2 modules). Under Linux, those same M.2 SSDs come up as NVMe block devices that you can partition, format and test with the bundled tools. The Yocto images also bring up the board’s Ethernet port (DHCP, SSH server). The user guide describes the hardware design of each device family (with block diagrams), and how to boot, log in and test the SSDs, including the link speeds and throughput to expect.

Build instructions

Clone the repo and change into its directory:

git clone --recursive https://github.com/fpgadeveloper/fpga-drive-aximm-pcie.git
cd fpga-drive-aximm-pcie

Cross-platform build runner

All builds are driven by build.py at the repo root, on both Windows (git bash) and Linux. The build.sh / build.bat shim finds a suitable Python 3 automatically (including the one bundled with the AMD tools). Pick a target design label from the tables above (or run ./build.sh list), then run the build command for the stage(s) you want — each command builds whatever it depends on automatically and skips anything already built. On Windows without git bash, run the same commands from Command Prompt or PowerShell using build.bat (e.g. build.bat xsa --target <target>).

You don’t need to source the AMD tools first — the build runner finds Vivado, Vitis and PetaLinux automatically in their standard install locations and sets up the environment each stage needs. If your tools are installed somewhere non-standard and the runner can’t find them, source the tool settings yourself before running the build.

Build the Vivado project (bitstream + XSA)
./build.sh xsa --target <target>
Build the standalone application

Builds the Vitis workspace and the baremetal boot file (BOOT.BIN or bit file, depending on the device family):

./build.sh standalone --target <target>
Build PetaLinux (Linux only)
./build.sh petalinux --target <target>

Note: this release supports both PetaLinux and Yocto; PetaLinux will be dropped in favor of the Yocto flow at the next version update.

Build Yocto (Linux only)
./build.sh yocto --target <target>
Build everything

Builds all of the above that the target supports, then gathers the boot images into bootimages/*.zip:

./build.sh all --target <target>
./build.sh all --target all          # every target in the repo

Also available: status, clean, project — see ./build.sh --help. On Windows, the PetaLinux and Yocto stages require a Linux machine; the runner says so and prints the hand-off command. The legacy make interface still works on Linux (each Makefile now wraps build.sh) but is deprecated and will be removed at the next version update.

Contribute

We strongly encourage community contribution to these projects. Please make a pull request if you would like to share your work:

  • if you’ve spotted and fixed any issues
  • if you’ve added designs for other target platforms
  • if you’ve added software support for other devices

Thank you to everyone who supports us!

About us

Opsero Inc. is a team of FPGA developers delivering FPGA products and design services to start-ups and tech companies. Follow our blog, FPGA Developer, for news, tutorials and updates on the awesome projects we work on.

评论

暂无评论