I have the same question as here: How to truncate an expression bit width in Verilog?
But I was hoping that in 2023, there would be more interesting answers that in 2013!
My specific use-case:
localparam logic [31:0] BAR0_OFFSET_MASK = {32{1'b1}} << (10);
Some tools complains that LHS is 32 whereas RHS is 42, and I would like to select part of the result of the shift operation without creating a temporary variable or a function.