diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-12 10:29:08 +0100 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-12 10:29:08 +0100 |
commit | fc27072b451dd8385401fadf198db69b0e87c72c (patch) | |
tree | 91ecc96bbf994af4f35778383b107d0a1abd55c9 /qtmips_machine/cache.h | |
parent | 8b553ef5863a07a0c9ae3a970bf6afe552ce6121 (diff) | |
download | qtmips-fc27072b451dd8385401fadf198db69b0e87c72c.tar.gz qtmips-fc27072b451dd8385401fadf198db69b0e87c72c.tar.bz2 qtmips-fc27072b451dd8385401fadf198db69b0e87c72c.zip |
Implement LRU as simple priority queue with linear insert sort.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine/cache.h')
-rw-r--r-- | qtmips_machine/cache.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qtmips_machine/cache.h b/qtmips_machine/cache.h index 200f3ce..827631b 100644 --- a/qtmips_machine/cache.h +++ b/qtmips_machine/cache.h @@ -67,7 +67,7 @@ public: enum LocationStatus location_status(std::uint32_t address) const; inline std::uint32_t get_change_counter() const { - return *p_change_counter; + return change_counter; } signals: void hit_update(unsigned) const; @@ -76,7 +76,6 @@ signals: void cache_update(unsigned associat, unsigned set, bool valid, bool dirty, std::uint32_t tag, const std::uint32_t *data) const; private: - std::uint32_t* p_change_counter; MachineConfigCache cnf; MemoryAccess *mem; unsigned access_pen_r, access_pen_w; @@ -96,6 +95,7 @@ private: } replc; // Data used for replacement policy mutable unsigned hit_read, miss_read, hit_write, miss_write; // Hit and miss counters + mutable std::uint32_t change_counter; std::uint32_t debug_rword(std::uint32_t address) const; bool access(std::uint32_t address, std::uint32_t *data, bool write, std::uint32_t value = 0) const; |