Added all Testbenches to Modelsim and confirmed working operation

This commit is contained in:
TroubleElectrical committed 2026-09-15 15:15:00 +10:00
1 parent c4ebde7692
commit 05361dcf70
349 files changed
+15719 -1096

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
`ifndef SHIFTER_H_SV
`define SHIFTER_H_SV
module shifter #(width=8)(input logic [2:0] op,
input logic[width-1:0] A, input logic[width-1:0] C, input logic[$clog2(width)-1:0] B,
output logic[width-1:0] OUT_1);
always_comb begin
case (op)
3'b000: OUT_1 = A << C;
3'b001: OUT_1 = A >> C;
3'b011: OUT_1 = $signed(A) >>> C;
3'b100: OUT_1 = A << B;
3'b101: OUT_1 = A >> B;
3'b111: OUT_1 = $signed(A) >>> B;
default:OUT_1 = A;
endcase
end
endmodule
`endif