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

问题描述 投票:0回答:1

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

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

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

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

code-coverage system-verilog bins function-coverage
1个回答
2
投票

您可以添加with子句

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

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

© www.soinside.com 2019 - 2024. All rights reserved.