Skip to content

Commit fcece99

Browse files
committed
arcv: Add support for riscv targets in nSIM setup.
Modified the nSIM setup logic to call setup_sim riscv when targeting ARCV. It returns a simulator named with the target alias and a "-run" suffix (for example, riscv64-unknown-elf-run), which can serve as a wrapper for the simulator. For non-ARCv targets, retain the previous behavior of setting the sim board info directly. Signed-off-by: Luis Silva <[email protected]>
1 parent 3b71c6a commit fcece99

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dejagnu/baseboards/arc-sim-nsimdrv.exp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,9 @@ if {[check_target_arc64_64]} {
216216
-p nsim_isa_core=3 \
217217
-on nsim_isa_sat
218218
} elseif {[check_target_arcv]} {
219-
set ext \
220-
"-all.i.zicsr.zifencei.zihintpause.b.zca.zcb.zcmp.zcmt.a.m.zbb.zba.zbs"
221-
lappend nsim_flags \
222-
-p nsim_isa_family=rv32 \
223-
-p nsim_isa_ext=${ext} \
224-
-p nsim_semihosting=1 \
225-
-off=enable_exceptions
219+
# Not used. The ARCV nSIM configuration is done through a wrapper.
220+
# The simulator name is defined by "setup_sim riscv" which will be
221+
# the target alias name with "-run" suffix. (e.g., riscv64-unknown-elf-run)
226222
} else {
227223
perror "Unknown CPU configuration"
228224
}
@@ -292,7 +288,11 @@ if {[info exists env(ARC_NSIM_OPTS) ]} {
292288
}
293289

294290
# Setup nSIM.
295-
set_board_info sim "$nsim_bin [join $nsim_flags]"
291+
if {[check_target_arcv]} {
292+
setup_sim riscv
293+
} else {
294+
set_board_info sim "$nsim_bin [join $nsim_flags]"
295+
}
296296
# is_simulator should be set already by 'load_generic_config "sim"'. Do it here
297297
# to be safe.
298298
set_board_info is_simulator 1

0 commit comments

Comments
 (0)