이 오류의 의미를 이해할 수 없습니다. 내가 메모리 간단한 계산기를 만들고 싶어, 그러나이 오류가 뛰어 난 무엇Verilog "In, Out 또는 inout이 포트 목록에 나타나지 않습니다."
** Error: C:\Users\Kainy\Desktop\LOGIC\calculator\cal.v(14): In, out, or inout does not appear in port list: f1. ** Error: C:\Users\Kainy\Desktop\LOGIC\calculator\cal.v(15): In, out, or inout does not appear in port list: f2.
수단을 얻을 캔트. 내 f1, f2에 잘못된 것들이 있습니다. 어떻게 해결할 수 있습니까?
module cal(a,b,c,op,clk,reset,en,r_w);
input [3:0] a;
input [3:0] b;
input [7:0] c;
input [2:0] op;
input clk;
input reset;
input en;
input r_w;
output reg [7:0] f1;
output reg [7:0] f2;
wire [7:0] f3;
[email protected](a or b or op) begin
case(op)
3'b000: begin
f1 = a;
f3 = f1;
end
3'b001: begin
f1 = b;
f3 = f1;
end
3'b010: begin
f1 = a+b;
f3 = f1;
end
3'b011: begin
f1 = a - b;
f3 = f1;
end
3'b100: begin
f1 = a * b;
f3 = f1;
end
3'b101: begin
f1 = b+a;
f3 = f1;
end
3'b110: begin
f1 = b-a;
f3 = f1;
end
3'b111: begin
f1 = 0;
f3 = 0;
end
endcase
end
mem32 mem(clk,reset,en,r_w,c,f3,f2);
endmodule
안녕하세요, 스택 오버플로! 질문에 대한 두 가지 개선점을 제시하면 강력한 답변 기회가 크게 늘어날 것입니다. '1 :'항상 게시물에 명확한 질문 및 문제 설명을 포함하십시오. 긴 텍스트 블록이있는 경우 게시물의 끝에서 다시 말한 버전을 반복해도 괜찮습니다. '2 :'당신이 시도한 내용을 자세하게 기술하는 절을 포함 시키십시오. – Kzqai