diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-02-15 19:22:35 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-02-15 19:22:35 +0530 |
commit | 9d7c52c6bba57efe895be88fd3ba6a90e66bd3a8 (patch) | |
tree | a5b934d36c3b1d99df869c33a26900135578cc80 /riscv/sim.h | |
parent | e5e64c0fa69993448d498735bfaef400aabd090b (diff) | |
download | spike-9d7c52c6bba57efe895be88fd3ba6a90e66bd3a8.zip spike-9d7c52c6bba57efe895be88fd3ba6a90e66bd3a8.tar.gz spike-9d7c52c6bba57efe895be88fd3ba6a90e66bd3a8.tar.bz2 |
Add optional support for real-time clint
This patch adds optional support clint timer incrementing at
real-time rate. This can be enabled by passing command line
parameter "--real-time-clint".
This feature can be used for:
1. Checking whether any code addition to Spike is slowing down
simulation too much
2. Comparing run-time for software on Spike with other functional
simulators (such as QEMU)
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'riscv/sim.h')
-rw-r--r-- | riscv/sim.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/riscv/sim.h b/riscv/sim.h index 44f2f92..a9d4923 100644 --- a/riscv/sim.h +++ b/riscv/sim.h @@ -22,7 +22,8 @@ class sim_t : public htif_t, public simif_t { public: sim_t(const char* isa, const char* priv, const char* varch, size_t _nprocs, - bool halted, reg_t initrd_start, reg_t initrd_end, + bool halted, bool real_time_clint, + reg_t initrd_start, reg_t initrd_end, reg_t start_pc, std::vector<std::pair<reg_t, mem_t*>> mems, std::vector<std::pair<reg_t, abstract_device_t*>> plugin_devices, const std::vector<std::string>& args, const std::vector<int> hartids, |