在 SystemVerilog 中,有没有办法在常量函数中使用断言?

In SystemVerilog, is there a way to use assertions in constant functions?

我有一个类似于这个的函数

function automatic int divide(int a,  int b);
        check_divides: assert(a % b == 0);

        return a / b;
endfunction

我的模拟器拒绝编译它并说这不再是常量函数。

有谁知道是否应该允许这样做,或者是否有办法在常量函数中执行这样的断言?

这在 Questa 中运行良好。尽管 LRM 部分 13.4.3 Constant functions 中没有任何内容表明这是非法的,但也没有任何内容定义断言的操作块的行为及其对编译的影响。