简体   繁体   English

是否可以使用 simvision 工具在日志文件的覆盖点内显示特定 bin 的覆盖范围?

[英]Is it possible to display coverage of a specific bin within a coverpoint in a logfile using the simvision tool?

I am trying to display coverage (in terms of percentage) for a specific bin within a coverpoint .我正在尝试显示coverpoint中特定 bin 的覆盖率(以百分比表示)。 I am able to display the coverage percentage of a coverpoint but not the coverage percentage for individual bins within the coverpoint .我能够显示coverpoint coverpoint各个 bin 的覆盖百分比。

covergroup cov_a @(posedge clk);
c1:coverpoint signal{
    bins a={1};
    bins b={0};
}
c2:coverpoint b{
    bins c={1};
    bins d={0};
}
option.per_instance = 1;
endgroup :cov_a 

cov_a cov_a_inst = new();

final begin 
$display("Coverage for c1: %d%%",    cov_a_inst.c1.get_inst_coverage());
$display("Coverage for c2: %d%%",    cov_a_inst.c2.get_inst_coverage());
end

I want to do the below我想做以下

//$display("Coverage for bin a in c1 coverpoint: %d", $coverage(cov_a_inst.c1.a)); //$display("c1 coverpoint 中 bin a 的覆盖率:%d", $coverage(cov_a_inst.c1.a));

not sure how to give the hierarchy.不确定如何给出层次结构。 Note: I have tried adding a single bin within a coverpoint which also solves the issue, but I want to optimize this.注意:我曾尝试在coverpoint中添加一个 bin,这也解决了这个问题,但我想优化它。

Table 19-5 — Predefined coverage methods in IEEE Std 1800-2017 shows that get_coverage and get_inst_coverage can be called on covergroups, coverpoints and crosses.表 19-5——IEEE Std 1800-2017 中预定义的覆盖方法表明可以在覆盖组、覆盖点和交叉上调用get_coverageget_inst_coverage It does not specify that they can be called on bins within a coverpoint.它没有指定可以在覆盖点内的箱子上调用它们。 Thus, you should not expect to be able to get coverage for individual bins or to be able to specify the hierarchy of a bin.因此,您不应期望能够覆盖单个 bin 或能够指定 bin 的层次结构。

Perhaps the tool you are using provides that custom capability;也许您正在使用的工具提供了自定义功能; refer to your user documentation.请参阅您的用户文档。

The SystemVerilog language has no mechanism for accessing individual bins. SystemVerilog 语言没有访问单个 bin 的机制。 Naming bins is quite complicated, and sometimes you won't even know if a bin exists until after the covergroup gets constructed.命名 bin 非常复杂,有时您甚至在构建覆盖组之前都不知道 bin 是否存在。

Many tools have post-simulation analysis tools that can report individual bin hits and even timestamps for when it was hit.许多工具都有模拟后分析工具,可以报告单个 bin 命中甚至命中时的时间戳。

If you need that level of detail while your simulation is still executing, your best option is the coverpoint with the single bin as you mention.如果您在模拟仍在执行时需要那种级别的细节,那么最好的选择是您提到的带有单个箱子的覆盖点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM