有人请看一下我的代码并解释为什么我会收到这些错误。我是iverilog的新手。这是一个项目
Power_ALU.v:13 error: Unable to bind parameter 'select' in 'Power_ALU_tb.ALU8'
Power_ALU.v:13 error: Cannot evaluate genvar conditional expression: (select)==('sd0)
第 13 行是 //INCREMENT 下的第一行
这是我的代码
module PowerALU(Out,Cin,s1,s2,s3,A,B);
input [7:0] A,B;
input Cin,s1,s2,s3;
output [7:0] Out;
wire Cout,A_LT_B,A_GT_B,A_EQ_B;
wire [7:0] Sum,And,Or,Xor,Nand,Nor,Xnor;
wire select;
assign select = {s3,s2,s1,Cin};
//INCREMENT
if(select == 0)
begin
assign B = 8'b00000001;
RCA8 rca1(Cout,Sum,A,B,Cin);
assign Out = Sum;
end
//TRANSFER
.
.
.
//EQ
else if(select == 14)
begin
Comparator8 comp3(A_GT_B,A_LT_B,A_EQ_B,A,B);
assign Out = {0,0,0,0,0,0,0,A_EQ_B};
end
endmodule