【问题标题】:Coverpoint bins to cover all the bits覆盖所有位的覆盖点箱
【发布时间】: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


【解决方案1】:

您不会通过尝试访问 2**32 个地址来收集 32 位地址的功能覆盖率。在具有 70ns 存取存储器的实际硬件中,需要 5 分钟。鉴于软件模拟通常要慢 10000 倍,这将花费您一个月的时间。

大多数人所做的是在每个位上寻找从 0 到 1 和 1 到 0 的转换。这就是 toggle 覆盖范围。虽然它是possible to model toggle coveragecovergroup,但大多数工具都有内置的分析功能可以为您执行此操作。您需要查看模拟工具的用户手册。

如果您确实需要彻底测试整个 4GB 地址空间,您可能需要针对该任务调查 formal tools 而不是模拟。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-06-11
    • 2012-01-28
    • 2012-10-17
    • 1970-01-01
    • 2022-06-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多