S
Sen-Lung Chen
Guest
Dear All:
I have a question about Verilog.I write a code as below.But it fails
in compile.
reg [4:0]Conf_reg;
reg [1:0]Mux_reg;
always@(Conf_reg)
begin
casex(Conf_reg)
5'bxxxx1: Mux_reg = 2'b11;
5'bxxx10: Mux_reg = 2'b10;
5'bxx100: Mux_reg = 2'b01;
default : Mux_reg = 2'b00;
endcase
end
endmodule
the error message is
Error! Illegal left-hand-side assignment [Verilog-ILHSA]
"re_LFSR.v", 87: Mux_reg = 2'b11;
How should I fix it?..
Thanks a lot for your help.
I have a question about Verilog.I write a code as below.But it fails
in compile.
reg [4:0]Conf_reg;
reg [1:0]Mux_reg;
always@(Conf_reg)
begin
casex(Conf_reg)
5'bxxxx1: Mux_reg = 2'b11;
5'bxxx10: Mux_reg = 2'b10;
5'bxx100: Mux_reg = 2'b01;
default : Mux_reg = 2'b00;
endcase
end
endmodule
the error message is
Error! Illegal left-hand-side assignment [Verilog-ILHSA]
"re_LFSR.v", 87: Mux_reg = 2'b11;
How should I fix it?..
Thanks a lot for your help.