diff options
author | Jerry Zhao <jerryz123@berkeley.edu> | 2023-06-02 09:27:09 -0700 |
---|---|---|
committer | Jerry Zhao <jerryz123@berkeley.edu> | 2023-06-20 12:23:47 -0700 |
commit | 6456b5ad25a2b7efb6c4f9ccd28e00a5408eb743 (patch) | |
tree | 451ec9fefeb328bf6014763a717024a075326fe0 | |
parent | e733a70d0565bcee9aeba27b654df1a52dff08fe (diff) | |
download | riscv-isa-sim-6456b5ad25a2b7efb6c4f9ccd28e00a5408eb743.zip riscv-isa-sim-6456b5ad25a2b7efb6c4f9ccd28e00a5408eb743.tar.gz riscv-isa-sim-6456b5ad25a2b7efb6c4f9ccd28e00a5408eb743.tar.bz2 |
sim_t: Remove boot_rom/ns16550 members of sim_t
These are redundant with sim_t::devices
-rw-r--r-- | riscv/sim.cc | 6 | ||||
-rw-r--r-- | riscv/sim.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/riscv/sim.cc b/riscv/sim.cc index 9d0bfb8..4fa49b2 100644 --- a/riscv/sim.cc +++ b/riscv/sim.cc @@ -145,8 +145,8 @@ sim_t::sim_t(const cfg_t *cfg, bool halted, if (fdt_parse_ns16550(fdt, &ns16550_base, &ns16550_shift, &ns16550_io_width, "ns16550a") == 0) { assert(intctrl); - ns16550.reset(new ns16550_t(&bus, intctrl, NS16550_INTERRUPT_ID, - ns16550_shift, ns16550_io_width)); + std::shared_ptr<ns16550_t> ns16550(new ns16550_t(&bus, intctrl, NS16550_INTERRUPT_ID, + ns16550_shift, ns16550_io_width)); bus.add_device(ns16550_base, ns16550.get()); devices.push_back(ns16550); } @@ -377,7 +377,7 @@ void sim_t::set_rom() const int align = 0x1000; rom.resize((rom.size() + align - 1) / align * align); - boot_rom.reset(new rom_device_t(rom)); + std::shared_ptr<rom_device_t> boot_rom(new rom_device_t(rom)); bus.add_device(DEFAULT_RSTVEC, boot_rom.get()); devices.push_back(boot_rom); } diff --git a/riscv/sim.h b/riscv/sim.h index 3afeedd..a851643 100644 --- a/riscv/sim.h +++ b/riscv/sim.h @@ -71,10 +71,8 @@ private: std::string dtb; bool dtb_enabled; std::vector<std::shared_ptr<abstract_device_t>> devices; - std::shared_ptr<rom_device_t> boot_rom; std::shared_ptr<clint_t> clint; std::shared_ptr<plic_t> plic; - std::shared_ptr<ns16550_t> ns16550; bus_t bus; log_file_t log_file; |