Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
System verilog 错误(10686):文件.sv处的SystemVerilog错误(8):InstAddress具有聚合值_System Verilog - Fatal编程技术网

System verilog 错误(10686):文件.sv处的SystemVerilog错误(8):InstAddress具有聚合值

System verilog 错误(10686):文件.sv处的SystemVerilog错误(8):InstAddress具有聚合值,system-verilog,System Verilog,我正在尝试编译以下SystemVerilog,得到以下错误“error(10686):InstRom.sv处的SystemVerilog错误(8):InstAddress有一个聚合值。” 我做错了什么?InstAddress是一个位的未打包数组,而不是位向量(即压缩数组)。这同样适用于InstOut。将声明更改为 input logic [A-1:0] InstAddress, output logic [W-1:0] InstOut 而且您的代码应该可以工作。由于instr\u rom的宽度

我正在尝试编译以下SystemVerilog,得到以下错误“error(10686):InstRom.sv处的SystemVerilog错误(8):InstAddress有一个聚合值。”

我做错了什么?

InstAddress是一个的未打包数组,而不是向量(即压缩数组)。这同样适用于InstOut。将声明更改为

input logic [A-1:0] InstAddress,
output logic [W-1:0] InstOut

而且您的代码应该可以工作。

由于
instr\u rom
的宽度为
W-1:0
,因此目标变量
InstOut
必须是压缩数组。声明它为
输出逻辑[W-1:0]InstOut
。我已经按照您的建议进行了更新,但仍然收到相同的错误。请发布更新后的代码。
input logic [A-1:0] InstAddress,
output logic [W-1:0] InstOut