2
如何获得一个覆盖点句柄,以便我可以使用该句柄调用方法? 首先,我需要知道覆盖点的类型,以便我可以实例化该句柄。如何获得一个关卡的句柄?
下面是一个例子:
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
当我运行上面使用VCS 2013.06,我得到:
Error-[NYI] Not Yet Implemented
testbench, 16
Feature is not yet supported: Type operator not supported
注:当我运行$display("%s", $typename(inst.my_covergroup.my_coverpoint))
,我得到<unknown>