From 456c9e19d811ddc5da99974a40ee79a6f535a597 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sun, 5 Feb 2023 16:02:30 -0800 Subject: Make clint tolerant of discontiguous hart IDs --- riscv/devices.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'riscv/devices.h') diff --git a/riscv/devices.h b/riscv/devices.h index 6facaa3..eaa2f7a 100644 --- a/riscv/devices.h +++ b/riscv/devices.h @@ -57,7 +57,7 @@ class mem_t : public abstract_device_t { class clint_t : public abstract_device_t { public: - clint_t(std::vector&, uint64_t freq_hz, bool real_time); + clint_t(sim_t* sim, uint64_t freq_hz, bool real_time); bool load(reg_t addr, size_t len, uint8_t* bytes); bool store(reg_t addr, size_t len, const uint8_t* bytes); size_t size() { return CLINT_SIZE; } @@ -68,13 +68,13 @@ class clint_t : public abstract_device_t { typedef uint64_t mtime_t; typedef uint64_t mtimecmp_t; typedef uint32_t msip_t; - std::vector& procs; + sim_t* sim; uint64_t freq_hz; bool real_time; uint64_t real_time_ref_secs; uint64_t real_time_ref_usecs; mtime_t mtime; - std::vector mtimecmp; + std::map mtimecmp; }; #define PLIC_MAX_DEVICES 1024 -- cgit v1.1