Simulating with multiple VitisNetP4 instances - 2022.2 English

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Version
2022.2 English
Revision

The example design can be extended to support multiple VitisNetP4 IP instances. There are a few steps involved:

  1. Update example_top.sv to set the NUM_M_AXI parameter to the number of VitisNetP4 IP instances. Then instantiate all those instances and connect the data-plane signals as appropriate in example_dut_wrapper.sv.
  2. Update example_control.sv:
    1. Add `include at the top for the package files of any other VitisNetP4 IP instances.
    2. Add further calls to the run_cli_commands macro for each VitisNetP4 IP instance (following the commented out instructions).
    3. Remove run_traffic command from all but last cli_commands file, so that traffic is only run after all table entries have been setup.
  3. Update to run-p4bm-vitisnet.tcl script (or equivalent script) for behavioral modeling of multiple P4 instances with potentially other custom modules in between.

The example_control module will use the same axi_lite_wr and axi_lite_rd tasks for the AXI-Lite signaling sequence, but it will multiplex those signals to the corresponding VitisNetP4 IP instance according to the call to the run_cli_commands macro.

Alternative setups are also possible. For example, the multiplexing could be replaced with the addition of different offset addresses for the different VitisNetP4 IP instances, in cases where a single AXI-Lite I/F exists on the DUT and the address decoding to the different VitisNetP4 IP instances happens within the DUT.

Refer to Daisy-Chain Example Design section in Chapter 3, Vitis Networking P4 Tool Flows for more information.