Closed jrudess closed 8 months ago
As a side-note, I've seen cases where VCS accepts 'else $error()' statements appearing after an assert-property is terminated with a semicolon, but then Questa fails to parse. It looks like Slang might be matching VCS behavior here as the following example parses cleanly.
module M;
logic clk, rst;
property myprop;
@(posedge clk) disable iff(rst !== 0) 1;
endproperty
label1: assert property(myprop);
else $error("with semi-colon");
label2: assert property(myprop)
else $error("without semi-colon");
endmodule
Fixed in 1ed2b7a93ce88da803f4611dda11731da8a73bf1
This is a tricky one that took me a while to understand to be able to reproduce.
For the generate-if that wraps label1, I believe the generate-else is being incorrectly associated with the
label1
assert-property. The semi-colon at the end of thelabel1
line should have completely terminated that 'assert property'. The examples for label3->label6 showcase some workarounds to get the parsing to work out.