Interaction Between SystemVerilog and C - 2022.2 English - UG1308

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Version
2022.2 English
Revision
The main interaction between the SystemVerilog and C code can be summarized as follows:
  • When the SystemVerilog testbench 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 testbench.
    • 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.