Skip to content

Commit 43a047e

Browse files
committed
[syntacore] tcl/syntacore: do not modify *counteren in HPM setup
The RISC-V Instruction Set Manual: Volume II: Privileged Architecture Version 20241101 [3.1.11. Machine Counter-Enable (mcounteren) Register] states: > The settings in this register only control accessibility. The act of reading or writing this register does not affect the underlying counters, which continue to increment even when not accessible. Therefore, there is no need to adjust it's value when setting-up HPM counters. Change-Id: I083912ce3a8762ef33f805b71baa099cbf3d6a78 Signed-off-by: Evgeniy Naydanov <[email protected]>
1 parent 033718c commit 43a047e

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

tcl/syntacore/sc_fpga_lib.tcl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,6 @@ namespace eval _SC_INTERNALS {
132132
sc_lib_print "[sc_lib_write_reg mhpmevent${EventSelector} 0]"
133133
sc_lib_print "[sc_lib_write_reg mhpmcounter${EventSelector} 0]"
134134
}
135-
set REG_LIST [reg]
136-
if {[string match "* mcounteren *" "$REG_LIST"]} {
137-
sc_lib_print "[sc_lib_write_reg mcounteren 0xffffffff]"
138-
} else {
139-
sc_lib_print "NOTE: mcounteren is not found on target"
140-
}
141-
if {[string match "* scounteren *" "$REG_LIST"]} {
142-
sc_lib_print "[sc_lib_write_reg scounteren 0xffffffff]"
143-
} else {
144-
sc_lib_print "NOTE: scounteren is not found on target"
145-
}
146135
}
147136

148137
proc sc_lib_experimental_enable_pmu_counters { selectors_list

0 commit comments

Comments
 (0)