-
Notifications
You must be signed in to change notification settings - Fork 530
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
Failure to build with non ansi port declarations #854
Comments
LRM explicitly declares the code above as not valid
ANSI style declaration is when your port list is in parenthesis. Non-ANSI when it is as separate statements. // ANSI
module test(input i, ouput o);
...
endmodule
// Non-ANSI
module test;
input i;
output o;
...
endmodule For the latter case it is allowed to also have a I'm a bit torn here. On one hand this is breaking existing code, so it might make sense to have a compiler option to allow this. On the other hand it is clearly not allowed by the standard and not just a gray area. And other tools also will report an error. |
@larsclausen Thanks for the clarification. I just checked Verilator and it fails too, so it seems like the caravel verilog should be fixed. |
I created a PR to fix the caravel issues: efabless/caravel#403 |
As caravel has been fixed, closing as invalid. We can reconsider if we get a lot more complaints. |
In efabless/caravel#402 an update of Icarus Verilog resulted in a compile error. A cut down test case:
The error reported by iverilog:
This was bisected to 6204b78
Assuming this syntax is "non-ANSI" (I don't deal with a lot of Verilog so I wasn't 100% sure), then it looks like an issue with the parser where an implicit net type ends up marking the port as
SR_BOTH
.The text was updated successfully, but these errors were encountered: