I am using the Icarus compiler, and I'm doing a Mux 4:1.
The code is:
module mux (in,out,select);
input [3:0] in;
input [1:0] select;
output reg out;
always@(select or in)
begin
if (select == 2b'00)
out = in[0];
end
else if (select == 2b'01)
begin
out = in[1];
end
else if (select == 2b'10)
begin
out = in[2];
end
else if (select == 2b'11)
begin
out = in[3];
end
end
endmodule
But, I get this message from the compiler:
Is the problem because I'm using bit format inside "if" expression instead of "int" expression?
