aboutsummaryrefslogtreecommitdiff
path: root/riscv
diff options
context:
space:
mode:
authorJerry Zhao <jerryz123@berkeley.edu>2023-03-29 00:48:48 -0700
committerJerry Zhao <jerryz123@berkeley.edu>2023-03-29 00:49:23 -0700
commit41934578a4b58861e75c3cfa17a600349dce5a7d (patch)
treecc3d61c0d5604862a85a76976a6b05d8f1380ee0 /riscv
parentf9c78b8e05b0a87eb45d37f44559963ecadead34 (diff)
downloadriscv-isa-sim-41934578a4b58861e75c3cfa17a600349dce5a7d.zip
riscv-isa-sim-41934578a4b58861e75c3cfa17a600349dce5a7d.tar.gz
riscv-isa-sim-41934578a4b58861e75c3cfa17a600349dce5a7d.tar.bz2
Support zihpm && !zicntr
Diffstat (limited to 'riscv')
-rw-r--r--riscv/processor.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc
index a00d13d..153ff9d 100644
--- a/riscv/processor.cc
+++ b/riscv/processor.cc
@@ -247,7 +247,7 @@ void state_t::reset(processor_t* const proc, reg_t max_isa)
auto mcounter = std::make_shared<const_csr_t>(proc, which_mcounter, 0);
csrmap[which_mcounter] = mcounter;
- if (proc->extension_enabled_const(EXT_ZICNTR) && proc->extension_enabled_const(EXT_ZIHPM)) {
+ if (proc->extension_enabled_const(EXT_ZIHPM)) {
auto counter = std::make_shared<counter_proxy_csr_t>(proc, which_counter, mcounter);
csrmap[which_counter] = counter;
}
@@ -255,7 +255,7 @@ void state_t::reset(processor_t* const proc, reg_t max_isa)
csrmap[which_mevent] = std::make_shared<rv32_low_csr_t>(proc, which_mevent, mevent[i - 3]);;
auto mcounterh = std::make_shared<const_csr_t>(proc, which_mcounterh, 0);
csrmap[which_mcounterh] = mcounterh;
- if (proc->extension_enabled_const(EXT_ZICNTR) && proc->extension_enabled_const(EXT_ZIHPM)) {
+ if (proc->extension_enabled_const(EXT_ZIHPM)) {
auto counterh = std::make_shared<counter_proxy_csr_t>(proc, which_counterh, mcounterh);
csrmap[which_counterh] = counterh;
}