diff options
author | Jerry Zhao <jerryz123@berkeley.edu> | 2022-10-14 11:31:21 -0700 |
---|---|---|
committer | Andrew Waterman <aswaterman@gmail.com> | 2022-10-14 15:37:39 -0700 |
commit | 7e8d1e6f29a0e6b9f8b1b65a88b5dc87c25a4f9a (patch) | |
tree | d57d96dac7923e5443029f2077c315f821e1dd0d /spike_main/spike.cc | |
parent | 26c6795f2f72a369c5c192a5d53643b9558a2691 (diff) | |
download | spike-7e8d1e6f29a0e6b9f8b1b65a88b5dc87c25a4f9a.zip spike-7e8d1e6f29a0e6b9f8b1b65a88b5dc87c25a4f9a.tar.gz spike-7e8d1e6f29a0e6b9f8b1b65a88b5dc87c25a4f9a.tar.bz2 |
Support command-line configuration of number of pmpregions
Diffstat (limited to 'spike_main/spike.cc')
-rw-r--r-- | spike_main/spike.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spike_main/spike.cc b/spike_main/spike.cc index ecce0c5..933f626 100644 --- a/spike_main/spike.cc +++ b/spike_main/spike.cc @@ -36,6 +36,7 @@ static void help(int exit_code = 1) fprintf(stderr, " --log=<name> File name for option -l\n"); fprintf(stderr, " --debug-cmd=<name> Read commands from file (use with -d)\n"); fprintf(stderr, " --isa=<name> RISC-V ISA string [default %s]\n", DEFAULT_ISA); + fprintf(stderr, " --pmpregions=<n> Number of PMP regions [default 16]\n"); fprintf(stderr, " --priv=<m|mu|msu> RISC-V privilege modes supported [default %s]\n", DEFAULT_PRIV); fprintf(stderr, " --varch=<name> RISC-V Vector uArch string [default %s]\n", DEFAULT_VARCH); fprintf(stderr, " --pc=<address> Override ELF entry point\n"); @@ -286,6 +287,7 @@ int main(int argc, char** argv) /*default_isa=*/DEFAULT_ISA, /*default_priv=*/DEFAULT_PRIV, /*default_varch=*/DEFAULT_VARCH, + /*default_pmpregions=*/16, /*default_mem_layout=*/parse_mem_layout("2048"), /*default_hartids=*/std::vector<int>(), /*default_real_time_clint=*/false); @@ -357,6 +359,7 @@ int main(int argc, char** argv) parser.option(0, "l2", 1, [&](const char* s){l2.reset(cache_sim_t::construct(s, "L2$"));}); parser.option(0, "log-cache-miss", 0, [&](const char UNUSED *s){log_cache = true;}); parser.option(0, "isa", 1, [&](const char* s){cfg.isa = s;}); + parser.option(0, "pmpregions", 1, [&](const char* s){cfg.pmpregions = atoul_safe(s);}); parser.option(0, "priv", 1, [&](const char* s){cfg.priv = s;}); parser.option(0, "varch", 1, [&](const char* s){cfg.varch = s;}); parser.option(0, "device", 1, device_parser); |