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

Boolean expression in sensitivity list unsupported #934

Closed
veripoolbot opened this issue Jun 22, 2015 · 5 comments
Closed

Boolean expression in sensitivity list unsupported #934

veripoolbot opened this issue Jun 22, 2015 · 5 comments
Assignees
Labels
area: lint Issue involves SystemVerilog lint checking resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Luke Yang
Original Redmine Issue: 934 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


The parser front-end fails to recognize a boolean expression as an event_expression in a sensitivity list.

For example, always @((i && j) or posedge clk) would cause a syntax error where && is unexpected.

However, the LRM says

clocking_event ::=
@ identifier
|@ ( event_expression )

event_expression ::=
[edge_identifier] expression [iff expression]
| // others...

Therefore a boolean expression should be legal.

This error comes from compiling Altera Quartus 14.0's altera_mf.v

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-06-22T17:02:32Z


Unfortunately this syntax requires an event simulator. While Verilator could ignore it, it would almost certainly just result in a mismatch with other simulators.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: John Demme (@teqdruid)
Original Date: 2016-11-15T18:26:23Z


Hi Wilson-

It be great if the parser supported this syntax and then errored out during elaboration of some other stage. This behavior is important for three use cases:

  • The simulated design is pulling in a module which does not use this syntax, but is contained in a file with other modules which contain this syntax. This is common, especially for supporting simulation libraries from Altera.
  • Verilator is being used for linting rather than simulation
  • Verilator's parser is being pulled out and used for another purpose

I would really like to use Verilator for all three purposes.

~John

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-12-21T23:23:37Z


Parsing of && is now supported, but not arbitrary equations due to certain difficulties. This errors out later when the module is consumed (unless --bbox-unsup is used)

In git towards 3.891.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: John Demme (@teqdruid)
Original Date: 2016-12-22T00:08:14Z


Excellent! Thanks, Wilson.

I'll check it out in the next few days. Would be great if it not gets through that monster of an altera_mf.sv.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-01-15T17:18:33Z


In 3.900.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: lint Issue involves SystemVerilog lint checking resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants