Skip to content

Commit

Permalink
Merge pull request #283 from riscv-software-src/mcounteren
Browse files Browse the repository at this point in the history
Fix bug in mcounteren.CY
  • Loading branch information
dhower-qc authored Nov 19, 2024
2 parents b5050b0 + e54f302 commit c538d80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/csr/I/mcounteren.layout
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ fields:
When `hcounteren.CY` && `scounteren.CY` are both set, `cycle` is futher accessible to VU-mode.
<%%- end -%>
type(): |
if (MCOUNTENABLE_EN[2]) {
if (MCOUNTENABLE_EN[0]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
}
reset_value(): |
if (MCOUNTENABLE_EN[2]) {
if (MCOUNTENABLE_EN[0]) {
return UNDEFINED_LEGAL;
} else {
return 0;
Expand Down
4 changes: 2 additions & 2 deletions arch/csr/I/mcounteren.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ fields:
When `hcounteren.CY` && `scounteren.CY` are both set, `cycle` is futher accessible to VU-mode.
<%- end -%>
type(): |
if (MCOUNTENABLE_EN[2]) {
if (MCOUNTENABLE_EN[0]) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RO;
}
reset_value(): |
if (MCOUNTENABLE_EN[2]) {
if (MCOUNTENABLE_EN[0]) {
return UNDEFINED_LEGAL;
} else {
return 0;
Expand Down

0 comments on commit c538d80

Please sign in to comment.