【发布时间】:2021-05-02 08:23:07
【问题描述】:
XYZ 接受 [1:0] 输入 和 QRS 输入 [2:0]。所以在声明 XYZ 时在 QRS 中,如何将 QRS a[1] 和 a[0] 设置为 XYZ a 和 QRS b[1] 和 b[0] 到 XYZ b。 查看我代码中的注释清楚了解我的问题
module XYZ (
y,
a, b
);
output y;
input [1:0] a, b;
//....
endmodule
module QRS (
y,
a, b
);
output y;
input [2:0] a, b;
wire w;
XYZ xyz(w, //How to assign a[1] and a[0] to a, and same for b)
endmodule
【问题讨论】: