User Externs - 2025.1 English - UG1308

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Release Date
2025-05-29
Version
2025.1 English

Another purpose of P4's extern support is to provide a mechanism for users to extend their P4 program with custom functionality that necessarily resides outside of the P4 program - perhaps due to the difficulty of implementing efficiently in P4 code.

This purpose is supported in AMD Vitis™ Networking P4 by means of a UserExtern declaration provided by VNP4 architecture. This declaration enables you to define the interface between your P4 program and the custom functionality that has been implemented externally, in this instance, in RTL. Furthermore, the VNP4 behavioral model can be extended with a software model of the custom functionality, so that it can continue to be a useful tool for verification of generated VNP4 designs.

The following sections describe how to use this mechanism to integrate custom functionality with a VNP4 design using User Externs.