aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/memory.h
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-12 00:39:09 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-12 00:39:09 +0100
commit8b553ef5863a07a0c9ae3a970bf6afe552ce6121 (patch)
treecb61054992ea0102ed7e400533fb7cc914fc7ab0 /qtmips_machine/memory.h
parent54d7ef4272673e55b6a4324373d11875280dad84 (diff)
downloadqtmips-8b553ef5863a07a0c9ae3a970bf6afe552ce6121.tar.gz
qtmips-8b553ef5863a07a0c9ae3a970bf6afe552ce6121.tar.bz2
qtmips-8b553ef5863a07a0c9ae3a970bf6afe552ce6121.zip
Add debug access to rword and friends to allow read data through cache without disturbing statistic.
This allows to switch view between CPU and raw memory content. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine/memory.h')
-rw-r--r--qtmips_machine/memory.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/qtmips_machine/memory.h b/qtmips_machine/memory.h
index 33caf46..b354c4c 100644
--- a/qtmips_machine/memory.h
+++ b/qtmips_machine/memory.h
@@ -52,9 +52,9 @@ public:
bool write_hword(std::uint32_t offset, std::uint16_t value);
bool write_word(std::uint32_t offset, std::uint32_t value);
- std::uint8_t read_byte(std::uint32_t offset) const;
- std::uint16_t read_hword(std::uint32_t offset) const;
- std::uint32_t read_word(std::uint32_t offset) const;
+ std::uint8_t read_byte(std::uint32_t offset, bool debug_access = false) const;
+ std::uint16_t read_hword(std::uint32_t offset, bool debug_access = false) const;
+ std::uint32_t read_word(std::uint32_t offset, bool debug_access = false) const;
void write_ctl(enum AccessControl ctl, std::uint32_t offset, std::uint32_t value);
std::uint32_t read_ctl(enum AccessControl ctl, std::uint32_t offset) const;
@@ -64,7 +64,7 @@ public:
protected:
virtual bool wword(std::uint32_t offset, std::uint32_t value) = 0;
- virtual std::uint32_t rword(std::uint32_t offset) const = 0;
+ virtual std::uint32_t rword(std::uint32_t offset, bool debug_access = false) const = 0;
private:
static int sh_nth(std::uint32_t offset);
@@ -77,7 +77,7 @@ public:
~MemorySection();
bool wword(std::uint32_t offset, std::uint32_t value);
- std::uint32_t rword(std::uint32_t offset) const;
+ std::uint32_t rword(std::uint32_t offsetbool, bool debug_access = false) const;
void merge(MemorySection&);
std::uint32_t length() const;
@@ -107,7 +107,7 @@ public:
MemorySection *get_section(std::uint32_t address, bool create) const; // returns section containing given address
bool wword(std::uint32_t address, std::uint32_t value);
- std::uint32_t rword(std::uint32_t address) const;
+ std::uint32_t rword(std::uint32_t address, bool debug_access = false) const;
bool operator==(const Memory&) const;
bool operator!=(const Memory&) const;