SVA error Property declaration must end with "endproperty"

I’m getting an error Property declaration must end with “endproperty” in the following property. Help needed!

property addr_incr_p(_vld, _addr);
@(posedge clk) disable iff(!int_rstn)
if($fell(_vld))
(1’b1,addr_incr_func(_addr)) |-> (_addr==($past(_addr)));
else
_vld |=> (1’b1,addr_incr_func(_addr)) |-> (_addr==($past(_addr)+1));
endproperty

assert property (addr_incr_p(vld, addr)) else begin`uvm_error(“GENERIC PROPERTY”,$sformatf("ADDRESS %0h ",addr)) end;

In reply to Nimisha Varadkar:
Your error is the “;” in the first consequent

   
property_statement ::=
   property_expr ;
    | case ( expression_or_dist ) property_case_item
           { property_case_item } endcase
    | if ( expression_or_dist ) property_expr // <--- NO ";" at end 
    [ else property_expr ]

// This compiles OK 
property addr_incr_p(_vld, _addr);
      @(posedge clk) disable iff(!int_rstn)
      if($fell(_vld))
        (1'b1,addr_incr_func(_addr)) |-> (_addr==($past(_addr)))
      else
        _vld |=> (1'b1,addr_incr_func(_addr)) |-> (_addr==($past(_addr)+1));
endproperty

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr

** SVA Handbook 4th Edition, 2016 ISBN 978-1518681448

  1. SVA Package: Dynamic and range delays and repeats SVA: Package for dynamic and range delays and repeats | Verification Academy
  2. Free books: Component Design by Example FREE BOOK: Component Design by Example … A Step-by-Step Process Using VHDL with UART as Vehicle | Verification Academy
    Real Chip Design and Verification Using Verilog and VHDL($3) Amazon.com
  3. Papers:

In reply to Nimisha Varadkar:

I’m getting an error Property declaration must end with “endproperty” in the following property. Help needed!
property addr_incr_p(_vld, _addr);
@(posedge clk) disable iff(!int_rstn)
if($fell(_vld))
(1’b1,addr_incr_func(_addr)) |-> (_addr==($past(_addr)));
else
_vld |=> (1’b1,addr_incr_func(_addr)) |-> (_addr==($past(_addr)+1));
endproperty
assert property (addr_incr_p(vld, addr)) else begin`uvm_error(“GENERIC PROPERTY”,$sformatf("ADDRESS %0h ",addr)) end;

It worked without the ; before else part!

In reply to ben@SystemVerilog.us:

Thanks Ben!