请问在例化covergroup的时候加automatic会有什么效果
以下是我在interface中的一段代码,我发送了5000个数据,wfull会在第4100个数据左右拉高,但在覆盖率中收不到wfull为高,仔细研究了代码及波形,发现他在第1157个周期停止收集覆盖率,删了automatic就正常了。请问是为什么?
covergroup exception_write_cg @(posedge wclk iff wrst_n);
option.name = "exception_write";
option.per_instance = 1;
coverpoint wfull{
bins full = {1};
bins no_full = {0};
}
endgroup : exception_write_cg
covergroup exception_read_cg @(posedge rclk iff rrst_n);
option.name = "exception_read";
option.per_instance = 1;
coverpoint rempty{
bins empty = {1};
bins no_empty = {0};
}
endgroup : exception_read_cg
initial begin
if(has_coverage) begin
automatic exception_write_cg exception_write_cg= new();
automatic exception_read_cg exception_read_cg= new();
end
end