【发布时间】:2017-08-15 03:24:31
【问题描述】:
我收到如下编译错误:
错误 (10663):jdb_Blogic_v.v(7) 处的 Verilog HDL 端口连接错误: 输出或输入端口“f”必须连接到结构网络 表达
我评论了错误所在的行。我该如何解决?
我还包含了 mux2to1 功能代码。
module jdb_Blogic_v (FS2_in, FS1_in, B_in, Y_out);
input FS2_in, FS1_in;
input [3:0] B_in;
output reg [3:0] Y_out;
jdb_mux2to1_v stage0 (B_in[0], FS1_in, FS2_in, Y_out[0]); //ERROR IS HERE ACCORDING TO COMPILER
jdb_mux2to1_v stage1 (B_in[1], FS1_in, FS2_in, Y_out[1]);
jdb_mux2to1_v stage2 (B_in[2], FS1_in, FS2_in, Y_out[2]);
jdb_mux2to1_v stage3 (B_in[3], FS1_in, FS2_in, Y_out[3]);
endmodule
module jdb_mux2to1_v (s, x1, x2, f);
input x1, x2, s;
output f;
wire k, g, h;
not (k, s);
and (g, k, x1);
and (h, s, x2);
or (f, g, h);
endmodule
【问题讨论】: