changeset 41413f830836 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=41413f830836
description:
mem: Fix initial value problem with MemChecker
In highly loaded cases, reads might actually overlap with writes to the
initial memory state. The mem checker needs to detect such cases and
permit the read reading either from the writes (what it is doing now) or
read from the initial, unknown value.
This patch adds this logic.
diffstat:
src/mem/mem_checker.cc | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r ac3236a0873b -r 41413f830836 src/mem/mem_checker.cc
--- a/src/mem/mem_checker.cc Mon Feb 16 03:34:35 2015 -0500
+++ b/src/mem/mem_checker.cc Mon Feb 16 03:34:47 2015 -0500
@@ -195,6 +195,17 @@
}
// Record non-matching, but possible value
_lastExpectedData.push_back(last_obs.data);
+ } else {
+ // We have not seen any valid observation, and the only writes
+ // observed are overlapping, so anything (in particular the
+ // initialisation value) goes
+ // NOTE: We can overlap with multiple write clusters, here
+ if (!writeClusters.empty() && wc_overlap) {
+ // ensure that all write clusters really overlap this read
+ assert(writeClusters.begin()->start < complete &&
+ writeClusters.rbegin()->complete > start);
+ return true;
+ }
}
if (_lastExpectedData.empty()) {
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev