• Stars
    star
    124
  • Rank 282,522 (Top 6 %)
  • Language
    Jupyter Notebook
  • License
    Other
  • Created almost 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

VNx: Vitis Network Examples

XUP Vitis Network Example (VNx)

This repository contains IP that you can use to add 100 Gbit/s networking to your Vitis designs. UDP is used as the transport protocol, and allows you to connect your Alveo card to other network equipment or Alveo cards.

Design examples are provided that show you how to integrate this IP into your Vitis design. One example shows you how to benchmark the network connection and the another shows you how to move data from the host to the network and vice versa.

The provided IP can be used with any Alveo shell that exposes the QSFP28 Gigabit Transceiver (GT) pins to the dynamic region, see supported platforms below. To find out more check out Designing a Transceiver-based Application with Vitis.

This repository provides:

  • Source code for the common network infrastructure with UDP support
  • Scripts to compile and link the kernels
  • Out-of-the-box applications that uses UDP as transport protocol (basic and benchmark)
  • pynq host code and helper functions
  • DASK integration for multiple FPGAs configuration and task scheduling

Clone this repository

Get everything you need by cloning the repository, recursively.

git clone https://github.com/Xilinx/xup_vitis_network_example.git --recursive

Common Infrastructure

This section provides a brief overview of the common infrastructure needed for the examples to work. The examples rely on the same underlying infrastructure, which is cmac and network_layer kernels.

NOTE: the reference clock frequency can change depending on the Alveo card.

CMAC kernel

The cmac_kernel contains an UltraScale+ Integrated 100G Ethernet Subsystem. This kernel is configured according to the INTERFACE, DEVICE, and PADDING_MODE arguments passed to make. It exposes two 512-bit AXI4-Stream interfaces (S_AXIS and M_AXIS) to the user logic, which run at the same frequency as the kernel, internally it has CDC (clock domain crossing) logic to convert from kernel clock to the 100G Ethernet Subsystem clock. It also provides and AXI4-Lite interface to check cmac statistics.

For more information check out Ethernet/README.md.

Network Layer kernel

The network layer kernel is a collection of HLS modules to provide basic network functionality. It exposes two 512-bit (with 16-bit TDEST) AXI4-Stream to the application, S_AXIS_sk2nl and M_AXIS_nl2sk.

The ARP table is readable from the host side, and the UDP table is configurable from the host as well. Helper functions to read and configure the tables are available in the class NetworkLayer Notebooks/vnx_utils.py.

The application communicates with the UDP module using S_AXIS_sk2nl and M_AXIS_nl2sk AXI4-Stream interfaces with the following structure:

struct my_axis_udp {
  ap_uint<512>    data;
  ap_uint< 64>    keep;
  ap_uint< 16>    dest;
  ap_uint<  1>    last;
}

In the Rx path, the network layer provides additional metadata in the user signal. To find out more about this kernel check out NetLayers/README.md

Examples

Basic

The following figure depicts the different kernels and their interconnection in the Vitis project for the basic example.

NOTE: the reference clock frequency can change depending on the Alveo card.

cmac and network layer kernels are explained in the section above. In this example the application is split into two kernels, memory mapped to stream (mm2s) and stream to memory mapped (s2mm).

  • mm2s: pulls data from global memory and converts it to a 512-bit stream. It chunks the data into 1408-Byte packets, meaning that last is asserted. It also asserts last when there is no more data to send. The dest is set according to the argument with the same name.

  • s2mm: gets payload from the UDP module and push the payload to global memory. dest and last are ignored in this module.

The current limitation of this application is that the size of the data must be multiple of 64-Byte to work properly.

Check out vnx-basic notebook to see how to run this example using pynq.

Benchmark

The following figure depicts the benchmark example design, which contains four benchmark kernels. Each benchmark kernel has two modules, traffic generator and collector.

NOTE: the reference clock frequency can change depending on the Alveo card.

Find out more information about the benchmark kernel in Benchmark_kernel/README.md

The following notebooks demonstrate how to use the benchmark example design to measure throughput and latency either point to point or with a switch connection between two Alveo cards.

Support

Tools

In order to implement this design you need Vitis 2021.1 or newer and associated XRT. Older version of the tools are discouraged and will not work.

Vitis XRT pynq Notes
2021.1 2.11.634 >=2.7 Apply Y2K22 patch, consider using a newer Vitis version
2021.2 2.12.427 >=3.0.1 Apply Y2K22 patch, consider using a newer Vitis version
2022.1 2.13.466 >=3.0.1
2022.2 2.14.354 >=3.0.1

To install pynq and JupyterLab follow the steps here.

Alveo Cards

Alveo Development Target Platform(s) Notes
U50 xilinx_u50_gen3x16_xdma_201920_3 Supported only until 2021.2
U50 xilinx_u50_gen3x16_xdma_5_202210_1
U55C xilinx_u55c_gen3x16_xdma_2_202110_1
U55C xilinx_u55c_gen3x16_xdma_3_202210_1
U200 xilinx_u200_gen3x16_xdma_1_202110_1
U250 xilinx_u250_gen3x16_xdma_3_1_202020_1 DFX two-stage platform
U250 xilinx_u250_gen3x16_xdma_4_1_202210_1 DFX two-stage platform
U280 xilinx_u280_xdma_201920_3 Supported only until 2021.2
U280 xilinx_u280_gen3x16_xdma_1_202211_1

Requirements

In order to generate this design you will need a valid UltraScale+ Integrated 100G Ethernet Subsystem license set up in Vivado.

You also need at least 32GB of RAM available for the implementation. Check Vivado memory requirements here.

Generate XCLBIN

To implement any of the examples run:

make all DEVICE=<full platform path> INTERFACE=<interface number> DESIGN=<design name>
  • DEVICE Alveo development target platform, see supported platforms
  • INTERFACE defines which physical interface is going to be use. 0, 1 or 3 are supported. When INTERFACE=3 the design will be replicated for each interface. Note that Alveo U50 only has one interface available (INTERFACE=0)
  • DESIGN only support the following strings basic and benchmark. If you use something different, an error will be reported
  • The basic configuration file is pulled from config_files folder and complete with userPostSysLinkOverlayTcl parameter before calling v++.
  • Ethernet/post_sys_link.tcl is automatically called from v++ after system link. It is used to connect the GT capable pins to the cmac kernel(s)
  • The XCLBIN will be generated in the folder <DESIGN>.intf_<INTERFACE>.<(short)DEVICE>

Repository structure

├── Basic_kernels
│   └── src
├── Benchmark_kernel
│   └── src
├── config_files
├── Ethernet
│   └── cmac
├── img
├── NetLayers
│   ├── 100G-fpga-network-stack-core
│   └── src
├── Notebooks
└── xrt_host_api
    ├── examples
    ├── include
  • Basic_kernels: this folder contains the code for the basic application (mm2s and s2mm)
  • Benchmark_kernel: this folder contains the benchmark application, which includes the collector, traffic generator and switch kernels
  • config_files: this folder contains the different configuration files for the different examples and flavors
  • Ethernet: this folder contains the logic to generate the cmac kernel for the different Alveo cards and interfaces
  • img: this folder contains images
  • NetLayers: this folder contains the logic to generate the network_layer kernel, using the submodule 100G-fpga-network-stack-core
  • Notebooks: this folder contains companion Jupyter notebooks to show how to run the different examples
  • xrt_host_api: C++ driver and examples

FAQ

How do I get support?

Open an issue with as much details as you can. Please, use the issue template and fill in the appropriate fields.

Alveo card connected to a 100G capable switch/NIC is not getting link.

This design does NOT support FEC neither auto-negotiation by default. Therefore, make sure that your network equipment has these capabilities disabled. Please, refer to your network equipment manual to accomplish this.

Partial steps to enable RS-FEC are provided here.

C/C++ host code support?

Python host code in combination with the pynq package and JupyterLab as well as DASK provide the right environment to demonstrate the capabilities of this project. ACCL developers contributed a C++ driver, please check the xrt_host_api folder. We welcome contributions to enhance this driver. Also, a minimalist C/C++ driver contributed from the community is available in the host_xrt branch, this code and branch is not longer maintained.

How Can I contribute?

Please, follow the contributing guidelines

Considerations

VXx IS NOT a Network Interface Card (NIC). VNx main goal is to provide networking offload to Vitis kernels, so these kernels can communicate from one Alveo card to another without spending CPU cycles and minimum communication latency.

If you are interested in a NIC design, please check out OpenNIC Platform

VNx was originally developed within Xilinx University Program to support compute intensive applications that need to scale out. It has now been open sourced by Xilinx as a community resource. VNx is not a Xilinx product and so does not have formal Xilinx support in place, GitHub issues is the best place to request support.

Licenses

Vitis Network Example (VNx) License BSD 3-Clause License

Ethernet/cmac License: BSD 3-Clause License

NetLayers/100G-fpga-network-stack-core License: BSD 3-Clause License


Copyright© 2022 Xilinx

More Repositories

1

PYNQ

Python Productivity for ZYNQ
Jupyter Notebook
1,894
star
2

Vitis-AI

Vitis AI is Xilinx’s development stack for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards.
Python
1,400
star
3

linux-xlnx

The official Linux kernel from Xilinx
C
1,205
star
4

brevitas

Brevitas: neural network quantization in PyTorch
Python
1,107
star
5

Vitis-Tutorials

Vitis In-Depth Tutorials
C
891
star
6

Vitis_Libraries

Vitis Libraries
C++
818
star
7

embeddedsw

Xilinx Embedded Software (embeddedsw) Development
HTML
766
star
8

finn

Dataflow compiler for QNN inference on FPGAs
Python
679
star
9

BNN-PYNQ

Quantized Neural Networks (QNNs) on PYNQ
Jupyter Notebook
652
star
10

u-boot-xlnx

The official Xilinx u-boot repository
C
531
star
11

XRT

Run Time for AIE and FPGA based platforms
C++
529
star
12

Vitis_Accel_Examples

Vitis_Accel_Examples
Makefile
467
star
13

Vitis-HLS-Introductory-Examples

C++
420
star
14

dma_ip_drivers

Xilinx QDMA IP Drivers
C
400
star
15

HLS

Vitis HLS LLVM source code and examples
375
star
16

Vitis-AI-Tutorials

354
star
17

PYNQ_Workshop

Jupyter Notebook
354
star
18

SDAccel_Examples

SDAccel Examples
C++
350
star
19

ml-suite

Getting Started with Xilinx ML Suite
Jupyter Notebook
334
star
20

CHaiDNN

HLS based Deep Neural Network Accelerator Library for Xilinx Ultrascale+ MPSoCs
C++
315
star
21

xfopencv

C++
313
star
22

XilinxTclStore

Xilinx Tcl Store
Tcl
310
star
23

mlir-aie

An MLIR-based toolchain for AMD AI Engine-enabled devices.
MLIR
257
star
24

RapidWright

Build Customized FPGA Implementations for Vivado
Java
248
star
25

QNN-MO-PYNQ

Jupyter Notebook
234
star
26

XilinxBoardStore

Python
224
star
27

libsystemctlm-soc

SystemC/TLM-2.0 Co-simulation framework
Verilog
200
star
28

qemu

Xilinx's fork of Quick EMUlator (QEMU) with improved support and modelling for the Xilinx platforms.
C
200
star
29

DPU-PYNQ

DPU on PYNQ
Tcl
189
star
30

device-tree-xlnx

Linux device tree generator for the Xilinx SDK (Vivado > 2014.1)
Tcl
181
star
31

PYNQ-ComputerVision

Computer Vision Overlays on Pynq
Jupyter Notebook
173
star
32

XilinxVirtualCable

Xilinx Virtual Cable (XVC) is a TCP/IP-based protocol that acts like a JTAG cable and provides a means to access and debug your FPGA or SoC design without using a physical cable.
C
172
star
33

finn-hlslib

Vitis HLS Library for FINN
C++
168
star
34

graffitist

Graph Transforms to Quantize and Retrain Deep Neural Nets in TensorFlow
Python
168
star
35

open-nic

AMD OpenNIC Project Overview
Shell
166
star
36

finn-examples

Dataflow QNN inference accelerator examples on FPGAs
Jupyter Notebook
163
star
37

SDSoC-Tutorials

SDSoCâ„¢ (Software-Defined System-On-Chip) Environment Tutorials
C++
142
star
38

xilinx-tiny-cnn

C++
140
star
39

FPGA_as_a_Service

Go
136
star
40

meta-xilinx

Collection of Yocto Project layers to enable AMD Xilinx products
C
123
star
41

Vitis-In-Depth-Tutorial

C++
113
star
42

systemctlm-cosim-demo

QEMU libsystemctlm-soc co-simulation demos.
C++
106
star
43

Vitis_Embedded_Platform_Source

Tcl
105
star
44

SDAccel-Tutorials

SDAccel Development Environment Tutorials
C++
101
star
45

nanotube

LLVM
101
star
46

RFNoC-HLS-NeuralNet

CMake
92
star
47

Embedded-Design-Tutorials

91
star
48

PYNQ-DL

Xilinx Deep Learning IP
VHDL
91
star
49

PYNQ-HelloWorld

This repository contains a "Hello World" introduction application to the Xilinx PYNQ framework.
Jupyter Notebook
90
star
50

LSTM-PYNQ

C++
86
star
51

Vivado-Design-Tutorials

Tcl
83
star
52

SDSoC_Examples

C++
82
star
53

Kria-PYNQ

PYNQ support and examples for Kria SOMs
Jupyter Notebook
82
star
54

meta-petalinux

meta-petalinux distro layer supporting Xilinx Tools
BitBake
82
star
55

kria-vitis-platforms

Kria KV260 Vitis platforms and overlays
SystemVerilog
81
star
56

IIoT-EDDP

The repository contains the design database and documentation for Electric Drives Demonstration Platform
VHDL
79
star
57

logicnets

Python
78
star
58

AI-Model-Zoo

75
star
59

RecoNIC

RecoNIC is a software/hardware shell used to enable network-attached processing within an RDMA-featured SmartNIC for scale-out computing.
SystemVerilog
75
star
60

ACCL

Alveo Collective Communication Library: MPI-like communication operations for Xilinx Alveo accelerators
C++
75
star
61

open-nic-shell

AMD OpenNIC Shell includes the HDL source files
SystemVerilog
70
star
62

mlir-air

C++
70
star
63

Applications

C
67
star
64

llvm-aie

Fork of LLVM to support AMD AIEngine processors
LLVM
66
star
65

XilinxUnisimLibrary

Xilinx Unisim Library in Verilog
Verilog
64
star
66

PYNQ_Composable_Pipeline

PYNQ Composabe Overlays
Tcl
61
star
67

gemx

Matrix Operation Library for FPGA https://xilinx.github.io/gemx/
C++
56
star
68

PYNQ_RFSOC_Workshop

Open-sourcing the PYNQ & RFSoC workshop materials
Jupyter Notebook
55
star
69

merlin-compiler

C++
52
star
70

meta-xilinx-tools

Yocto Project layer enables AMD Xilinx tools related metadata for MicroBlaze, Zynq, ZynqMP and Versal devices.
BitBake
50
star
71

RFSoC-PYNQ

Python productivity for RFSoC platforms
Jupyter Notebook
49
star
72

ResNet50-PYNQ

Quantized ResNet50 Dataflow Acceleration on Alveo, with PYNQ
C++
48
star
73

Alveo-PYNQ

Introductory examples for using PYNQ with Alveo
Jupyter Notebook
47
star
74

xup_compute_acceleration

Hands-on experience using the Vitis unified software platform with Xilinx FPGA hardware
C++
46
star
75

xup_high_level_synthesis_design_flow

AMD Xilinx University Program HLS tutorial
C
46
star
76

Vitis_Model_Composer

Vitis Model Composer Examples and Tutorials
C++
46
star
77

Vitis-AWS-F1-Developer-Labs

C++
44
star
78

PYNQ_Bootcamp

PYNQ Bootcamp 2019-2022 teaching materials.
Jupyter Notebook
44
star
79

PYNQ-Networking

Networking Overlay on PYNQ
Tcl
44
star
80

KRS

The Kria Robotics Stack (KRS) is a ROS 2 superset for industry, an integrated set of robot libraries and utilities to accelerate the development, maintenance and commercialization of industrial-grade robotic solutions while using adaptive computing.
HTML
43
star
81

Get_Moving_With_Alveo

For publishing the source for UG1352 "Get Moving with Alveo"
C++
42
star
82

blockchainacceleration

Tcl
42
star
83

HLS_packet_processing

C++
41
star
84

HLS_arbitrary_Precision_Types

C++
40
star
85

DSRL

40
star
86

inference-server

C++
40
star
87

Xilinx_Kria_KV260_Workshop

39
star
88

chipscopy

ChipScoPy (ChipScope Python API) is an open source Python API to the various ChipScope services provided by the TCF-based (Target Communication Framework) ChipScope Server (cs_server).
Jupyter Notebook
38
star
89

VVAS

Vitis Video Analytics SDK
C
37
star
90

vcu-ctrl-sw

C
36
star
91

XilinxCEDStore

This store contains Configurable Example Designs.
Tcl
36
star
92

pyxir

Python
36
star
93

pytorch-ocr

Python
35
star
94

DSP-PYNQ

A PYNQ overlay demonstrating Pythonic DSP running on Zynq UltraScale+
Tcl
35
star
95

xup_aie_training

Hands-on experience programming AI Engines using Vitis Unified Software Platform
Jupyter Notebook
34
star
96

open-nic-driver

AMD OpenNIC driver includes the Linux kernel driver
C
33
star
97

pcie-model

PCI Express controller model
C
32
star
98

qemu-devicetrees

Device trees used by QEMU to describe the hardware
Makefile
32
star
99

bootgen

bootgen source code
C++
31
star
100

hdmi-modules

Xilinx Soft-IP HDMI Rx/Tx core Linux drivers
C
30
star