mem: Add packet matching functions
Add both block and non-block-aligned packet matching functions, so that both address and secure bits are checked when checking whether a packet matches a request. Change-Id: Id0069befb925d112e06f250741cb47d9dfa249cc Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17533 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
9f32d74db8
commit
d4cee4dc66
4
src/mem/cache/cache.cc
vendored
4
src/mem/cache/cache.cc
vendored
@@ -383,7 +383,7 @@ Cache::handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time,
|
||||
pkt->req->masterId());
|
||||
pf = new Packet(req, pkt->cmd);
|
||||
pf->allocate();
|
||||
assert(pf->getAddr() == pkt->getAddr());
|
||||
assert(pf->matchAddr(pkt));
|
||||
assert(pf->getSize() == pkt->getSize());
|
||||
}
|
||||
|
||||
@@ -781,7 +781,7 @@ Cache::serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk)
|
||||
pkt->payloadDelay;
|
||||
if (pkt->isRead() && !is_error) {
|
||||
// sanity check
|
||||
assert(pkt->getAddr() == tgt_pkt->getAddr());
|
||||
assert(pkt->matchAddr(tgt_pkt));
|
||||
assert(pkt->getSize() >= tgt_pkt->getSize());
|
||||
|
||||
tgt_pkt->setData(pkt->getConstPtr<uint8_t>());
|
||||
|
||||
Reference in New Issue
Block a user