[CVXIF] Initialize exception fields for RVH (#2844)
Some checks are pending
bender-up-to-date / bender-up-to-date (push) Waiting to run
ci / build-riscv-tests (push) Waiting to run
ci / execute-riscv64-tests (push) Blocked by required conditions
ci / execute-riscv32-tests (push) Blocked by required conditions

Following what was done in branch_unit, I set up a default value for hypervisor exception fields in cvxif_fu.
Should fix issue #2831

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
This commit is contained in:
Guillaume Chauvon 2025-03-19 17:31:29 +01:00 committed by GitHub
parent 79c7c2c681
commit b258d27816
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -22,6 +22,8 @@ module cvxif_fu
input logic clk_i,
// Asynchronous reset active low - SUBSYSTEM
input logic rst_ni,
// Virtualization mode state - CSR_REGFILE
input logic v_i,
// CVXIF instruction is valid - ISSUE_STAGE
input logic x_valid_i,
// Transaction ID - ISSUE_STAGE
@ -68,6 +70,10 @@ module cvxif_fu
x_exception_o.cause = x_illegal_i ? riscv::ILLEGAL_INSTR : '0;
if (CVA6Cfg.TvalEn)
x_exception_o.tval = x_off_instr_i; // TODO Optimization : Set exception in IRO.
// Hypervisor exception fields
x_exception_o.tval2 = {CVA6Cfg.GPLEN{1'b0}};
x_exception_o.tinst = '0;
x_exception_o.gva = CVA6Cfg.RVH ? v_i : 1'b0;
end
endmodule

View file

@ -621,6 +621,7 @@ module ex_stage
) cvxif_fu_i (
.clk_i,
.rst_ni,
.v_i,
.x_valid_i(|x_valid_i),
.x_trans_id_i(cvxif_data.trans_id),
.x_illegal_i(x_transaction_rejected_i),