我不明白這個錯誤的含義。 我想和記憶簡單的計算器,但這個錯誤跳了出來,我不能得到什麼Verilog「In,Out,or 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
嗨,歡迎來到Stack overflow!我可以建議對您的問題進行兩項改進,這將大大增加您獲得強大答案的機會嗎? '1:'在您的帖子中始終包含明確的問題和問題描述。如果你有很長的文本塊,那麼在文章的末尾重複一個修改後的版本可能也不錯。 '2:'請在您詳細描述您嘗試過的部分中包含一個部分。 – Kzqai