一个简单问题

1 reply [最后一篇]
xufeng0218 的头像
Offline
Joined: 07/24/2010
积分: 0

module mux41(
input [1:0] S,
input [3:0] C,
output Z
);
reg Z;

always@(S or C)
begin
case(S)
2'b00: Z<=C[0];
2'b01: Z<=C[1];
2'b10: Z<=C[2];
2'b11: Z<=C[3];
endcase
end

endmodule
提示line 26 Illegal redeclaration of 'Z',那位大侠知道是怎么回事啊

昱泉 的头像
Offline
Joined: 04/08/2010
积分: 21

这个提示错误 不是因为这个模块引起的,是其他模块导致的。仔细检查一下