summaryrefslogtreecommitdiff
path: root/src/mem/packet.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-03-02 04:00:52 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2015-03-02 04:00:52 -0500
commit407737614ed2431d75314eba813edfec40e95bcc (patch)
tree12c7a459faf2e3ea8f6c7e6f119ce32730c53a5c /src/mem/packet.hh
parentecef1612b8a9a5632c8354ccb000184c2f82ddf3 (diff)
downloadgem5-407737614ed2431d75314eba813edfec40e95bcc.tar.xz
mem: Add byte mask to Packet::checkFunctional
This patch changes the valid-bytes start/end to a proper byte mask. With the changes in timing introduced in previous patches there are more packets waiting in queues, and there are regressions using the checker CPU failing due to non-contigous read data being found in the various cache queues. This patch also adds some more comments explaining what is going on, and adds the fourth and missing case to Packet::checkFunctional.
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r--src/mem/packet.hh13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index e80307ffc..cb8a5cbf4 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -304,11 +304,9 @@ class Packet : public Printable
MemCmd origCmd;
/**
- * These values specify the range of bytes found that satisfy a
- * functional read.
+ * Track the bytes found that satisfy a functional read.
*/
- uint16_t bytesValidStart;
- uint16_t bytesValidEnd;
+ std::vector<bool> bytesValid;
public:
@@ -573,8 +571,7 @@ class Packet : public Printable
*/
Packet(const RequestPtr _req, MemCmd _cmd)
: cmd(_cmd), req(_req), data(nullptr), addr(0), _isSecure(false),
- size(0), bytesValidStart(0), bytesValidEnd(0),
- headerDelay(0), payloadDelay(0),
+ size(0), headerDelay(0), payloadDelay(0),
senderState(NULL)
{
if (req->hasPaddr()) {
@@ -595,7 +592,6 @@ class Packet : public Printable
*/
Packet(const RequestPtr _req, MemCmd _cmd, int _blkSize)
: cmd(_cmd), req(_req), data(nullptr), addr(0), _isSecure(false),
- bytesValidStart(0), bytesValidEnd(0),
headerDelay(0), payloadDelay(0),
senderState(NULL)
{
@@ -619,8 +615,7 @@ class Packet : public Printable
: cmd(pkt->cmd), req(pkt->req),
data(nullptr),
addr(pkt->addr), _isSecure(pkt->_isSecure), size(pkt->size),
- bytesValidStart(pkt->bytesValidStart),
- bytesValidEnd(pkt->bytesValidEnd),
+ bytesValid(pkt->bytesValid),
headerDelay(pkt->headerDelay),
payloadDelay(pkt->payloadDelay),
senderState(pkt->senderState)