Programmable Right Shift
Programmable bitwise right shift operation. Shifts all bits of the input binary number to the right by a dynamically programmable amount via the SHIFT input port. Supports both logical (zero-fill) and arithmetic (sign-extend) modes. Optionally latched output. Non-time-multiplexed version.
Introduction
This block performs a programmable right shift operation on standard (non-TM) data streams. The shift amount is dynamically controlled via the integer SHIFT input port.
Supports both:
- Logical shift (Preserve Sign = false): Zero-fill
- Arithmetic shift (Preserve Sign = true): Sign-extend
Pin Description
Properties
Set the input word size in bits
Default: 32
Range: 2 – 16384
Number of maximum bit to be shifted
Default: 16
Range: 1 – 64
Select if keep sign bit in the output
- false: Logical shift (zero-fill)
- true: Arithmetic shift (sign-extend)
Default: False
Select if latch the output. This will improve the performance but insert one clock cycle delay
- false: Combinational output (0 latency)
- true: Registered output (1 latency)
Default: True
Functional description
Implements a programmable barrel shifter (right shift) in VHDL.
Shift modes
- Preserve Sign = false: Logical shift (zero-fill MSBs)
- Preserve Sign = true: Arithmetic shift (sign-extend MSBs)
Latency modes
- Latch Output = false: Combinational, latency = 0
- Latch Output = true: Registered, latency = 1 clock cycle
Timing
Latency depends on Latch Output property: 0 or 1 clock cycles.