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

genvar in always_comb doesn't fail or lint warn during compile when not in a generate block #1275

Closed
veripoolbot opened this issue Feb 11, 2018 · 2 comments

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Feb 11, 2018


Author Name: Christopher Russell
Original Redmine Issue: 1275 from https://www.veripool.org


I think the language spec only allows for genvar variable usage in always_comb and assign when under a generate scope. I have example code such as below where I accidentally copied some code with a genvar still in it.

genvar g_foo;

// top level module scope
always_comb begin
  bar[g_foo] = stuff;
end

This code will fail gcc compilation after verilator code generation but it won't fail or warn on verilog compile. Is there a way to add this check as a lint rule?

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Feb 12, 2018


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-02-12T03:06:11Z


This is a duplicate of #�. If you're interested in looking at fixes, please update there, otherwise perhaps I've give it another look.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Feb 13, 2018


Original Redmine Comment
Author Name: Christopher Russell
Original Date: 2018-02-13T19:50:36Z


I might look into it after I get some downtime at work. I'll reference the original issue for what you may have already tried.

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
1 participant
You can’t perform that action at this time.