diff options
author | Jerry Zhao <jerryz123@berkeley.edu> | 2023-06-02 12:10:38 -0700 |
---|---|---|
committer | Jerry Zhao <jerryz123@berkeley.edu> | 2023-06-20 12:23:47 -0700 |
commit | 1bd44c71a13f3d8d25de112fb5346589c03e332d (patch) | |
tree | 688014cc5bf95fd740a41379336516bc2cd56aed /riscv | |
parent | 426a33e77438f956d0890391af7bb7ed9b7a20fc (diff) | |
download | spike-1bd44c71a13f3d8d25de112fb5346589c03e332d.zip spike-1bd44c71a13f3d8d25de112fb5346589c03e332d.tar.gz spike-1bd44c71a13f3d8d25de112fb5346589c03e332d.tar.bz2 |
sim_t: Merge sim_t::plugin_devices with sim_t::devices
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/sim.cc | 5 | ||||
-rw-r--r-- | riscv/sim.h | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/riscv/sim.cc b/riscv/sim.cc index 43c91f6..877d5c2 100644 --- a/riscv/sim.cc +++ b/riscv/sim.cc @@ -45,7 +45,6 @@ sim_t::sim_t(const cfg_t *cfg, bool halted, isa(cfg->isa(), cfg->priv()), cfg(cfg), mems(mems), - plugin_devices(plugin_devices), procs(std::max(cfg->nprocs(), size_t(1))), dtb_enabled(dtb_enabled), log_file(log_path), @@ -66,8 +65,10 @@ sim_t::sim_t(const cfg_t *cfg, bool halted, for (auto& x : mems) bus.add_device(x.first, x.second); - for (auto& x : plugin_devices) + for (auto& x : plugin_devices) { bus.add_device(x.first, x.second.get()); + devices.push_back(x.second); + } debug_module.add_device(&bus); diff --git a/riscv/sim.h b/riscv/sim.h index ba95666..6e69078 100644 --- a/riscv/sim.h +++ b/riscv/sim.h @@ -63,7 +63,6 @@ private: isa_parser_t isa; const cfg_t * const cfg; std::vector<std::pair<reg_t, mem_t*>> mems; - std::vector<std::pair<reg_t, std::shared_ptr<abstract_device_t>>> plugin_devices; std::vector<processor_t*> procs; std::map<size_t, processor_t*> harts; std::pair<reg_t, reg_t> initrd_range; |