-
Notifications
You must be signed in to change notification settings - Fork 69
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
Fix issues with port definitions #403
Conversation
Caravel fails to build with recent Icarus Verilog versions because some of the port definitions are not valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I've been using the original syntax for years---there's nothing wrong with it, and it has no errors with other tools that read verilog. The problem is in iverilog. Version 13 has broken something.
If the ports are specified in parenthesis (called ANSI-style) after the module name this is not valid. If the ports are specified inside the module body (called non-ANSI style) it is valid. // Invalid
module test(input i);
wire i;
endmodule
// Valid
module test;
input i;
wire i;
endmodule Both the Verilog and SystemVerilog reference manuals explicitly call this out.
But considering that there is code that uses this, it might make sense to add a switch to iverilog to allow this as an anachronism. |
This syntax also fails on Verilator, so it makes sense to merge this regardless of if iverilog adds a flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax restriction is so stupidly unnecessary, it amazes me that any tool would fail to just parse this code correctly. But whatever.
@jeffdi : Please merge this. |
Is anyone still hitting this? It still seems to be an issue. and run make You get the following error when you are using the latest version of iverilog (as distributed with the OSS_CAD_Suite /root/eda//caravel_user_project/verilog/rtl/user_proj_example.v:74: error: 'io_in' has already been declared in this scope. |
Caravel fails to build with recent Icarus Verilog versions because some of the port definitions are not valid.