Interaction Between SystemVerilog and C - 2025.1 English - UG1308

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Release Date
2025-05-29
Version
2025.1 English
The main interaction between the SystemVerilog and C code can be summarized as follows:
  • When the SystemVerilog test bench wants to modify a table's state (for example, insert an entry), it calls the associated control plane driver function from the DPI library.
    • SystemVerilog code is now causing C code to execute
  • As the control plane driver function executes, it performs a series of register reads and writes by triggering associated tasks in the SystemVerilog test bench.
    • C code is now causing SystemVerilog code to execute

To understand how this handshaking is achieved, it is important to first understand some of the features of DPI which influence how it is used in the example designs, and also to have a basic understanding of how the control plane drivers function.