diff options
Diffstat (limited to 'riscv/sim.h')
-rw-r--r-- | riscv/sim.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/riscv/sim.h b/riscv/sim.h index 91aedab..eee24e5 100644 --- a/riscv/sim.h +++ b/riscv/sim.h @@ -29,7 +29,8 @@ public: 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, - const debug_module_config_t &dm_config, const char *log_path); + const debug_module_config_t &dm_config, const char *log_path, + bool dtb_enabled, const char *dtb_file); ~sim_t(); // run the simulation to completion @@ -46,9 +47,6 @@ public: void configure_log(bool enable_log, bool enable_commitlog); void set_procs_debug(bool value); - void set_dtb_enabled(bool value) { - this->dtb_enabled = value; - } void set_remote_bitbang(remote_bitbang_t* remote_bitbang) { this->remote_bitbang = remote_bitbang; } @@ -68,6 +66,9 @@ private: reg_t initrd_end; reg_t start_pc; std::string dts; + std::string dtb; + std::string dtb_file; + bool dtb_enabled; std::unique_ptr<rom_device_t> boot_rom; std::unique_ptr<clint_t> clint; bus_t bus; @@ -83,7 +84,6 @@ private: bool debug; bool histogram_enabled; // provide a histogram of PCs bool log; - bool dtb_enabled; remote_bitbang_t* remote_bitbang; // memory-mapped I/O routines @@ -91,6 +91,7 @@ private: bool mmio_load(reg_t addr, size_t len, uint8_t* bytes); bool mmio_store(reg_t addr, size_t len, const uint8_t* bytes); void make_dtb(); + void set_rom(); // presents a prompt for introspection into the simulation void interactive(); |