system-verilog - 覆盖组的接口(interface)对象

标签 system-verilog

我想将我的封面组绑定(bind)到界面对象。这就是为什么我指定接口(interface)对象作为 covergroup 的输入:

interface fifoPorts #(parameter DSIZE = 8);
...
endinterface

covergroup write_cvr (fifoPorts itf) @(posedge itf.wclk);
coverpoint itf.winc iff (!itf.wrst_n);
coverpoint itf.wrst_n {
        bins actv =(1=>0);}
endgroup

但是模拟器不接受这一点,它会在 covergroup 中引发错误,指出在需要类型或类型标识符的位置找到了标识符(“fifoPorts”)。 我的问题是:covergroup可以接受接口(interface)对象吗?如果是的话,我的情况有什么问题吗?

谢谢 海克

最佳答案

您需要更改 covergroup header 以使用虚拟接口(interface)变量:

covergroup write_cvr (virtual fifoPorts itf) @(posedge itf.wclk);

然后将 fifoports 的实例传递给 covergroup 的构造函数。

关于system-verilog - 覆盖组的接口(interface)对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37568849/

相关文章:

system-verilog - 为什么 Quartus Prime 不想忽略用于仿真的 systemverilog 断言?

module - 将参数传递给 Verilog 模块

verilog - Verilog 和 SystemVerilog 中何时不需要 `include 指令?

system-verilog - 如何为系统verilog生成ctags?

system-verilog - 在UVM中重写后如何获取类句柄的属性?

c++ - 如何即时更新标题

verilog - 如何处理从一个时钟域到另一个时钟域(其时钟除以第一个时钟的 2 倍)的数据?

enums - 系统Verilog : How come the enum next() method cannot be used in a constant function?

system-verilog - 宽度可配置时如何编写脉冲宽度systemverilog断言

constraints - 约束随机化,对于 16 位变量,连续 2 位设置为 1,其他位设置为 0