gpt4 book ai didi

arrays - 使用线数组作为输入的语法

转载 作者:行者123 更新时间:2023-12-04 23:33:06 25 4
gpt4 key购买 nike

我有以下模块:

module add_8bit ( output wire co,
output wire [7:0] r,

input wire ci,
input wire [7:0] x,
input wire [7:0] y );

我正在尝试通过以下代码使用它:
 wire rbit [7:0];
wire onebit [7:0];
wire twocomp [7:0];

wire tco, tci;

add_8bit t9 ( tco, twocomp, tci, rbit, onebit );

由于最后一行,它不会编译,为什么?

谢谢。

最佳答案

在第二个代码片段中,您将连线声明重新置于前面。应该:

wire [7:0] rbit;
wire [7:0] onebit;
wire [7:0] twocomp;

关于arrays - 使用线数组作为输入的语法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2341824/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com