小编use*_*757的帖子

使用SystemVerilog参数来确定要实例化的模块

有没有办法使用传递给父模块的参数值来选择我想要实例化的模块?以下示例

module parent ();

 parameter WORD = 1; 

 child_`WORD child (); // obviously does not work

endmodule
Run Code Online (Sandbox Code Playgroud)

如果WORD == 1,我想实例化child_1模块,for WORD == 2child_2模块,等等.当然,有人之前需要这样做吗?

verilog system-verilog

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

system-verilog ×1

verilog ×1