Skip to content

Commit

Permalink
Issue openhwgroup#730 correction
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Gouedo <[email protected]>
  • Loading branch information
Pascal Gouedo committed Jul 25, 2023
1 parent 788caae commit 6cfb743
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions rtl/cv32e40p_id_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ module cv32e40p_id_stage
apu_read_regs[0] = regfile_addr_ra_id;
apu_read_regs_valid[0] = 1'b1;
end // OP_A_REGA_OR_FWD:
OP_A_REGB_OR_FWD: begin
OP_A_REGB_OR_FWD, OP_A_REGC_OR_FWD: begin
apu_read_regs[0] = regfile_addr_rb_id;
apu_read_regs_valid[0] = 1'b1;
end
Expand Down Expand Up @@ -847,8 +847,13 @@ module cv32e40p_id_stage
apu_read_regs_valid[2] = 1'b1;
end
OP_C_REGC_OR_FWD: begin
apu_read_regs[2] = regfile_addr_rc_id;
apu_read_regs_valid[2] = 1'b1;
if (alu_op_a_mux_sel != OP_A_REGC_OR_FWD) begin
apu_read_regs[2] = regfile_addr_rc_id;
apu_read_regs_valid[2] = 1'b1;
end else begin
apu_read_regs[2] = regfile_addr_rc_id;
apu_read_regs_valid[2] = 1'b0;
end
end
default: begin
apu_read_regs[2] = regfile_addr_rc_id;
Expand Down

0 comments on commit 6cfb743

Please sign in to comment.