csr_regfile.sv: use better signal name (CSR_MTVEC) (#2854)

Vectored instead of misleading DirVecOnly
This commit is contained in:
André Sintzoff 2025-03-21 14:56:44 +01:00 committed by GitHub
parent ebcb43a669
commit 38f44dad7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1473,12 +1473,13 @@ module csr_regfile
end
riscv::CSR_MTVEC: begin
logic DirVecOnly;
DirVecOnly = CVA6Cfg.DirectVecOnly ? 1'b0 : csr_wdata[0];
mtvec_d = {csr_wdata[CVA6Cfg.XLEN-1:2], 1'b0, DirVecOnly};
logic Vectored;
Vectored = CVA6Cfg.DirectVecOnly ? 1'b0 : csr_wdata[0];
if (!Vectored) mtvec_d = {csr_wdata[CVA6Cfg.XLEN-1:2], 1'b0, Vectored};
// we are in vector mode, this implementation requires the additional
// alignment constraint of 64 * 4 bytes
if (DirVecOnly) mtvec_d = {csr_wdata[CVA6Cfg.XLEN-1:8], 7'b0, DirVecOnly};
else
mtvec_d = {csr_wdata[CVA6Cfg.XLEN-1:8], 7'b0, Vectored};
end
riscv::CSR_MCOUNTEREN: begin
if (CVA6Cfg.RVU) mcounteren_d = {{CVA6Cfg.XLEN - 32{1'b0}}, csr_wdata[31:0]};