Say I have 2 std_logic_vectors:
inputA : std_logic_vector(31 downto 0)
inputB: std_logic_vector(31 downto 0)
How do I shift inputA by inputB using concatenation?
I know how to shift left or right by 1 place but can’t figure out how to shift N places to the right (or left).
Note: this is a clockless circuit, and can’t use standard vhdl shift operators.
Other techniques or ideas other than concatenation would be appreciated as well.
I prefer wjl’s approach, but given you asked specifically for a method using concatenation, try this:
(It could be written to take a second
std_logic_vectorfor thenum_bitsparameter, but as it’s fundamentally a number, I’d always use a number-based type for it)