Let's say I want to connect a bus, similar to the below, where the name of the wire includes numbering:
wire bus[500:0];
assign bus[0] = my_wire_0;
assign bus[1] = my_wire_1;
...
assign bus[500]= my_wire_500;
Is there a way to do this in a loop (generate or otherwise)? Especially interesting if the width is a parameter and not a constant.
My attempts have failed as:
1) I couldn't modify the wire name identifier at the correct part of the process
2) I tried using concatenation using macros (``), but macro elaboration is done before the loop unrolling and thus fails.