I have created the example on EDAplayground, which runs without warning.
I would not normally use widths with parameter
s and if you do you might want to be consistent with the reg definitions.
Try:
parameter data = 48'h123456789ABC;
parameter [47:0] data = 48'h123456789ABC;
I do not think I have used parameters this way before but declaring a constant reg
implies the same logic, which might avoid the warning.
reg [47:0] data = 48'h123456789ABC;
NB: It is good practise to use upper case for constants (parameter
,localparam
).
Alternatively convert to a case statement:
always @* begin
case (sel)
3'd0: data_out = 6'dx;
3'd1: data_out = 6'dx;
// ...
default : data_out = 6'd0;
endcase
end