Major Tools
Other Tools
General Info

Issue #934

Boolean expression in sensitivity list unsupported

Added by Luke Yang almost 3 years ago. Updated over 1 year ago.

% Done:



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

t_alw_combdly.diff View - My additions to t_alw_combdly.v in test_regress (708 Bytes) Luke Yang, 06/22/2015 03:58 PM


#1 Updated by Wilson Snyder almost 3 years ago

  • Status changed from New to WillNotFix

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

#2 Updated by John Demme over 1 year ago

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.


#3 Updated by Wilson Snyder over 1 year ago

  • Category set to Lint
  • Status changed from WillNotFix to Resolved
  • Assignee set to Wilson Snyder

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.

#4 Updated by John Demme over 1 year ago

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

#5 Updated by Wilson Snyder over 1 year ago

  • Status changed from Resolved to Closed

In 3.900.

Also available in: Atom