csr_regfile: Fix #261 non-setable MEIE bit (#302)

This commit is contained in:
Florian Zaruba 2019-08-19 15:03:16 +02:00 committed by GitHub
parent aa33f9c984
commit a147562cb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Added
### Changed
- Fix non-setable MEIE bit in MIE CSR
### 4.2.0 - 2019-06-04
### Added

View file

@ -488,7 +488,7 @@ module csr_regfile #(
end
// mask the register so that unsupported interrupts can never be set
riscv::CSR_MIE: begin
mask = riscv::MIP_SSIP | riscv::MIP_STIP | riscv::MIP_SEIP | riscv::MIP_MSIP | riscv::MIP_MTIP;
mask = riscv::MIP_SSIP | riscv::MIP_STIP | riscv::MIP_SEIP | riscv::MIP_MSIP | riscv::MIP_MTIP | riscv::MIP_MEIP;
mie_d = (mie_q & ~mask) | (csr_wdata & mask); // we only support supervisor and M-mode interrupts
end