Add connectivity by using the templated connect<> object. In this cascaded chain, connect the input of the first FIR filter to the subgraph input in. Then connect the output of the last FIR filter to the subgraph output out. When more than one FIR filter is present, daisy-chain their inputs and outputs together:
connect<>(in.out[0], FIR_ARRAY[0].in[0]);
if (N_FIR_FILTERS > 1) {
for (ix = 1; ix < N_FIR_FILTERS; ix++) {
connect<>(FIR_ARRAY[ix-1].out[0], FIR_ARRAY[ix].in[0]);
}
}
connect<>(FIR_ARRAY[N_FIR_FILTERS-1].out[0], out.in[0]);