#266 Assertion syntax legal but generates errors

v1.0_(example)
closed-fixed
nobody
None
5
2013-07-14
2013-07-09
Scott Nixon
No

module AssertionErrors (
input wire clk,
input wire reset_n,
input wire a,
input wire b,
input wire c,
input wire d

);

property p_example_1;
  @(posedge clk) disable iff (!reset_n)
    $fell(a) |-> 
    if (b)
      ##[0:7] c
    else
      ##[0:15] d;
endproperty

a_example_1: assert property(p_example_1)

endmodule

Will generate errors: Unexpected toking in primary "if"
Expecting one of operator ";"; received ":"

module AssertionErrors (
input wire clk,
input wire reset_n,
input wire a,
input wire b,
input wire c,
input wire d

);

sequence s_example2;
    @(posedge clk) ( a && $fell(b) ) [->1];
endsequence

property p_example2;
    @(posedge clk)
        s_example2 |->
         c;
endproperty
a_example2 : assert property(
    disable iff(!reset_n )
    p_example2
);

endmodule

Will generate errors: Expecting one of operator "+"; received "->"
Expecting one of operator ";"; received "p_example2"

Discussion

  •  
  • Thanks for the bug report and testcase. I'm currently investigating...

     
    • status: open --> closed-fixed
     
  • Corrected in the 1.3.0 release