Testing interrupts extracted from file inside UVM sequence

In this tip, you will learn how to test interrupts provided by a .txt file using a UVM sequence.Consider the following file, “irq_file.txt”:

Vtool_Testing_interrupts_extracted_from_file

This file provides all the necessary information about the interrupts, including the source signal, which indicates point within the system where the interrupt originates; the pulse, specifying whether signal is pulse or level-triggered; the destination signal, identifying the point to which interrupt propagates; and the index, which shows the bit number of the register that is updated after the interrupt occurs.

Before parsing the file, it is necessary to configure the appropriate register to propagate the interrupts.

Next, we configure the register for the interrupt with the specified index and wait for the WR to propagate. Once this is complete, the source signal can be asserted. If this signal is a pulse, it must be released immediately after the previous command.

Vtool_Testing_interrupts_extracted_from_file

Check whether the interrupt has propagated and the register has been updated correctly by reading the destination signal:

Vtool_Testing_interrupts_extracted_from_file

After releasing the previously forced signal, check if the destination signal is 0 and verify the proper register.

Vtool_Testing_interrupts_extracted_from_file

Finally, clear the interrupts to continue the while loop until the end of the file, then close it.

For more details on RTL signals manipulation within UVM classes, refer to one of our previous posts here.