User guide

24-228
SystemVerilog Testbench Constructs
type_option.weight = integer;
Specifies the weight of the covergroup when calculating the
overall coverage. Specify an unsigned integer. The default weight
value is 1.
type_option.goal = integer;
Specifies the target goal of the covergroup. Specify an integer
between 0 and 100. The default goal is 90.
Note:
“Coverage number” is a percentage. If all bins of a covergroup
are covered, then the coverage number for that covergroup is
100%.
type_option.comment = "string";
A comment in the report on the covergroup.
You can also apply these option to coverage points, for example:
covergroup cg1 @(posedge clk);
cp1 : coverpoint bit1
{
type_option.weight = 333;
type_option.goal = 50;
type_option.comment = "Comment for bit1";
}
cp2 : coverpoint bit2;
endgroup
You can also apply these options to instances using the
instance_name.option.option_name=argument keyword
and argument, for example:
covergroup cg1 @(posedge clk);
cp1 : coverpoint bit1;
cp2 : coverpoint bit2;
endgroup