Skip to content

Commit ab0fe87

Browse files
committed
Refactor NSIM wrapper scripts for ARC ELF.
Updated arc64-elf-run to dynamically obtain NSIM options using mcpu-to-cpu-opts instead of hardcoded CPU configuration while keeping common NSIM runtime options. Replaced arc-elf32-run and arc32-elf-run with a symlink to arc64-elf-run. Signed-off-by: Luis Silva <[email protected]>
1 parent 95863b1 commit ab0fe87

File tree

3 files changed

+12
-120
lines changed

3 files changed

+12
-120
lines changed

scripts/wrapper/nsim/arc-elf32-run

Lines changed: 0 additions & 29 deletions
This file was deleted.

scripts/wrapper/nsim/arc-elf32-run

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
arc64-elf-run

scripts/wrapper/nsim/arc32-elf-run

Lines changed: 0 additions & 68 deletions
This file was deleted.

scripts/wrapper/nsim/arc32-elf-run

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
arc64-elf-run

scripts/wrapper/nsim/arc64-elf-run

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
#!/bin/bash
22

3+
opts=$(mcpu-to-cpu-opts --elf-file-path $1 --print-nsim-opts)
4+
35
nsimdrv \
4-
-on nsim_isa_enable_timer_0 \
5-
-on nsim_isa_enable_timer_1 \
6-
-off invalid_instruction_interrupt \
7-
-off memory_exception_interrupt \
8-
-on nsim_download_elf_sections \
9-
-prop=nsim_emt=1 \
10-
-p nsim_isa_family=arc64 \
11-
-p nsim_isa_div_rem_option=2 \
12-
-p nsim_isa_mpy_option=9 \
13-
-p nsim_isa_mpy64=1 \
14-
-p nsim_isa_div64_option=1 \
15-
-p nsim_isa_has_fp=1 \
16-
-p nsim_isa_fp_vec_option=1 \
17-
-p nsim_isa_fp_hp_option=1 \
18-
-p nsim_isa_fp_dp_option=1 \
19-
-p nsim_isa_fp_div_option=1 \
20-
-p nsim_isa_fp_num_regs=32 \
21-
-p nsim_isa_unaligned_option=1 \
22-
-p nsim_isa_atomic_option=1 \
23-
-p nsim_isa_fp_wide_option=1 \
24-
-p nsim_isa_shift_option=0 \
25-
-p nsim_isa_bitscan_option=0 \
26-
"$@"
6+
-on nsim_isa_enable_timer_0 \
7+
-on nsim_isa_enable_timer_1 \
8+
-off invalid_instruction_interrupt \
9+
-off memory_exception_interrupt \
10+
-on nsim_download_elf_sections \
11+
-prop=nsim_emt=1 \
12+
${opts} \
13+
"$@"

0 commit comments

Comments
 (0)