diff options
Diffstat (limited to 'qtmips_machine')
-rw-r--r-- | qtmips_machine/machineconfig.cpp | 12 | ||||
-rw-r--r-- | qtmips_machine/machineconfig.h | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/qtmips_machine/machineconfig.cpp b/qtmips_machine/machineconfig.cpp index c926348..2e0cf78 100644 --- a/qtmips_machine/machineconfig.cpp +++ b/qtmips_machine/machineconfig.cpp @@ -193,6 +193,7 @@ MachineConfig::MachineConfig() { osem_interrupt_stop = true; osem_exception_stop = true; osem_fs_root = ""; + res_at_compile = true; elf_path = DF_ELF; cch_program = MachineConfigCache(); cch_data = MachineConfigCache(); @@ -213,6 +214,7 @@ MachineConfig::MachineConfig(const MachineConfig *cc) { osem_interrupt_stop = cc->osemu_interrupt_stop(); osem_exception_stop = cc->osemu_exception_stop(); osem_fs_root = cc->osemu_fs_root(); + res_at_compile = cc->reset_at_compile(); elf_path = cc->elf(); cch_program = cc->cache_program(); cch_data = cc->cache_data(); @@ -235,6 +237,7 @@ MachineConfig::MachineConfig(const QSettings *sts, const QString &prefix) { osem_interrupt_stop = sts->value(N("OsemuInterruptStop"), true).toBool(); osem_exception_stop = sts->value(N("OsemuExceptionStop"), true).toBool(); osem_fs_root = sts->value(N("OsemuFilesystemRoot"), "").toString(); + res_at_compile = sts->value(N("ResetAtCompile"), true).toBool(); elf_path = sts->value(N("Elf"), DF_ELF).toString(); cch_program = MachineConfigCache(sts, N("ProgramCache_")); cch_data = MachineConfigCache(sts, N("DataCache_")); @@ -253,6 +256,7 @@ void MachineConfig::store(QSettings *sts, const QString &prefix) { sts->setValue(N("OsemuInterruptStop"), osemu_interrupt_stop()); sts->setValue(N("OsemuExceptionStop"), osemu_exception_stop()); sts->setValue(N("OsemuFilesystemRoot"), osemu_fs_root()); + sts->setValue(N("ResetAtCompile"), reset_at_compile()); sts->setValue(N("Elf"), elf_path); cch_program.store(sts, N("ProgramCache_")); cch_data.store(sts, N("DataCache_")); @@ -344,6 +348,10 @@ void MachineConfig::set_osemu_fs_root(QString v) { osem_fs_root = v; } +void MachineConfig::set_reset_at_compile(bool v) { + res_at_compile = v; +} + void MachineConfig::set_elf(QString path) { elf_path = path; } @@ -410,6 +418,10 @@ QString MachineConfig::osemu_fs_root() const { return osem_fs_root; } +bool MachineConfig::reset_at_compile() const { + return res_at_compile; +} + QString MachineConfig::elf() const { return elf_path; } diff --git a/qtmips_machine/machineconfig.h b/qtmips_machine/machineconfig.h index 987f3aa..bcd5b76 100644 --- a/qtmips_machine/machineconfig.h +++ b/qtmips_machine/machineconfig.h @@ -134,6 +134,8 @@ public: void set_osemu_interrupt_stop(bool); void set_osemu_exception_stop(bool); void set_osemu_fs_root(QString v); + // reset machine befor internal compile/reload after external make + void set_reset_at_compile(bool); // Set path to source elf file. This has to be set before core is initialized. void set_elf(QString path); // Configure cache @@ -154,6 +156,7 @@ public: bool osemu_interrupt_stop() const; bool osemu_exception_stop() const; QString osemu_fs_root() const; + bool reset_at_compile() const; QString elf() const; const MachineConfigCache &cache_program() const; const MachineConfigCache &cache_data() const; @@ -171,6 +174,7 @@ private: unsigned mem_acc_read, mem_acc_write, mem_acc_burst; bool osem_enable, osem_known_syscall_stop, osem_unknown_syscall_stop; bool osem_interrupt_stop, osem_exception_stop; + bool res_at_compile; QString osem_fs_root; QString elf_path; MachineConfigCache cch_program, cch_data; |