scr1 test suite: |-> and |=> operators are unsupported in assertions
Code like this fails to build:
MYTEST : assert property ( @(negedge clk) disable iff (~rst) a |-> b ) else $error("MYTEST failed");
with the message "syntax error, unexpected |->, expecting ')'".
#1 Updated by John Coiner 10 months ago
Verilator does not support the "|->" or "|=>" operators or the sequence expression ("##") operator.
In general, Verilator's going to have a difficult time supporting anything that can't be converted to a traditional synthesizable always block, which is how it handles "assert property" internally.
IIUC "|->" is purely combinational, in which case, the code you posted could be rewritten as:
MYTEST : assert property ( @(negedge clk) disable iff (~rst) (a ? b : 1'b1) ) else $error("MYTEST failed");
(Is that really equivalent? I haven't used these operators.) If so you could add parser support for "|->" and convert it to the plain old ternary somewhere along the pipeline, maybe in V3Assert.cpp where the 'assert property' gets converted to a plain old always block.
"|=>" can be converted internally to a combination of "|->" and "##" according to http://www.project-veripage.com/sva_12.php
To support "##" you'd have to generate some state variables and a clocking pipeline. It's not impossible, it's just code.
Also available in: Atom