mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-06-28 01:06:16 -04:00
[CVXIF] Initialize exception fields for RVH (#2844)
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:
parent
79c7c2c681
commit
b258d27816
2 changed files with 7 additions and 0 deletions
|
@ -22,6 +22,8 @@ module cvxif_fu
|
||||||
input logic clk_i,
|
input logic clk_i,
|
||||||
// Asynchronous reset active low - SUBSYSTEM
|
// Asynchronous reset active low - SUBSYSTEM
|
||||||
input logic rst_ni,
|
input logic rst_ni,
|
||||||
|
// Virtualization mode state - CSR_REGFILE
|
||||||
|
input logic v_i,
|
||||||
// CVXIF instruction is valid - ISSUE_STAGE
|
// CVXIF instruction is valid - ISSUE_STAGE
|
||||||
input logic x_valid_i,
|
input logic x_valid_i,
|
||||||
// Transaction ID - ISSUE_STAGE
|
// Transaction ID - ISSUE_STAGE
|
||||||
|
@ -68,6 +70,10 @@ module cvxif_fu
|
||||||
x_exception_o.cause = x_illegal_i ? riscv::ILLEGAL_INSTR : '0;
|
x_exception_o.cause = x_illegal_i ? riscv::ILLEGAL_INSTR : '0;
|
||||||
if (CVA6Cfg.TvalEn)
|
if (CVA6Cfg.TvalEn)
|
||||||
x_exception_o.tval = x_off_instr_i; // TODO Optimization : Set exception in IRO.
|
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
|
end
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
|
@ -621,6 +621,7 @@ module ex_stage
|
||||||
) cvxif_fu_i (
|
) cvxif_fu_i (
|
||||||
.clk_i,
|
.clk_i,
|
||||||
.rst_ni,
|
.rst_ni,
|
||||||
|
.v_i,
|
||||||
.x_valid_i(|x_valid_i),
|
.x_valid_i(|x_valid_i),
|
||||||
.x_trans_id_i(cvxif_data.trans_id),
|
.x_trans_id_i(cvxif_data.trans_id),
|
||||||
.x_illegal_i(x_transaction_rejected_i),
|
.x_illegal_i(x_transaction_rejected_i),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue