Simulating with Multiple VNP4 Instances - 2025.1 English - UG1308

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Release Date
2025-05-29
Version
2025.1 English

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

  1. Update example_top.sv to set the NUM_M_AXI parameter to the number of VNP4 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 VNP4 IP instances.
    2. Add further calls to the run_cli_commands task for each VNP4 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 uses the same axi_lite_wr and axi_lite_rd tasks for the AXI-Lite signaling sequence, but it multiplexes those signals to the corresponding VNP4 IP instance according to the call to the run_cli_commands task.

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

See Daisy-Chain Example Design for more information.