Skip to content

Commit

Permalink
Ignore upper x-regs instead of reading zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
meiniKi committed Apr 4, 2024
1 parent 165295a commit e2a8cb5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions rtl/fazyrv_rf_lut.sv
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,18 @@ module fazyrv_rf_lut #( parameter CHUNKSIZE=2 )
// by only shifting rs1, rs2, and rd
// r0 will be optimized by the tools

logic [CHUNKSIZE-1:0] rdat [32];
logic [31:0] we;

`ifdef TT06_SKY130_RVE
logic [CHUNKSIZE-1:0] rdat [16];
assign ra_o = rdat[rs1_i[3:0]];
assign rb_o = rdat[rs2_i[3:0]];
`else
logic [CHUNKSIZE-1:0] rdat [32];
assign ra_o = rdat[rs1_i];
assign rb_o = rdat[rs2_i];
`endif


`ifdef RISCV_FORMAL
logic [31:0] dbg [32];
Expand All @@ -85,9 +92,6 @@ generate
genvar i;
assign rdat[0] = 32'b0;
`ifdef TT06_SKY130_RVE
for (i=TT06_SKY130_RVE_NR_X_REGS; i<32; i=i+1) begin
assign rdat[i] = 32'b0;
end
for (i=1; i<TT06_SKY130_RVE_NR_X_REGS; i=i+1)
`else
for (i=1; i<32; i=i+1)
Expand Down

0 comments on commit e2a8cb5

Please sign in to comment.