aboutsummaryrefslogtreecommitdiff
path: root/riscv
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-03-09 17:16:26 -0800
committerTim Newsome <tim@sifive.com>2016-05-23 12:12:09 -0700
commitbd17c7e5a80c21b8b7dd6be8cd24a6f89dd63bf0 (patch)
treeea18ded8e52e3c50fa7ac9c0bf901f24575fd1f5 /riscv
parent38b8c095df4555b618bd269e3a53817c91dc893d (diff)
downloadspike-bd17c7e5a80c21b8b7dd6be8cd24a6f89dd63bf0.zip
spike-bd17c7e5a80c21b8b7dd6be8cd24a6f89dd63bf0.tar.gz
spike-bd17c7e5a80c21b8b7dd6be8cd24a6f89dd63bf0.tar.bz2
Add -H to start halted.
Diffstat (limited to 'riscv')
-rw-r--r--riscv/gdbserver.cc1
-rw-r--r--riscv/sim.cc6
-rw-r--r--riscv/sim.h2
3 files changed, 6 insertions, 3 deletions
diff --git a/riscv/gdbserver.cc b/riscv/gdbserver.cc
index d188f92..ea8b7d7 100644
--- a/riscv/gdbserver.cc
+++ b/riscv/gdbserver.cc
@@ -15,6 +15,7 @@
#include "disasm.h"
#include "sim.h"
#include "gdbserver.h"
+#include "mmu.h"
template <typename T>
unsigned int circular_buffer_t<T>::size() const
diff --git a/riscv/sim.cc b/riscv/sim.cc
index f8564fb..09c8b44 100644
--- a/riscv/sim.cc
+++ b/riscv/sim.cc
@@ -20,7 +20,7 @@ static void handle_signal(int sig)
signal(sig, &handle_signal);
}
-sim_t::sim_t(const char* isa, size_t nprocs, size_t mem_mb,
+sim_t::sim_t(const char* isa, size_t nprocs, size_t mem_mb, bool halted,
const std::vector<std::string>& args)
: htif(new htif_isasim_t(this, args)), procs(std::max(nprocs, size_t(1))),
current_step(0), current_proc(0), debug(false)
@@ -43,8 +43,10 @@ sim_t::sim_t(const char* isa, size_t nprocs, size_t mem_mb,
debug_mmu = new mmu_t(this, NULL);
- for (size_t i = 0; i < procs.size(); i++)
+ for (size_t i = 0; i < procs.size(); i++) {
procs[i] = new processor_t(isa, this, i);
+ procs[i]->set_halted(halted);
+ }
rtc.reset(new rtc_t(procs));
make_config_string();
diff --git a/riscv/sim.h b/riscv/sim.h
index 7ee4020..dad32ef 100644
--- a/riscv/sim.h
+++ b/riscv/sim.h
@@ -17,7 +17,7 @@ class mmu_t;
class sim_t
{
public:
- sim_t(const char* isa, size_t _nprocs, size_t mem_mb,
+ sim_t(const char* isa, size_t _nprocs, size_t mem_mb, bool halted,
const std::vector<std::string>& htif_args);
~sim_t();