PoC.arith.shifter_barrel

This Barrel-Shifter supports:

  • shifting and rotating

  • right and left operations

  • arithmetic and logic mode (only valid for shift operations)

This is equivalent to the CPU instructions: SLL, SLA, SRL, SRA, RL, RR

Entity Declaration:

 1  generic (
 2    BITS        : positive    := 32
 3  );
 4  port (
 5    Input           : in  std_logic_vector(BITS - 1 downto 0);
 6    ShiftAmount     : in  std_logic_vector(log2ceilnz(BITS) - 1 downto 0);
 7    ShiftRotate     : in  std_logic;
 8    LeftRight       : in  std_logic;
 9    ArithmeticLogic : in  std_logic;
10    Output          : out std_logic_vector(BITS - 1 downto 0)
11  );
12end entity;