Skip to content

Commit 86ca5ff

Browse files
ajelinskinashif
authored andcommitted
m2gl025_miv: Adjust frequencies and performance
The default frequency for this board in Renode is 66 MHz. This needs to be even with `SYS_CLOCK_HW_CYCLES_PER_SEC` to avoid such problems as in the #31726 issue. Unfortunately, the difference in these values was helpful for some tests that are failing with 66 MHz set in both places. It created artificial boost in certain circumstances. The frequencies in the default Renode platform description (`.repl`) file for MI-V were overridden with 4 MHz value that seems to be better tolerated based on testing. The `SYS_CLOCK_HW_CYCLES_PER_SEC` was adjusted as well. To solve the rest of the issues, `cpu PerformanceInMips` was set to 4. It seems tests are completed faster with such a value. This commit fixes #31726. Signed-off-by: Adam Jeliński <[email protected]>
1 parent d0be253 commit 86ca5ff

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
using "platforms/cpus/miv.repl"
4+
5+
uart:
6+
clockFrequency: 4000000
7+
8+
clint:
9+
frequency: 4000000
10+
11+
timer0:
12+
clockFrequency: 4000000
13+
14+
timer1:
15+
clockFrequency: 4000000

boards/riscv/m2gl025_miv/support/m2gl025_miv.resc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ $name?="Mi-V"
55

66
using sysbus
77
mach create $name
8-
machine LoadPlatformDescription @platforms/boards/miv-board.repl
8+
machine LoadPlatformDescription $ORIGIN/m2gl025_miv.repl
99

1010
showAnalyzer uart
11-
cpu PerformanceInMips 80
11+
cpu PerformanceInMips 4
1212

1313
macro reset
1414
"""

soc/riscv/riscv-privilege/miv/Kconfig.defconfig.series

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ config SOC_SERIES
66
default "miv"
77

88
config SYS_CLOCK_HW_CYCLES_PER_SEC
9-
default 660000
9+
default 4000000
1010

1111
config RISCV_SOC_INTERRUPT_INIT
1212
default y

0 commit comments

Comments
 (0)