Forward Example Design - 2022.2 English

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Version
2022.2 English
Revision

The Forward example exemplifies the implementation of the core of an IPv4/IPv6 network switch. The IP destination address is used to perform an LPM search to determine the port to where the packet needs to be redirected. The IPv6 table is setup to be implemented with a ternary CAM, the IPv4 table with a semi-ternary CAM.

In the Forward example, fifteen packets (contained in traffic_in.user) are input to the Vitis Networking P4 Parser. The Forward.p4 file describes two tables:
  • TCAM mode with a key width of 32 bits and num_masks of 16. This gets implemented as an STCAM table (see Compiler Table Selection).
  • STCAM mode with a key width of 128 bits. This gets implemented as a TCAM table (see Compiler Table Selection).