summaryrefslogtreecommitdiff
path: root/src/cpu/simple
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2019-11-27 15:45:57 +0000
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2019-12-11 15:07:52 +0000
commitf73caae20fed7b4500a724ac85c20b637ee353a1 (patch)
treeb4f10cb3e3b35bd5c71b86bc5e26120f697d5d09 /src/cpu/simple
parent390a74f59934b85d91489f8a563450d8321b602d (diff)
downloadgem5-f73caae20fed7b4500a724ac85c20b637ee353a1.tar.xz
cpu: Add byteEnable assertions to readMem and initateMemRead
Those are already present in writeMem; looking for consistency Change-Id: Ib85e0db228bc73e3ac64155d1290444cf6864a8c Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23281 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Diffstat (limited to 'src/cpu/simple')
-rw-r--r--src/cpu/simple/exec_context.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cpu/simple/exec_context.hh b/src/cpu/simple/exec_context.hh
index 48a9f9423..8e4aa3961 100644
--- a/src/cpu/simple/exec_context.hh
+++ b/src/cpu/simple/exec_context.hh
@@ -440,6 +440,7 @@ class SimpleExecContext : public ExecContext {
const std::vector<bool>& byteEnable = std::vector<bool>())
override
{
+ assert(byteEnable.empty() || byteEnable.size() == size);
return cpu->readMem(addr, data, size, flags, byteEnable);
}
@@ -449,6 +450,7 @@ class SimpleExecContext : public ExecContext {
const std::vector<bool>& byteEnable = std::vector<bool>())
override
{
+ assert(byteEnable.empty() || byteEnable.size() == size);
return cpu->initiateMemRead(addr, size, flags, byteEnable);
}