Skip to content

Commit b2cf6ba

Browse files
luismgsilvayaroslavsadin
authored andcommitted
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 6fbb6c3 commit b2cf6ba

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dejagnu/baseboards/arc-sim-nsimdrv.exp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ if {[check_target_arc64_64]} {
216216
-p nsim_isa_core=3 \
217217
-on nsim_isa_sat
218218
} elseif {[check_target_arcv]} {
219+
# Not used.
220+
# The ARCV nSIM configuration is done through a wrapper.
221+
# The wrapper/simulator name is defined by "setup_sim riscv" which will be
222+
# the target alias name with "-run" suffix. (e.g., riscv64-unknown-elf-run)
219223
set ext \
220224
"-all.i.zicsr.zifencei.zihintpause.b.zca.zcb.zcmp.zcmt.a.m.zbb.zba.zbs"
221225
lappend nsim_flags \
@@ -292,7 +296,11 @@ if {[info exists env(ARC_NSIM_OPTS) ]} {
292296
}
293297

294298
# Setup nSIM.
295-
set_board_info sim "$nsim_bin [join $nsim_flags]"
299+
if {[check_target_arcv]} {
300+
setup_sim riscv
301+
} else {
302+
set_board_info sim "$nsim_bin [join $nsim_flags]"
303+
}
296304
# is_simulator should be set already by 'load_generic_config "sim"'. Do it here
297305
# to be safe.
298306
set_board_info is_simulator 1

0 commit comments

Comments
 (0)