The cli_commands.txt file contains the keys and responses corresponding to the first six packets. The following is an example of one entry:
# Table calculate, Entry 1
# key:[ p4calc.operation=6 ]
# response:[ action=operation_add ]
table_add calculate operation_add 0x6 =>
where calculate
corresponds to the table
name and operation_add
corresponds to the action
name.
In this example there is only one field in the key, as defined in calculator.p4:
table calculate {
key = {
hdr.p4calc.operation : direct;
}
When the example design is created, the following file is produced:
<proj_location>/vitis_net_p4_0_ex/vitis_net_p4_0_ex.gen/sources_1/ip/vitis_net_p4_0/src/verilog/vitis_net_p4_0_pkg.sv
This contains details of the table structures used in the test. It includes a list of associated actions per table, for example:
// Table 'calculate' Action list
XilVitisNetP4Action XilVitisNetP4TableActions_calculate[] =
'{
XilVitisNetP4Action_operation_add,
XilVitisNetP4Action_operation_sub,
XilVitisNetP4Action_operation_mult,
XilVitisNetP4Action_operation_and,
XilVitisNetP4Action_operation_or,
XilVitisNetP4Action_operation_xor,
XilVitisNetP4Action_operation_drop
};