Skip to content

Commit

Permalink
]Fix bug in mcounteren.CY
Browse files Browse the repository at this point in the history
  • Loading branch information
dhower-qc committed Nov 19, 2024
1 parent b5050b0 commit e54f302
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 e54f302

Please sign in to comment.