rescale_shift.v
Upload User: abszbd2002
Upload Date: 2020-10-12
Package Size: 33407k
Code Size: 0k
Development Platform:

VHDL

  1. module rescale_shift (IsLeftShift,shift_input,shift_len,shift_output);
  2. input IsLeftShift;
  3. input signed [21:0] shift_input;
  4. input [3:0] shift_len;
  5. output signed [21:0] shift_output;
  6. assign shift_output = (IsLeftShift == 1'b1)? (shift_input <<< shift_len):(shift_input >>> shift_len);
  7. endmodule