我有以下综合问题:
// Variable instantiation
read_port_if #() mem_rp [N_INST*2] (); // Memory read port interface (each element in array is a single readport)
// module instantiation
memory #(
.N_RPORT(N_INST*2)
) modMem (.*,
.rPort(mem_rp)
);
generate
for (genvar iInst=0;iInst<N_INST;iInst++) begin
accelerator #(
.I_INST(iInst),
.N_INST(N_INST)
) accelerator (.*,
.mod_rp(mem_rp[(iInst*2)+:2]) // Expects an read port array of size 2
);
end
endgenerate这段代码功能齐全,但是合成抱怨道:“不支持'Interface Array Slice Indexing‘结构”。
如何在不切分接口的情况下将这个子数组传递给模块?我不希望像在this blog post中那样重写我的接口来允许切片,因为这会花费很多时间。
提前感谢!
发布于 2020-06-24 20:21:27
你有没有尝试过创建一个中间信号,而不是切入端口?一些verilog模拟器在这方面有问题(例如VCS和Questa )。
// module instantiation
memory #(
.N_RPORT(N_INST*2)
) modMem (.*,
.rPort(mem_rp)
);
generate
for (genvar iInst=0;iInst<N_INST;iInst++) begin
wire mem_rp_sliced = mem_rp[(iInst*2)+:2];
accelerator #(
.I_INST(iInst),
.N_INST(N_INST)
) accelerator (.*,
.mod_rp(mem_rp_sliced) // Expects an read port array of size 2
);
end
endgeneratehttps://stackoverflow.com/questions/43564963
复制相似问题