mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-27 23:14:27 +00:00
19 lines
348 B
Systemverilog
Executable File
19 lines
348 B
Systemverilog
Executable File
module shifter_right(input logic signed [63:0] a,
|
|
input logic [ 5:0] shamt,
|
|
output logic signed [63:0] y);
|
|
|
|
|
|
y = a >> shamt;
|
|
|
|
endmodule // shifter_right
|
|
|
|
module shifter_left(input logic signed [63:0] a,
|
|
input logic [ 5:0] shamt,
|
|
output logic signed [63:0] y);
|
|
|
|
|
|
y = a << shamt;
|
|
|
|
endmodule // shifter_right
|
|
|