From e54f302110f21743103800aadb8ba88c3dec1bd5 Mon Sep 17 00:00:00 2001 From: Derek Hower Date: Tue, 19 Nov 2024 08:52:45 -0800 Subject: [PATCH] ]Fix bug in mcounteren.CY --- arch/csr/I/mcounteren.layout | 4 ++-- arch/csr/I/mcounteren.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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;