aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/memory.h
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-05 18:14:53 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-05 18:14:53 +0100
commit71e2e98d07499c6d0f31596fec52cd8cef5813a9 (patch)
treed2aa2729956464f2aab62bb5f088850b69a5a8d7 /qtmips_machine/memory.h
parent1a3fbaf22975b1f130998841adb3109b8a543513 (diff)
downloadqtmips-71e2e98d07499c6d0f31596fec52cd8cef5813a9.tar.gz
qtmips-71e2e98d07499c6d0f31596fec52cd8cef5813a9.tar.bz2
qtmips-71e2e98d07499c6d0f31596fec52cd8cef5813a9.zip
Implement machine restart
Diffstat (limited to 'qtmips_machine/memory.h')
-rw-r--r--qtmips_machine/memory.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/qtmips_machine/memory.h b/qtmips_machine/memory.h
index ab33e4a..3bd1060 100644
--- a/qtmips_machine/memory.h
+++ b/qtmips_machine/memory.h
@@ -43,6 +43,7 @@ public:
void write_byte(std::uint32_t offset, std::uint8_t value);
std::uint8_t read_byte(std::uint32_t offset) const;
+ void merge(MemorySection&);
std::uint32_t length() const;
const std::uint8_t* data() const;
@@ -71,6 +72,8 @@ public:
Memory();
Memory(const Memory&);
~Memory();
+ void reset(); // Reset whole content of memory (removes old tree and creates new one)
+ void reset(const Memory&);
MemorySection *get_section(std::uint32_t address, bool create) const; // returns section containing given address
void write_byte(std::uint32_t address, std::uint8_t value);