System verilog 断言失败,实例名称不是合法的右值[7.1(IEEE)]

System verilog 断言失败,实例名称不是合法的右值[7.1(IEEE)],system-verilog,system-verilog-assertions,System Verilog,System Verilog Assertions,我的断言代码如下: property p_crossbar_halted_chk12; @(posedge `SOG_REST_SCOPE.clk) $rose(`SOG_REST_SCOPE.crossbar_halted) |-> ##[0:1] $rose(`SOG_REST_SCOPE.last_cycle) |-> ##[0:1] $fell(`SOG_REST_SCOPE.last_cycle); end

我的断言代码如下:

property p_crossbar_halted_chk12;
      @(posedge `SOG_REST_SCOPE.clk)
      $rose(`SOG_REST_SCOPE.crossbar_halted) 
          |-> ##[0:1] $rose(`SOG_REST_SCOPE.last_cycle) 
          |-> ##[0:1] $fell(`SOG_REST_SCOPE.last_cycle);
endproperty

ASSERT_P_CROSSBAR_HALTED_CHK12: assert property(p_crossbar_halted_chk12);
它不断地给出编译错误,比如

ASSERT_p_CROSSBAR_stopped_CHK12 ASSERT属性(p_CROSSBAR_stopped_CHK12)实例名称不是合法的右值[7.1(IEEE)]


当我试图用像您这样的宏替换$sformaf调用中的%s时,就会发生这种情况。试着用绝对路径代替你的宏'SOG_REST_SCOPE',我认为问题会得到解决

这段代码可以编译。错误一定在别处。我猜在同一范围内有一个实例名为
p\u crossbar\u stopped\u chk12