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
Labels
area: lint Issue involves SystemVerilog lint checking resolution: duplicate Closed; issue or pull request already exists

Comments

@veripoolbot
Copy link
Contributor


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
Copy link
Contributor Author


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
Copy link
Contributor Author


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.

@veripoolbot veripoolbot added area: lint Issue involves SystemVerilog lint checking resolution: duplicate Closed; issue or pull request already exists labels Dec 22, 2019
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: duplicate Closed; issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant