입니다ModelSim을 등록 그래서 내가 오류를 얻고 불법 오류
** 오류 : C : /Modeltech_pe_edu_10.3c/examples/HW6/alu.v (53) : 등록 연속의 왼쪽에 불법 할당
[할당 결과 = 32'd0;] 할당 문에 대한 이유는 무엇입니까? 나는 모든 코드 주위에서 문장의 클러스터를 움직여 보았고, 코드의 일부를 완전히 제거하면 작동하는 유일한 방법이다.
문제 내 테스트 벤치를 실행하는 데 필요한 것이 있습니다. 이 오류의 의미와 해결 방법에 대한 아이디어가 있습니까?
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
module alu
(
//--------------------------
// Input Ports
//--------------------------
input [31:0] operand0,
input [31:0] operand1,
input [3:0] control,
//--------------------------
// Output Ports
//--------------------------
output reg [31:0] result,
output zero,
output overflow
);
//--------------------------
// Bidirectional Ports
//--------------------------
// < Enter Bidirectional Ports in Alphabetical Order >
// None
///////////////////////////////////////////////////////////////////
// Begin Design
///////////////////////////////////////////////////////////////////
assign result = 32'd0;
assign zero = 1'b1;
assign overflow = 1'b0;
always @(*)
begin
case(control)
4'b0000: result = operand0 && operand1;
4'b0001: result = operand0 || operand1;
4'b0010: result = operand0^operand1;
4'b0011: result = !(operand0 || operand1);
4'b0100: result = operand0 + operand1;
4'b0110: result = operand0 - operand1;
4'b1000: result = operand0 < operand1;
4'b1001: result = operand0 << operand1;
4'b1010: result = operand0 >> operand1;
4'b1011: result = operand0 >>> operand1;
endcase
end
endmodule