How to pass a constant array as a module parameter?
I want to build a shift register width different shift widths. The possible shift widths should be definable via a module parameter. I tried something like the following, but this not working.
module ShiftReg
#(
SHIFT_WIDTH = '{1, 2, 4, 8},
WIDTH = $clog2($size(SHIFT_WIDTH))
)
(
...
input logic [WIDTH-1:0] shift_rate_i,
...
);
...
endmodule
This results in following error message:
** Error: shift_reg.sv(3): Illegal concatenation of an unsized constant.
Is such a generic construction of a shift register with different widths possible in SystemVerilog?