Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1275

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

Added by Christopher Russell over 1 year ago. Updated over 1 year ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Lint
% Done:

0%


Description

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?

History

#1 Updated by Wilson Snyder over 1 year ago

  • Status changed from New to Duplicate

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

#2 Updated by Christopher Russell over 1 year ago

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.

Also available in: Atom