M
maTheMatic
Guest
HI,all
I am learning verilog. The following codes can't be compiled with
the error information "Illegal reference to net "out"" under the
Modelsim SE.
module connect(
input wire in,
output wire out
);
always
begin
#3 out <= in;
end
endmodule
Why can't I direct assign (or connect directly) the input wire to the
output wire? When I change the type of out from wire to reg,then every
thing is ok. Yes, I know the reg can't be assigned with wire type's
things, but how about wire to wire?what is the basic laws behind the
assignment?
Regards
I am learning verilog. The following codes can't be compiled with
the error information "Illegal reference to net "out"" under the
Modelsim SE.
module connect(
input wire in,
output wire out
);
always
begin
#3 out <= in;
end
endmodule
Why can't I direct assign (or connect directly) the input wire to the
output wire? When I change the type of out from wire to reg,then every
thing is ok. Yes, I know the reg can't be assigned with wire type's
things, but how about wire to wire?what is the basic laws behind the
assignment?
Regards