aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-03-17 00:28:01 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-03-17 00:28:01 +0100
commit8b5298566773275b5c8423dace3396a325f38541 (patch)
treeec0a2fb675ad69beb992e7679849d609b7d91325 /qtmips_machine
parent80cbe0dce0cb950a05a3221f612946364a25a198 (diff)
downloadqtmips-8b5298566773275b5c8423dace3396a325f38541.tar.gz
qtmips-8b5298566773275b5c8423dace3396a325f38541.tar.bz2
qtmips-8b5298566773275b5c8423dace3396a325f38541.zip
Correct word in block visualization in cache view.
The word index (column) has been erroneously used for set index value. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine')
-rw-r--r--qtmips_machine/cache.cpp6
-rw-r--r--qtmips_machine/cache.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/qtmips_machine/cache.cpp b/qtmips_machine/cache.cpp
index 3cc36e2..961ab49 100644
--- a/qtmips_machine/cache.cpp
+++ b/qtmips_machine/cache.cpp
@@ -179,7 +179,7 @@ void Cache::flush() {
for (unsigned st = 0; st < cnf.sets(); st++)
if (dt[as][st].valid) {
kick(as, st);
- emit cache_update(as, st, false, false, 0, 0);
+ emit cache_update(as, st, 0, false, false, 0, 0);
}
change_counter++;
update_statistics();
@@ -264,7 +264,7 @@ void Cache::reset() {
if (cnf.enabled()) {
for (unsigned as = 0; as < cnf.associativity(); as++)
for (unsigned st = 0; st < cnf.sets(); st++)
- emit cache_update(as, st, false, false, 0, 0);
+ emit cache_update(as, st, 0, false, false, 0, 0);
}
}
@@ -415,7 +415,7 @@ bool Cache::access(std::uint32_t address, std::uint32_t *data, bool write, std::
cd.data[col] = value;
}
- emit cache_update(indx, row, cd.valid, cd.dirty, cd.tag, cd.data);
+ emit cache_update(indx, row, col, cd.valid, cd.dirty, cd.tag, cd.data);
if (changed)
change_counter++;
return changed;
diff --git a/qtmips_machine/cache.h b/qtmips_machine/cache.h
index e15909a..2602f0b 100644
--- a/qtmips_machine/cache.h
+++ b/qtmips_machine/cache.h
@@ -76,7 +76,7 @@ signals:
void hit_update(unsigned) const;
void miss_update(unsigned) const;
void statistics_update(unsigned stalled_cycles, double speed_improv, double hit_rate) const;
- void cache_update(unsigned associat, unsigned set, bool valid, bool dirty, std::uint32_t tag, const std::uint32_t *data) const;
+ void cache_update(unsigned associat, unsigned set, unsigned col, bool valid, bool dirty, std::uint32_t tag, const std::uint32_t *data) const;
void memory_writes_update(unsigned) const;
void memory_reads_update(unsigned) const;