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

Improve detection of multiply declared signals in SV frontend #3819

Open
azonenberg opened this issue Jun 23, 2023 · 1 comment
Open

Improve detection of multiply declared signals in SV frontend #3819

azonenberg opened this issue Jun 23, 2023 · 1 comment

Comments

@azonenberg
Copy link
Contributor

azonenberg commented Jun 23, 2023

Feature Description

The current Verilog frontend does not detect cases where a signal is declared multiple times with conflicting types (often the result of changing an internal net to be a module port, but not deleting the original declaration).

Example:

module foo(input wire bar);

logic bar; //should warn but does not currently

endmodule

#3817 will detect multiple drivers if the "logic" signal is initialized while also being declared as a module port, but it seems like we should still consider this code "wrong" even if the "logic" version of bar is never explicitly driven.

@nakengelhardt
Copy link
Member

Only compatible declarations should pass this block, so now that conflicts with constant drivers are better detected in check this should only accept relatively "harmless" mistakes, but maybe someone can figure out how to add some checks on the declaration there.

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

No branches or pull requests

2 participants