Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Sensitivity lists with boolean expressions #1425
Author Name: Al Grant
Items in sensitivity lists can be expressions:
This is legal, as long as you remember that "always @(a|b)" isn't the same as "always @(a or b)".
This came up before in Bug #934 but was not resolved. It sounded like this would need deep changes to Verilator. But would it not be possible to do it by a simple transformation? I.e. any time you see
and an expression is not simple, just introduce an assign:
This is exactly the transformation you would do at the source level if working around this Verilator limitation. So there would be no impact on Verilator's simulation engine. Unless I'm missing something?
Original Redmine Comment
Verilator doesn't really do anything with sensitivity lists except posedge/negedge handling; it basically is following synthesis rules, not event simulator rules. If you add the wire as you suggest it will act just as if it's in an "always @*", which is unlikely to be what you want.