Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property definition with disable iff before event fails #2108

Open
matlupi opened this issue Feb 15, 2024 · 0 comments
Open

Property definition with disable iff before event fails #2108

matlupi opened this issue Feb 15, 2024 · 0 comments
Labels
rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017).

Comments

@matlupi
Copy link

matlupi commented Feb 15, 2024

Describe the bug

The syntax checker rejects properties with the disable iff defined before the sampling event in a property.

To Reproduce

test.sv

module test;
  logic clk;
  logic rst;
  logic a;
  logic b;

  // accepted
  property tp;
    @(posedge clk) disable iff (rst) a |-> b;
  endproperty
  assert property (tp);

  // rejected
  property tpr;
    disable iff (rst) @(posedge clk) a |-> b;
  endproperty
  assert property (tpr);

  assert property (@(posedge clk) disable iff (rst) a|->b); // accepted
  assert property (disable iff (rst) @(posedge clk) a|->b); // rejected
endmodule

verible-verilog-lint test.sv

Actual behavior:

Rejects valid code

$ verible-verilog-lint test.sv 
test.sv:15:23: syntax error at token "@"
test.sv:16:3-13: syntax error at token "endproperty"
test.sv:20:38: syntax error at token "@"

Expected behavior

All options above are valid and should be accepted.

@matlupi matlupi added the rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017). label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017).
Projects
None yet
Development

No branches or pull requests

1 participant