Interrupt Example - 2022.2 English - UG1308

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Version
2022.2 English
Revision

This example summarizes Target and Interrupt API functions to control and monitor the ECC interrupts for the table present in the FiveTuple example. This example C program is provided at the following location:

<project_name>/<project_name>.gen/sources_1/ip/<inst_name>/src/sw/drivers/target/example/interrupt_example.c

This program demonstrates target and interrupt driver function calls to achieve the following functionality:
  • Initialize the driver using XilVitisNetP4TargetInit()
  • Obtain the context for the interrupt driver using XilVitisNetP4TargetGetInterruptDrv()
  • Obtain the P4 element ID for the “FiveTuple” table using XilVitisNetP4TargetGetTableElementIdByName()
  • Enable both single and double bit ECC error interrupts using XilVitisNetP4TargetInterruptEnableElementEccErrorById()
  • Read interrupt status to determine if either a single or double bit ECC error interrupt has occurred using XilVitisNetP4TargetInterruptGetElementEccErrorStatusById()
  • Clear the single or double bit ECC error interrupts if present using XilVitisNetP4TargetInterruptClearElementEccErrorStatusById()
  • Disable the single bit ECC error interrupt using XilVitisNetP4TargetInterruptDisableElementEccErrorById()
  • Exit driver using XilVitisNetP4TargetExit()