diff options
author | Tim Newsome <tim@sifive.com> | 2018-02-01 14:32:00 -0800 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2018-02-01 14:32:00 -0800 |
commit | b2672e5d5271b346a71ec33ab42c88437b9b60d1 (patch) | |
tree | 33b6e163c6e3d5c45bdbacb0fbda86f3a7b51abc /spike_main | |
parent | d3d3681f3468c633bc93a727a35bc07348245440 (diff) | |
download | spike-b2672e5d5271b346a71ec33ab42c88437b9b60d1.zip spike-b2672e5d5271b346a71ec33ab42c88437b9b60d1.tar.gz spike-b2672e5d5271b346a71ec33ab42c88437b9b60d1.tar.bz2 |
Add --debug-sba option
This lets the user control whether the system bus access implements bus
mastering.
Diffstat (limited to 'spike_main')
-rw-r--r-- | spike_main/spike.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spike_main/spike.cc b/spike_main/spike.cc index d3caa22..f77d488 100644 --- a/spike_main/spike.cc +++ b/spike_main/spike.cc @@ -37,6 +37,8 @@ static void help() fprintf(stderr, " --rbb-port=<port> Listen on <port> for remote bitbang connection\n"); fprintf(stderr, " --dump-dts Print device tree string and exit\n"); fprintf(stderr, " --progsize=<words> progsize for the debug module [default 2]\n"); + fprintf(stderr, " --debug-sba=<bits> debug bus master supports up to " + "<bits> wide accesses [default 0]\n"); exit(1); } @@ -89,6 +91,7 @@ int main(int argc, char** argv) uint16_t rbb_port = 0; bool use_rbb = false; unsigned progsize = 2; + unsigned max_bus_master_bits = 0; std::vector<int> hartids; auto const hartids_parser = [&](const char *s) { @@ -130,6 +133,8 @@ int main(int argc, char** argv) } }); parser.option(0, "progsize", 1, [&](const char* s){progsize = atoi(s);}); + parser.option(0, "debug-sba", 1, + [&](const char* s){max_bus_master_bits = atoi(s);}); auto argv1 = parser.parse(argv); std::vector<std::string> htif_args(argv1, (const char*const*)argv + argc); @@ -137,7 +142,7 @@ int main(int argc, char** argv) mems = make_mems("2048"); sim_t s(isa, nprocs, halted, start_pc, mems, htif_args, std::move(hartids), - progsize); + progsize, max_bus_master_bits); std::unique_ptr<remote_bitbang_t> remote_bitbang((remote_bitbang_t *) NULL); std::unique_ptr<jtag_dtm_t> jtag_dtm(new jtag_dtm_t(&s.debug_module)); if (use_rbb) { |