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

Support SystemVerilog void casts & warn if not present #1383

Closed
veripoolbot opened this issue Dec 31, 2018 · 3 comments
Closed

Support SystemVerilog void casts & warn if not present #1383

veripoolbot opened this issue Dec 31, 2018 · 3 comments

Comments

@veripoolbot
Copy link
Contributor

@veripoolbot veripoolbot commented Dec 31, 2018


Author Name: Al Grant
Original Redmine Issue: 1383 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


SystemVerilog supports casts; one use is to explicitly void a non-void function call, to avoid a lint warning:

function automatic integer f_int();
endfunction

function automatic void g();
  void'(f_int());
endfunction

Verilator faults this with

syntax error, unexpected void

It would be useful if Verilator could support this simple idiom, given that functions are generally supported and this kind of voiding cast may be mandated by house style or used in the output of Verilog generators.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Jan 2, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-01-02T23:16:34Z


Should be straight foward enough, perhaps you could provide some test_regress style test cases and a patch to implement it?

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Mar 10, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-03-10T19:12:37Z


Fixed in git towards 4.012.

Also added IGNOREDRETURN warning when no cast present, which is required by IEEE.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Mar 24, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-03-24T01:15:55Z


In 4.012.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.