I am trying to achieve this and during elab i see error : Illegal range in part select
logic [1:0] buffer_value;
logic [1:0] temp;
logic [23:0] pad;
logic [23:0] shift_out;
always_comb
begin
temp = buffer_value;
pad = {shift_out[temp*8-1:0], shift_reg[(3-temp)*8-1:0]};
end
i understand the issue that SV is unable to comeup with the range because of using variable on shift_out size. Is there a way to do this. Thanks