そのハンドルを使用してメソッドを呼び出すことができるように、カバーポイントのハンドルを取得するにはどうすればよいですか? 最初に、ハンドルをインスタンス化できるように、カバーポイントのタイプを知る必要があります。
次に例を示します。
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>