aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-21 14:43:31 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-21 14:43:31 +0100
commit372af906107bceed8a174d5aa907034d35cfe760 (patch)
treecdf72b407738cc9cc442a31287cc006d96263036
parent1079afe82fae73f1ee61266b0b573b95e8c1ce48 (diff)
downloadqtmips-372af906107bceed8a174d5aa907034d35cfe760.tar.gz
qtmips-372af906107bceed8a174d5aa907034d35cfe760.tar.bz2
qtmips-372af906107bceed8a174d5aa907034d35cfe760.zip
Ensure that cache view and memory status are updated after cache flush.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-rw-r--r--qtmips_machine/cache.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qtmips_machine/cache.cpp b/qtmips_machine/cache.cpp
index ad85c8a..3cc36e2 100644
--- a/qtmips_machine/cache.cpp
+++ b/qtmips_machine/cache.cpp
@@ -177,8 +177,11 @@ void Cache::flush() {
for (unsigned as = cnf.associativity(); as-- > 0 ; )
for (unsigned st = 0; st < cnf.sets(); st++)
- if (dt[as][st].valid)
+ if (dt[as][st].valid) {
kick(as, st);
+ emit cache_update(as, st, false, false, 0, 0);
+ }
+ change_counter++;
update_statistics();
}