Skip to content

Commit b0e5183

Browse files
committed
Relocate all Sv32 tests to RAM
1 parent 3c0dc31 commit b0e5183

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

riscof/config.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pspec=./mlogv32/mlogv32_platform.yaml
1111
target_run=1
1212
jobs=8
1313
skip_tests=
14-
reloc_tests=/Zifencei/src/Fencei.S,/pmp32/
14+
reloc_tests=/Zifencei/src/Fencei.S,/pmp32/,/vm_sv32/
1515
# change these when running the tests on another computer (FIXME: hack)
1616
host_repo_path=/Users/object/Git/mlogv32
1717
riscof_repo_path=/workspaces/mlogv32

riscof/mlogv32/env/reloc.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ENTRY(rvtest_entry_point)
33

44
MEMORY {
55
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 18M
6-
RAM (rwx) : ORIGIN = 0x80000000, LENGTH = 18M
6+
RAM (rwx) : ORIGIN = 0x80000000, LENGTH = 21M
77
}
88

99
SECTIONS

riscof/mlogv32/env/xip.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ENTRY(rvtest_entry_point)
33

44
MEMORY {
55
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 18M
6-
RAM (rwx) : ORIGIN = 0x80000000, LENGTH = 18M
6+
RAM (rwx) : ORIGIN = 0x80000000, LENGTH = 21M
77
}
88

99
__stext = 0;

riscof/mlogv32/riscof_mlogv32.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def initialise(self, suite: str, workdir: str, env: str):
8383
# runTests function
8484
self.compile_cmd = (
8585
"riscv{xlen}-unknown-elf-gcc -march={isa} \
86-
-static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -g\
86+
-static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles\
8787
-D 'MLOGV32_TEST_NAME=\"{test_name}\"'\
8888
-T "
8989
+ self.pluginpath
@@ -239,7 +239,8 @@ def get_compile_command(self, testlist: dict[str, Any], testname: str):
239239
for cmd in [
240240
compile_cmd,
241241
objcopy_cmd,
242-
objdump_cmd,
242+
# comment out objdump command to make the tests run faster
243+
"#" + objdump_cmd,
243244
]
244245
)
245246

riscof/sail_cSim/riscof_sail_cSim.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def runTests(self, testList, cgf_file=None, header_file=None):
125125

126126
elf = "ref.elf"
127127

128-
execute = "@cd " + testentry["work_dir"] + ";"
128+
execute = ""
129129

130130
cmd = (
131131
self.compile_cmd.format(testentry["isa"].lower(), self.xlen)
@@ -137,7 +137,8 @@ def runTests(self, testList, cgf_file=None, header_file=None):
137137
compile_cmd = cmd + " -D" + " -D".join(testentry["macros"])
138138
execute += compile_cmd + ";"
139139

140-
execute += self.objdump_cmd.format(elf, self.xlen, "ref.dump")
140+
# comment out objdump command to make the tests run faster
141+
execute += "#" + self.objdump_cmd.format(elf, self.xlen, "ref.dump")
141142
sig_file = os.path.join(test_dir, self.name[:-1] + ".signature")
142143
log_file = os.path.join(test_dir, test_name + ".log")
143144

@@ -179,8 +180,11 @@ def runTests(self, testList, cgf_file=None, header_file=None):
179180
execute += coverage_cmd
180181

181182
make.add_target(
182-
" \\\n&& ".join(
183-
re.sub(r" +", " ", cmd.strip())
183+
"\n\n".join(
184+
"@cd "
185+
+ testentry["work_dir"]
186+
+ "; "
187+
+ re.sub(r" +", " ", cmd.strip())
184188
for cmd in execute.split(";")
185189
if cmd.strip()
186190
)

src/config/configs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ defaults:
77
configs:
88
riscv-arch-test:
99
MEMORY_X_OFFSET: -9
10-
MEMORY_Y_OFFSET: -54
10+
MEMORY_Y_OFFSET: -57
1111
MEMORY_WIDTH: 64
1212
ROM_ROWS: 18
13-
RAM_ROWS: 18
13+
RAM_ROWS: 21
1414
ICACHE_ROWS: 2
1515

1616
micro:

0 commit comments

Comments
 (0)