【发布时间】:2022-01-18 14:12:27
【问题描述】:
以下代码行val mod_subexp_array = Vec(9, Module(new SubTaylor(fepar)).io) 产生以下错误:
chisel3.package$ExpectedChiselTypeException: vec type 'AnonymousBundle(IO io in SubTaylor)' must be a Chisel type, not hardware
SubTaylor 模块是我编写的模块,我通过 IO 端口与它连接。我的目标是创建这些 SubTaylor 模块的 9 个实例,并使用它们的 IO 将它们链接在一起。为了解决上述问题,我认为可能需要将 SubTaylor 模块包装在 Wire 中:
val mod_subexp_array = Vec(9, Wire(Module(new SubTaylor(fepar))).io)
但是,错误消息更改为wire type 'AnonymousBundle(IO io in SubTaylor)' must be a Chisel type, not hardware。据我目前了解,有两种不同的 Wire 数据类型。一种线数据类型是 Chisel 类型,另一种是硬件类型。我的理解正确吗?我应该如何将 Vector 定义为 Chisel 类型?
【问题讨论】: