User Externs - 2022.2 English

Vitis Networking P4 User Guide (UG1308)

Document ID
2022.2 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 again due to the difficulty of implementing efficiently in P4 code.

This purpose is supported in Vitis Networking P4 by means of a UserExtern declaration provided by Vitis Networking P4 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 Vitis Networking P4 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 Vitis Networking P4 designs.

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