I have two input vectors
wire [4:0] pow;
wire [12:0] number;
and one output vector
wire [43:0] result;
As a result,
result = number * (2 ^ pow)
in programming it will be equivalent of shifting number
pow
times left. What could be the fastest and least consuming circuit for this task, and how to describe it in Verilog?
Edit: I want to emphasize that question is not only about how to put what I need into Verilog, but also explain what happens behind in synthesis. If writing result = number << pow;
as @dave_59 advised causes allocation of thousands of wires and logic elements, I would probably consider synchronous sequential shifter.
Edit1: What I need may be implemented by barrel shifter explained here, but it does not detail how much resources it will take in addition to second size of data_in
.