Generate illegal exception when accessing CSR Trigger CSRs (#1577)

CSR_TSELECT, CSR_TDATA1, CSR_TDATA2, CSR_TDATA3 are not implemented yet. Gen exception when accessing these CSRs.
This commit is contained in:
JeanRochCoulon 2023-10-30 17:08:15 +01:00 committed by GitHub
parent e2a5250473
commit 73a6b84e11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -229,10 +229,10 @@ module csr_regfile
riscv::CSR_DSCRATCH0: csr_rdata = dscratch0_q;
riscv::CSR_DSCRATCH1: csr_rdata = dscratch1_q;
// trigger module registers
riscv::CSR_TSELECT: ; // not implemented
riscv::CSR_TDATA1: ; // not implemented
riscv::CSR_TDATA2: ; // not implemented
riscv::CSR_TDATA3: ; // not implemented
riscv::CSR_TSELECT: read_access_exception = 1'b1; // not implemented
riscv::CSR_TDATA1: read_access_exception = 1'b1; // not implemented
riscv::CSR_TDATA2: read_access_exception = 1'b1; // not implemented
riscv::CSR_TDATA3: read_access_exception = 1'b1; // not implemented
// supervisor registers
riscv::CSR_SSTATUS: begin
if (CVA6Cfg.RVS)
@ -674,10 +674,10 @@ module csr_regfile
riscv::CSR_DSCRATCH0: dscratch0_d = csr_wdata;
riscv::CSR_DSCRATCH1: dscratch1_d = csr_wdata;
// trigger module CSRs
riscv::CSR_TSELECT: ; // not implemented
riscv::CSR_TDATA1: ; // not implemented
riscv::CSR_TDATA2: ; // not implemented
riscv::CSR_TDATA3: ; // not implemented
riscv::CSR_TSELECT: update_access_exception = 1'b1 ; // not implemented
riscv::CSR_TDATA1: update_access_exception = 1'b1; // not implemented
riscv::CSR_TDATA2: update_access_exception = 1'b1; // not implemented
riscv::CSR_TDATA3: update_access_exception = 1'b1; // not implemented
// sstatus is a subset of mstatus - mask it accordingly
riscv::CSR_SSTATUS: begin
if (CVA6Cfg.RVS) begin