Function - 2022.2 English

Vitis Networking P4 User Guide (UG1308)

Document ID
2022.2 English
The Match-Action block performs the following:
  • If an unknown action is specified or the header is invalid, the packet is dropped.
  • If there is a match, the source and destination addresses are swapped.
  • If there is a match, the requested operation is performed on Operand A and Operand B and the result field is updated.

In the Calculator example, packets 1 to 6 have source/destination addresses swapped, actions performed and results inserted. Packets 7, 8, and 9 are dropped because of an unknown action/invalid header. Golden reference output data from the

The Behavioral Model output is stored in a file (traffic_out.user) and is compared against the output of the Deparser.