
covergroup CovPort;
options.auto_bin_max = 8; //所有的coverpoint auto_bin数量是8
coverpoint tr.port
{ option.auto_bin_max = 2} //特定的covepoint auto_bin数量2
endgroup
covergroup CovKind;
coverpoint tr.kind{
bins zero = {0}; //1个仓代表kind==0
bins lo = {[1:3] , 5}; //1个仓代表1:3和5
bins hi[] = {[8:$]}; //8个独立的仓代表8:15
bins misc = default; //1个仓代表剩余所有值
} //没有分号
endgroup
注意coverpoint定义使用{ }而不是begin...end大括号结尾没带分号,和end一样。

covergroup CoverPort;
coverpoint port iff
(!bus_if.reset);

本文深入探讨Systemverilog中的功能覆盖率,特别是数据采样的概念。重点介绍了coverpoint的定义及其使用,强调了coverpoint定义不使用begin-end大括号,而用{}且不加分号的特点。此外,还讲解了如何在不同的covergroup实例中启用采样,并且可以在coverpoint上设置条件来控制采样行为。
1548

被折叠的 条评论
为什么被折叠?



