根据图,我在做ALU Control连接ALU。
这是我的想法,在 ALU Control 中输入作为输出。
这是我的代码
ALU 控制.v
module ALUControl( ControlSignal, outALU );
input [5:0] ControlSignal;
output [5:0] outALU;
assign outALU = ControlSignal; // output as input
generate
case ( ControlSignal )
6'd36: ALU alu( .Signal( outALU ) );
default: ;
endcase
endgenerate
endmodule
ALU.v
module ALU( Signal, a, b, Output );
input [31:0] a, b;
input [5:0] Signal;
output [31:0] Output;
......
endmodule
现在,我有 2 个错误。
ALUControl.v:8: error: Unable to bind parameter `ControlSignal' in `ALUControl'
ALUControl.v:8: error: Cannot evaluate genvar case expression: ControlSignal
我该如何解决?