我正在尝试使用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,但这包含我不希望包含的点。
您可以添加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节