Various improvement for code coverage (#2846)

decoder improvement, removing of CVXIF RAW, store_buffer improvement
This commit is contained in:
Guillaume Chauvon 2025-03-20 12:19:01 +01:00 committed by GitHub
parent 42eea3fe38
commit c87b3e6adc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 22 deletions

View file

@ -1612,7 +1612,8 @@ module decoder
instruction_o.ex.cause = (CVA6Cfg.RVH && v_i) ? riscv::ENV_CALL_VSMODE : riscv::ENV_CALL_SMODE;
end else if (priv_lvl_i == riscv::PRIV_LVL_U && CVA6Cfg.RVU) begin
instruction_o.ex.cause = riscv::ENV_CALL_UMODE;
end else if (priv_lvl_i == riscv::PRIV_LVL_M) begin
// we are in M-mode
end else begin
instruction_o.ex.cause = riscv::ENV_CALL_MMODE;
end
end else if (ebreak) begin

View file

@ -674,24 +674,6 @@ module issue_read_operands
end
end
if (CVA6Cfg.CvxifEn) begin
// Remove unecessary forward and stall in case source register is not needed by coprocessor.
if (x_issue_valid_o && x_issue_resp_i.accept) begin
if (~x_issue_resp_i.register_read[0]) begin
forward_rs1[0] = 1'b0;
stall_rs1[0] = 1'b0;
end
if (~x_issue_resp_i.register_read[1]) begin
forward_rs2[0] = 1'b0;
stall_rs2[0] = 1'b0;
end
if (OPERANDS_PER_INSTR == 3 && ~x_issue_resp_i.register_read[2]) begin
forward_rs3[0] = 1'b0;
stall_rs3[0] = 1'b0;
end
end
stall_raw[0] = x_transaction_rejected ? 1'b0 : stall_rs1[0] || stall_rs2[0] || (CVA6Cfg.NrRgprPorts == 3 && stall_rs3[0]);
end
if (CVA6Cfg.SuperscalarEn) begin
if (!issue_instr_i[1].use_zimm && (!CVA6Cfg.FpPresent || (is_rs1_fpr(

View file

@ -194,9 +194,11 @@ module store_buffer
commit_read_pointer_n = commit_read_pointer_q + 1'b1;
commit_status_cnt--;
end
end else if (commit_i && speculative_queue_q[speculative_read_pointer_q].valid && (commit_write_pointer_q == speculative_read_pointer_q) && !stall_st_pending_i) begin
obi_store_req_o.req = 1'b1;
direct_req_from_speculative = 1'b1;
end else if (speculative_queue_q[speculative_read_pointer_q].valid) begin
if (commit_i && (commit_write_pointer_q == speculative_read_pointer_q) && !stall_st_pending_i) begin
obi_store_req_o.req = 1'b1;
direct_req_from_speculative = 1'b1;
end
end
// we ignore the rvalid signal for now as we assume that the store
// happened if we got a grant