How should I add ignore_bin
in child class for a coverpoint
which is defiened in base class?
I tried extending base covergroup
but it shows compilation errors for keyword extend
in this context covergroup cg_rand extends Base_class::cg;
How should I add ignore_bin
in child class for a coverpoint
which is defiened in base class?
I tried extending base covergroup
but it shows compilation errors for keyword extend
in this context covergroup cg_rand extends Base_class::cg;
1 Answer
Reset to default 0The IEEE 1800-2023 SystemVerilog LRM recently added the ability to extend a embedded covergroup
in a derived class. Tools are now just beginning to implement it.
However, this new feature only allows you to override coverpoints—not individual bins.
My suggestion to you is putting the bins you want to ignore as a separate coverpoint. Then, even without this enhancement, you can set the weight of the coverpoint to zero in the extended class.