I would like to instantiate an array of systemverilog interfaces where each array element uses a different input.
If all the elements use the same input, then the instantiation is simple:
x_if x_IF[`NUM_INTERFACES](clk);
Here, if `NUM_INTERFACES
is 2
, then the clk
input goes to both x_IF[0]
and x_IF[1]
.
But if I also have
reg clk[`NUM_INTERFACES];
how do I instantiate x_IF
so that clk[0]
is input to x_IF[0]
and clk[1]
is input to x_IF[1]
?
This is a simple example; I am looking forward to implement this in some sort of loop (probably using generate
) for an array of 12 interfaces.