Updated shifter (Q5) to use proper 2**width approach and corrected the logic such that C is width bits wide, and b is 2**width (as defined in Q5 B)

This commit is contained in:
TroubleElectrical committed 2026-09-15 19:43:28 +10:00
1 parent 9d0c7011ce
commit 9583abd307
75 files changed
+1545 -3442

No files matched your search

+3 -3
View File
@@ -1,8 +1,8 @@
`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);
module shifter #(width=2)(input logic [2:0] op,
input logic[2**width-1:0] A, input logic[2**width-1:0] B, input logic[width-1:0] C,
output logic[2**width-1:0] OUT_1);
always_comb begin
case (op)