Shift/rotate an 8-bit word by a variable amount (0β7). Supports logical left/right, arithmetic right, rotate left/right, and pass-through.
Requirements
univ_barrel8x[7:0], sh[2:0], mode[2:0]y[7:0]Behavior
x[7:0], sh[2:0], mode[2:0]y[7:0]3'b000 β PASS3'b001 β LSL (logical left)3'b010 β LSR (logical right)3'b011 β ASR (arithmetic right, sign-extend)3'b100 β ROL (rotate left)3'b101 β ROR (rotate right)3'b110/111 β reserved (treat as PASS in reference)