diff options
author | Rupert Swarbrick <rswarbrick@gmail.com> | 2022-03-16 12:16:14 +0000 |
---|---|---|
committer | Rupert Swarbrick <rswarbrick@gmail.com> | 2022-03-18 15:31:22 +0000 |
commit | 4ce0b5aef17804ea8534a9d6d958d91f0c574f93 (patch) | |
tree | 79a653046c372f4398d478ead511cbc42076fe6b /riscv | |
parent | c13e33a363cf341e12b39366b740cb3e35bca69e (diff) | |
download | spike-4ce0b5aef17804ea8534a9d6d958d91f0c574f93.zip spike-4ce0b5aef17804ea8534a9d6d958d91f0c574f93.tar.gz spike-4ce0b5aef17804ea8534a9d6d958d91f0c574f93.tar.bz2 |
Fold isa parameter into cfg_t
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/cfg.h | 7 | ||||
-rw-r--r-- | riscv/sim.cc | 5 | ||||
-rw-r--r-- | riscv/sim.h | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/riscv/cfg.h b/riscv/cfg.h index 26a68b5..e0b9dcc 100644 --- a/riscv/cfg.h +++ b/riscv/cfg.h @@ -29,15 +29,18 @@ class cfg_t { public: cfg_t(std::pair<reg_t, reg_t> default_initrd_bounds, - const char *default_bootargs, size_t default_nprocs) + const char *default_bootargs, size_t default_nprocs, + const char *default_isa) : initrd_bounds(default_initrd_bounds), bootargs(default_bootargs), - nprocs(default_nprocs) + nprocs(default_nprocs), + isa(default_isa) {} cfg_arg_t<std::pair<reg_t, reg_t>> initrd_bounds; cfg_arg_t<const char *> bootargs; cfg_arg_t<size_t> nprocs; + cfg_arg_t<const char *> isa; }; #endif diff --git a/riscv/sim.cc b/riscv/sim.cc index b0cfe8f..39c6525 100644 --- a/riscv/sim.cc +++ b/riscv/sim.cc @@ -28,8 +28,7 @@ static void handle_signal(int sig) signal(sig, &handle_signal); } -sim_t::sim_t(const cfg_t *cfg, - const char* isa_string, const char* priv, const char* varch, +sim_t::sim_t(const cfg_t *cfg, const char* priv, const char* varch, bool halted, bool real_time_clint, reg_t start_pc, std::vector<std::pair<reg_t, mem_t*>> mems, std::vector<std::pair<reg_t, abstract_device_t*>> plugin_devices, @@ -43,7 +42,7 @@ sim_t::sim_t(const cfg_t *cfg, #endif FILE *cmd_file) // needed for command line option --cmd : htif_t(args), - isa(isa_string, priv), + isa(cfg->isa(), priv), cfg(cfg), mems(mems), plugin_devices(plugin_devices), diff --git a/riscv/sim.h b/riscv/sim.h index 5cd4c20..84abada 100644 --- a/riscv/sim.h +++ b/riscv/sim.h @@ -32,8 +32,7 @@ class remote_bitbang_t; class sim_t : public htif_t, public simif_t { public: - sim_t(const cfg_t *cfg, - const char* isa, const char* priv, const char* varch, + sim_t(const cfg_t *cfg, const char* priv, const char* varch, bool halted, bool real_time_clint, reg_t start_pc, std::vector<std::pair<reg_t, mem_t*>> mems, std::vector<std::pair<reg_t, abstract_device_t*>> plugin_devices, |