aboutsummaryrefslogtreecommitdiff
path: root/riscv/sim.h
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2019-04-02 11:05:19 -0700
committerChih-Min Chao <chihmin.chao@sifive.com>2019-05-14 01:50:01 -0700
commit6dcf6d7503e0fd40e75210c76771690ff664f0d7 (patch)
treef232b51c4a8b0f41cdd7e27da433308dba253227 /riscv/sim.h
parentc6eab2df0db95df451f129fbbd32f9034b2c4857 (diff)
downloadspike-6dcf6d7503e0fd40e75210c76771690ff664f0d7.zip
spike-6dcf6d7503e0fd40e75210c76771690ff664f0d7.tar.gz
spike-6dcf6d7503e0fd40e75210c76771690ff664f0d7.tar.bz2
Implement debug hasel support (#287)
* Implement hasel/hawindow support. This should allow simultaneous resume and halt to work. * Fix anyrunning/anyhalted bits. * Add --without-hasel argument for testing. * Make halt/resume times more equal. Switching threads after every instruction executed in debug mode leads to a lot of extra instructions being executed on the "other" thread when both are really supposed to halt/resume near-simultaneously. Fixed that by adding wfi to debug_rom.S, and implementing it to switch to the other hart as well as check for JTAG input. When resuming, write the hart ID to the debug ROM so that the DM knows which hart actually resumed. (Before simultaneous resume it just assumed the current one.) Also got rid of resume symbol in debug_rom.S since it had no purpose. * Preserve Debug ROM entry points. * Make sure minstret is correct when wfi happens.
Diffstat (limited to 'riscv/sim.h')
-rw-r--r--riscv/sim.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/riscv/sim.h b/riscv/sim.h
index 30f0f6a..0ef9e46 100644
--- a/riscv/sim.h
+++ b/riscv/sim.h
@@ -25,7 +25,8 @@ public:
reg_t start_pc, std::vector<std::pair<reg_t, mem_t*>> mems,
const std::vector<std::string>& args, const std::vector<int> hartids,
unsigned progsize, unsigned max_bus_master_bits,
- bool require_authentication, suseconds_t abstract_delay_usec);
+ bool require_authentication, suseconds_t abstract_delay_usec,
+ bool support_hasel);
~sim_t();
// run the simulation to completion