aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Zhao <jerryz123@berkeley.edu>2023-01-10 12:44:42 -0800
committerJerry Zhao <jerryz123@berkeley.edu>2023-01-18 11:20:32 -0800
commit5fc4374254768f51a1b1f7a7ddca3f939dd48db1 (patch)
treefc0ab5ce0a6c34430e92de2d948f0ae8ccc34bf3
parent0b379b8be61af616182740c88fbb6f2c0d060644 (diff)
downloadriscv-isa-sim-5fc4374254768f51a1b1f7a7ddca3f939dd48db1.zip
riscv-isa-sim-5fc4374254768f51a1b1f7a7ddca3f939dd48db1.tar.gz
riscv-isa-sim-5fc4374254768f51a1b1f7a7ddca3f939dd48db1.tar.bz2
Add --triggers flag to select number of triggers
-rw-r--r--spike_main/spike.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/spike_main/spike.cc b/spike_main/spike.cc
index c874d00..8669375 100644
--- a/spike_main/spike.cc
+++ b/spike_main/spike.cc
@@ -71,6 +71,7 @@ static void help(int exit_code = 1)
fprintf(stderr, " --bootargs=<args> Provide custom bootargs for kernel [default: console=hvc0 earlycon=sbi]\n");
fprintf(stderr, " --real-time-clint Increment clint time at real-time rate\n");
fprintf(stderr, " --mmu-dirty Enable hardware management of PTE accessed and dirty bits\n");
+ fprintf(stderr, " --triggers=<n> Number of supported triggers [default 4]\n");
fprintf(stderr, " --dm-progsize=<words> Progsize for the debug module [default 2]\n");
fprintf(stderr, " --dm-sba=<bits> Debug system bus access supports up to "
"<bits> wide accesses [default 0]\n");
@@ -440,6 +441,7 @@ int main(int argc, char** argv)
parser.option(0, "bootargs", 1, [&](const char* s){cfg.bootargs = s;});
parser.option(0, "real-time-clint", 0, [&](const char UNUSED *s){cfg.real_time_clint = true;});
parser.option(0, "mmu-dirty", 0, [&](const char UNUSED *s){cfg.dirty_enabled = true;});
+ parser.option(0, "triggers", 1, [&](const char *s){cfg.trigger_count = atoul_safe(s);});
parser.option(0, "extlib", 1, [&](const char *s){
void *lib = dlopen(s, RTLD_NOW | RTLD_GLOBAL);
if (lib == NULL) {