aboutsummaryrefslogtreecommitdiff
path: root/riscv/sim.cc
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2017-10-10 15:53:23 -0700
committerTim Newsome <tim@sifive.com>2017-12-11 13:21:47 -0800
commit46a67860915391458d7cc8cb93248059df20b8f2 (patch)
tree8dad89d9c6bb72e55fd3a09676bd63fba86e94e3 /riscv/sim.cc
parent12714e371e9b8ce2efcf0e77347ed1b33c8de27b (diff)
downloadspike-46a67860915391458d7cc8cb93248059df20b8f2.zip
spike-46a67860915391458d7cc8cb93248059df20b8f2.tar.gz
spike-46a67860915391458d7cc8cb93248059df20b8f2.tar.bz2
Make progbuf a run-time option.
Also add an implicit ebreak after the program buffer. This is not part of the spec, but hopefully it will be.
Diffstat (limited to 'riscv/sim.cc')
-rw-r--r--riscv/sim.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/riscv/sim.cc b/riscv/sim.cc
index 793a2c8..81d1307 100644
--- a/riscv/sim.cc
+++ b/riscv/sim.cc
@@ -25,8 +25,10 @@ static void handle_signal(int sig)
sim_t::sim_t(const char* isa, size_t nprocs, bool halted, reg_t start_pc,
std::vector<std::pair<reg_t, mem_t*>> mems,
- const std::vector<std::string>& args, std::vector<int> const hartids)
- : htif_t(args), debug_module(this), mems(mems), procs(std::max(nprocs, size_t(1))),
+ const std::vector<std::string>& args,
+ std::vector<int> const hartids, unsigned progsize)
+ : htif_t(args), debug_module(this, progsize), mems(mems),
+ procs(std::max(nprocs, size_t(1))),
start_pc(start_pc),
current_step(0), current_proc(0), debug(false), remote_bitbang(NULL)
{