-
Notifications
You must be signed in to change notification settings - Fork 582
Open
Labels
Description
If I use "input reg", the resulting error message claims that I declared the variable as a wire, when I declared it as a reg. This is confusing.
I ran iverilog on this code:
module foo(input reg i, output reg o);
always @* begin
i <= o;
end
endmodule
It produces the error:
bad.v:3: error: 'i' is not a valid l-value for a procedural assignment.
bad.v:1: : 'i' is declared here as a wire.
Elaboration failed
Expected behavior: I should get an error, but the error shouldn't claim that I declared the variable as a wire when I didn't. (Presumably, the message happens because the compiler changes the variable to a wire behind the scenes.)
I'm using Icarus Verilog version 13.0 (devel) (s20250103)