Text Format - 2022.2 English - UG1308

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Version
2022.2 English
Revision

The text format has the following structure:

  • Lines beginning with a percent character (%) are considered line comments.
  • Entries are terminated with a semi-colon.
  • Field values are always defined in hex.

    field1=1234 field2=5678

    field3=9abc

    field4=def0;

  • Lines containing stored persistence values start with ‘#’. Persistance values remain set until a later definition changes them. There is no semi-colon at the end of persistence value changes.

    # field1=1234 field2=5678

    # field3=9abc

  • Lines starting with ‘@’ triggers entry replication, with the number after the symbol being a decimal number. There is no semi-colon at the end of replication lines.

    @ 100 field1=1234 field2=5678

  • Lines starting with ‘@’ followed by the ‘*’ character signals that replication continues for all remaining packets. The simulation will stop reading from the file.

    @ * field1=1234 field2=5678

The following is an example of the metadata file in text format.

metadata.new_vlan_pcp=1 metadata.new_vlan_cfi=1 metadata.new_vlan_vid=ae8 ;

# metadata.new_vlan_pcp=2 metadata.new_vlan_cfi=0 metadata.new_vlan_vid=5c0 
metadata.new_vlan_pcp=6 metadata.new_vlan_cfi=0 metadata.new_vlan_vid=335 ;

@ 4 metadata.new_vlan_pcp=3 metadata.new_vlan_cfi=1 metadata.new_vlan_vid=9
metadata.new_vlan_pcp=4 metadata.new_vlan_cfi=1 metadata.new_vlan_vid=dc1 ;
metadata.new_vlan_pcp=5 metadata.new_vlan_cfi=0 metadata.new_vlan_vid=5d9 ;
metadata.new_vlan_pcp=5 metadata.new_vlan_cfi=1 metadata.new_vlan_vid=410 ;
metadata.new_vlan_pcp=5 metadata.new_vlan_cfi=1 metadata.new_vlan_vid=c04 ;

@ * metadata.new_vlan_pcp=3 metadata.new_vlan_cfi=1 metadata.new_vlan_vid=99