【发布时间】:2017-06-18 10:46:20
【问题描述】:
我只是 SystemVerilog 的初学者,现在我正在阅读有关报道的内容。所以我对此有疑问。如何编写覆盖点箱来覆盖信号的所有位?
interface allSignals;
logic [31:0] addr;
logic [15:0] len;
bit trigger;
covegroup signalOne@trigger;
coverpoint addr; //This generates bins automatically(64 bins by
default) with each bin containing 2^32/64 values
coverpoint addr[0]; //each coverpoint covers 2 bins and 50% coverage
coverpoint addr[1]; //is shown even if the value is not covered in
... //that bin
...
coverpoint addr[31];
coverpoint addr{
bins a0[] = {[0:5000]}; //should write 2^32 values which is
bins a1[] = {[5001:10000]}; //very complex
...
...
}
ad: coverpoint addr{
bins a[100] = ad; //creates 100 bins with 2^32/100 values in
} //each bin
endgroup
signalOne cvr1 = new;
endinterface
如何编写一个覆盖所有 32 位“addr”信号的覆盖点。有没有其他更好的方法来做到这一点。
【问题讨论】:
-
“覆盖所有 32 位”是什么意思?每个都是一/零?
标签: system-verilog test-coverage