You can use the rotate_right()
function from numeric_std
. You can make this work for any size without a generic by just using unconstrained signals on a port. If you want, a generic can be added to force bits_in to match the size of bits_slipped.
library ieee;
ise ieee.std_logic_1164.all;
use ieee.numeric_std.all;
...
port (
bits_in : in unsigned;
tap_sel : in unsigned;
bits_slipped : out unsigned -- Must be same length as bits_in
);
...
bits_slipped <= rotate_right(bits_in, to_integer(tap_sel));