Hello,
I have a question around robust verification approach.
Let’s assume I have a Testbench with an infrastructure in place to:
- Collect code coverage on the DUT
- Collect functional coverage to make sure all stimuli of interested were hit as desired (as per constrained-random definition) by Testbench
What I would like to add is the support to some sort of coverage in the TB code itself. Let’s assume for example I have a specialized checker called Checker_X in my TB which is supposed to check something through a task (or function) called TaskOrFunct_A. The expectation is that Checker_X :: TaskOrFunct_A() gets called by the TB at runtime, at some point in time, to check for example some register values of the DUT.
I would like to know if SystemVerilog language allows to collect something similar to code/functional coverage on Checker_X :: TaskOrFunct_A(). In other words: after I run a regression with 10,000 tests in it, was Checker_X :: TaskOrFunct_A() called for each of those tests? Or were all those tests a false pass because that code was never ran? What I do now is open the log file of a test and manually check for prints from that TaskOrFunct_A() showing it executed. Risky, because I cannot guarantee that this happened in all of my 10,000 tests - in every regression kicked off.
I am used to define cover groups with cover points around some objects created by the TB (for example, I create a typedef and I check that all of its enumerated values are covered). But never thought whether something similar could be done on actual lines of codes inside the Testbench (not the DUT). Lines of code delimiting a task, a function, etc…. Essentially methods of classes representing TB agents. And then it all could be picked up and analyzed as part of the coverage collection flow.
Thank you so much for your kind help!
-Paolo