使用增量值在 System Verilog 中定义 Coverage Bin

Define Coverage Bin in System Verilog using Incremental Values

我正在尝试使用 systemverilog 为较大的覆盖区域定义覆盖范围。例如,我想定义一个从 24'h000000 开始,在 24'h001ff0 结束,并以 24'h000008 递增的覆盖区间。到目前为止我已经试过了;但是,它无法编译。

bins scratchpad = {24'h000000:24'h000008:24'h001ff0};

这给出了一个语法错误:syntax error: token is ':'

有没有办法避免必须明确写出所有覆盖点?我知道我可以用 {24'h000000:24'h001ff0} 定义一个 bin,但这包含我不想包含的点。

您可以添加 with 子句

bins scratchpad[] = {[24'h000000:24'h001ff0]} with (item % 8 == 0);

有关其他选项,请参阅 http://go.mentor.com/ready-for-systemverilog-2012IEEE 1800-2012 LRM 部分 19.5.1.1