mem: Add Request::isMasked to check for byte strobing
This is trying to overcome the following problem: At the moment a memory request with a non empty byteEnable mask will be considered masking even if all elements in the vector are true. Change-Id: I16ae2c0ea8c3f3370e397bab9d79d6d60c3784bd Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23284 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -1305,7 +1305,7 @@ class Packet : public Printable
|
||||
bool
|
||||
isMaskedWrite() const
|
||||
{
|
||||
return (cmd == MemCmd::WriteReq && !req->getByteEnable().empty());
|
||||
return (cmd == MemCmd::WriteReq && req->isMasked());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2013,2017-2018 ARM Limited
|
||||
* Copyright (c) 2012-2013,2017-2019 ARM Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
@@ -650,6 +650,20 @@ class Request
|
||||
_byteEnable = be;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the memory request is masked, which means
|
||||
* there is at least one byteEnable element which is false
|
||||
* (byte is masked)
|
||||
*/
|
||||
bool
|
||||
isMasked() const
|
||||
{
|
||||
return std::find(
|
||||
_byteEnable.begin(),
|
||||
_byteEnable.end(),
|
||||
false) != _byteEnable.end();
|
||||
}
|
||||
|
||||
/** Accessor for time. */
|
||||
Tick
|
||||
time() const
|
||||
|
||||
Reference in New Issue
Block a user