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");
};
精彩评论