【问题标题】:concurrent assertion inside for-loop in system verilog系统verilog中for循环内的并发断言
【发布时间】:2014-06-01 08:32:17
【问题描述】:

SystemVerilog 中的循环语句中是否允许并发断言?

    module cover12(input clk, in1,in2, in3);
    bit mybit;
    property prop;
    @(posedge clk) in1 ##1 in2 ##1 in3;
    endproperty

    always @(posedge clk)
    begin
     for(reg i =0;i<1;i=i+1)
      if(mybit)
       begin
        assert1: assume property(prop);
       end
    end

    endmodule

【问题讨论】:

  • 我真的不明白你想用for循环实现什么,只需要一次迭代。
  • 哦!我只是这样写示例,对于较短的测试用例,实际上我的测试用例并没有通过分析。
  • 我认为在模块的循环语句中允许并发断言。

标签: system-verilog assertions system-verilog-assertions


【解决方案1】:

查看第 429 页的 SV 2012 标准,这似乎是允许的。我用我的模拟器编译了你的代码,它工作了。

【讨论】:

    【解决方案2】:

    是的,这是允许的。请注意,执行是非阻塞的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-08
      • 2016-01-17
      • 1970-01-01
      相关资源
      最近更新 更多