Use correct fault type for VLSU overflow (#2273)

This commit is contained in:
Michael Platzer 2024-06-19 21:31:00 +02:00 committed by GitHub
parent 89568b0c10
commit 318be6dcde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -601,7 +601,7 @@ module load_store_unit
if (CVA6Cfg.MmuPresent && en_ld_st_translation_i && lsu_ctrl.overflow) begin
if (lsu_ctrl.fu == LOAD) begin
misaligned_exception.cause = riscv::LD_ACCESS_FAULT;
misaligned_exception.cause = riscv::LOAD_PAGE_FAULT;
misaligned_exception.valid = 1'b1;
if (CVA6Cfg.TvalEn)
misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr};
@ -612,7 +612,7 @@ module load_store_unit
end
end else if (lsu_ctrl.fu == STORE) begin
misaligned_exception.cause = riscv::ST_ACCESS_FAULT;
misaligned_exception.cause = riscv::STORE_PAGE_FAULT;
misaligned_exception.valid = 1'b1;
if (CVA6Cfg.TvalEn)
misaligned_exception.tval = {{CVA6Cfg.XLEN - CVA6Cfg.VLEN{1'b0}}, lsu_ctrl.vaddr};