diff --git a/arch/csr/I/mcounteren.layout b/arch/csr/I/mcounteren.layout index ca2fd30fd..0a53745e4 100644 --- a/arch/csr/I/mcounteren.layout +++ b/arch/csr/I/mcounteren.layout @@ -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; diff --git a/arch/csr/I/mcounteren.yaml b/arch/csr/I/mcounteren.yaml index 27bc7ff46..eb904c454 100644 --- a/arch/csr/I/mcounteren.yaml +++ b/arch/csr/I/mcounteren.yaml @@ -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;