One (standard) method is to use ieee.numeric_std
and resize()
. e.g.:
muxSOut <= std_logic_vector(resize(unsigned(shamt), 32)) ...
One advantage of this is that you can replace 32
with muxSOut'length
, and then your code becomes a bit more flexible.