aboutsummaryrefslogtreecommitdiff
path: root/spike_main
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2022-12-29 15:38:37 -0800
committerAndrew Waterman <andrew@sifive.com>2023-01-03 16:44:42 -0800
commita11af65d0e30cd41fa25980686be701adcbb8ee0 (patch)
tree019b1f9bab166f64e6bb04b4082839356906b0d6 /spike_main
parent8d084dbd092a916a2c26d9cb7f30d5651aa3181b (diff)
downloadriscv-isa-sim-a11af65d0e30cd41fa25980686be701adcbb8ee0.zip
riscv-isa-sim-a11af65d0e30cd41fa25980686be701adcbb8ee0.tar.gz
riscv-isa-sim-a11af65d0e30cd41fa25980686be701adcbb8ee0.tar.bz2
Add --[no-]misaligned command-line options
They don't do anything yet.
Diffstat (limited to 'spike_main')
-rw-r--r--spike_main/spike-log-parser.cc1
-rw-r--r--spike_main/spike.cc3
2 files changed, 4 insertions, 0 deletions
diff --git a/spike_main/spike-log-parser.cc b/spike_main/spike-log-parser.cc
index 111e0db..41642a6 100644
--- a/spike_main/spike-log-parser.cc
+++ b/spike_main/spike-log-parser.cc
@@ -33,6 +33,7 @@ int main(int UNUSED argc, char** argv)
/*default_isa=*/DEFAULT_ISA,
/*default_priv=*/DEFAULT_PRIV,
/*default_varch=*/DEFAULT_VARCH,
+ /*default_misaligned=*/false,
/*default_endianness*/endianness_little,
/*default_pmpregions=*/16,
/*default_mem_layout=*/std::vector<mem_cfg_t>(),
diff --git a/spike_main/spike.cc b/spike_main/spike.cc
index b204091..f517ad3 100644
--- a/spike_main/spike.cc
+++ b/spike_main/spike.cc
@@ -49,6 +49,7 @@ static void help(int exit_code = 1)
fprintf(stderr, " --dc=<S>:<W>:<B> W ways, and B-byte blocks (with S and\n");
fprintf(stderr, " --l2=<S>:<W>:<B> B both powers of 2).\n");
fprintf(stderr, " --big-endian Use a big-endian memory system.\n");
+ fprintf(stderr, " --misaligned Support misaligned memory accesses\n");
fprintf(stderr, " --device=<P,B,A> Attach MMIO plugin device from an --extlib library\n");
fprintf(stderr, " P -- Name of the MMIO plugin\n");
fprintf(stderr, " B -- Base memory address of the device\n");
@@ -327,6 +328,7 @@ int main(int argc, char** argv)
/*default_isa=*/DEFAULT_ISA,
/*default_priv=*/DEFAULT_PRIV,
/*default_varch=*/DEFAULT_VARCH,
+ /*default_misaligned=*/false,
/*default_endianness*/endianness_little,
/*default_pmpregions=*/16,
/*default_mem_layout=*/parse_mem_layout("2048"),
@@ -399,6 +401,7 @@ int main(int argc, char** argv)
parser.option(0, "dc", 1, [&](const char* s){dc.reset(new dcache_sim_t(s));});
parser.option(0, "l2", 1, [&](const char* s){l2.reset(cache_sim_t::construct(s, "L2$"));});
parser.option(0, "big-endian", 0, [&](const char UNUSED *s){cfg.endianness = endianness_big;});
+ parser.option(0, "misaligned", 0, [&](const char UNUSED *s){cfg.misaligned = true;});
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);});