【发布时间】:2022-01-16 13:53:36
【问题描述】:
在SomeModule 中,想要创建一个输出hitOut,它是每个参数化实例SomeSubModule 的hit 输出的逻辑或:
some_sub_module.v
module SomeSubModule(
hit
);
output reg hit;
some_module.v
module SomeModule(
hitOut
);
parameter INSTANCE_COUNT = 2;
output reg hitOut;
SomeSubModule subModule [INSTANCE_COUNT-1:0] (
// NOTE: Here, I want the value of hitOut to be the logical
// OR of every instanced submodule's output `hit`
// ie:
// hitOut <= subModule[1].hit | ... | subModule[INSTANCE_COUNT-1].hit
.hit(hitOut)
);
【问题讨论】: