I get an error with an array of an interface, when I try to use one single element of the array addressed by an variable index:
interface single_if;
logic [7:0] data_orig;
logic [7:0] data_modified;
modport slave (
input data_orig,
output data_modified
);
modport master (
output data_orig,
input data_modified
);
endinterface
module bus_bridge
#(
in_p = 2
)
(
single_if.master array_if_in [0:in_p-1],
input logic [$clog2(in_p)-1:0] sel,
single_if.slave single_if_out
);
assign single_if_out.data_modified = array_if_in[sel]