|
|
|
@ -42,6 +42,10 @@ static void help() |
|
|
|
fprintf(stderr, " --debug-sba=<bits> Debug bus master supports up to " |
|
|
|
"<bits> wide accesses [default 0]\n"); |
|
|
|
fprintf(stderr, " --debug-auth Debug module requires debugger to authenticate\n"); |
|
|
|
fprintf(stderr, " --dmi-rti=<n> Number of Run-Test/Idle cycles " |
|
|
|
"required for a DMI access [default 0]\n"); |
|
|
|
fprintf(stderr, " --abstract-rti=<n> Number of Run-Test/Idle cycles " |
|
|
|
"required for an abstract command to execute [default 0]\n"); |
|
|
|
exit(1); |
|
|
|
} |
|
|
|
|
|
|
|
@ -98,6 +102,8 @@ int main(int argc, char** argv) |
|
|
|
unsigned progsize = 2; |
|
|
|
unsigned max_bus_master_bits = 0; |
|
|
|
bool require_authentication = false; |
|
|
|
unsigned dmi_rti = 0; |
|
|
|
unsigned abstract_rti = 0; |
|
|
|
std::vector<int> hartids; |
|
|
|
|
|
|
|
auto const hartids_parser = [&](const char *s) { |
|
|
|
@ -145,6 +151,10 @@ int main(int argc, char** argv) |
|
|
|
[&](const char* s){max_bus_master_bits = atoi(s);}); |
|
|
|
parser.option(0, "debug-auth", 0, |
|
|
|
[&](const char* s){require_authentication = true;}); |
|
|
|
parser.option(0, "dmi-rti", 1, |
|
|
|
[&](const char* s){dmi_rti = atoi(s);}); |
|
|
|
parser.option(0, "abstract-rti", 1, |
|
|
|
[&](const char* s){abstract_rti = atoi(s);}); |
|
|
|
|
|
|
|
auto argv1 = parser.parse(argv); |
|
|
|
std::vector<std::string> htif_args(argv1, (const char*const*)argv + argc); |
|
|
|
@ -155,9 +165,11 @@ int main(int argc, char** argv) |
|
|
|
help(); |
|
|
|
|
|
|
|
sim_t s(isa, nprocs, halted, start_pc, mems, htif_args, std::move(hartids), |
|
|
|
progsize, max_bus_master_bits, require_authentication); |
|
|
|
progsize, max_bus_master_bits, require_authentication, |
|
|
|
abstract_rti); |
|
|
|
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)); |
|
|
|
std::unique_ptr<jtag_dtm_t> jtag_dtm( |
|
|
|
new jtag_dtm_t(&s.debug_module, dmi_rti)); |
|
|
|
if (use_rbb) { |
|
|
|
remote_bitbang.reset(new remote_bitbang_t(rbb_port, &(*jtag_dtm))); |
|
|
|
s.set_remote_bitbang(&(*remote_bitbang)); |
|
|
|
|