How can I get a handle for a coverpoint so that I can call methods using that handle? First I need to know the type of a coverpoint so that I can instantiate the handle.
Here is an example:
class my_coverage_class;
rand bit my_coverpoint;
covergroup my_covergroup;
option.per_instance = 1;
coverpoint my_coverpoint;
endgroup
function new;
my_covergroup = new;
endfunction
endclass: my_coverage_class
program automatic testbench;
initial begin
my_coverage_class inst = new();
begin
var type(inst.my_covergroup.my_coverpoint) cp
= inst.my_covergroup.my_coverpoint; // BREAKS HERE
cp.get_inst_coverage();
end
end
endprogram // testbench
When I run the above using VCS 2013.06, I get:
Error-[NYI] Not Yet Implemented
testbench, 16
Feature is not yet supported: Type operator not supported
Note: When I run $display("%s", $typename(inst.my_covergroup.my_coverpoint))
, I get <unknown>