开发者

How to use instances of a module with instances' index?

For example,

m开发者_开发技巧odule MM;

MM mm[128]();

I want to get mm[i].signle1,i from 0 to 120. but I cannot use "for", and I do not want to write 120 statments.

what can I do?


You can create a list of ports and you can use a for loop:

signals : list of simple_port of bit is instance;
keep signals.size() == 128;
keep for each (s) in signals {
    s.hdl_path() == append("mm[",dec(i),"].signal1");
};
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜