Skip to content

Commit cc3bf4a

Browse files
authored
Merge pull request #768 from diffblue/grammar-sva-implication
SVA: fix grammar for overlapped and nonoverlapped implications
2 parents 662afe0 + a7d76c1 commit cc3bf4a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

regression/verilog/SVA/system_verilog_assertion4.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ module main(input clk);
2020
p10: assert property (x==0 |-> ##1 x==1 and ##2 x==2);
2121
p11: assert property (x==0 |-> ##1 x==1 and not ##2 x==3);
2222
p12: assert property (x==0 |-> ##1 x==1 && y==2);
23-
p13: assert property ((x==0 |-> y==0) |=> y != 0);
23+
p13: assert property ((x==0 -> y==0) |=> y != 0);
2424

2525
endmodule

src/verilog/parser.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,9 +2181,9 @@ property_expr_proper:
21812181
{ init($$, ID_sva_or); mto($$, $1); mto($$, $3); }
21822182
| property_expr "and" property_expr
21832183
{ init($$, ID_sva_and); mto($$, $1); mto($$, $3); }
2184-
| property_expr "|->" property_expr
2184+
| sequence_expr "|->" property_expr
21852185
{ init($$, ID_sva_overlapped_implication); mto($$, $1); mto($$, $3); }
2186-
| property_expr "|=>" property_expr
2186+
| sequence_expr "|=>" property_expr
21872187
{ init($$, ID_sva_non_overlapped_implication); mto($$, $1); mto($$, $3); }
21882188
| "if" '(' expression_or_dist ')' property_expr %prec LT_TOK_ELSE
21892189
{ init($$, ID_sva_if); mto($$, $3); mto($$, $5); stack_expr($$).add_to_operands(nil_exprt()); }

0 commit comments

Comments
 (0)