diff options
author | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2014-12-08 04:49:52 -0500 |
---|---|---|
committer | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2014-12-08 04:49:52 -0500 |
commit | 6a9fbd295d18d96b39f9d8ba6093bee17d318c1d (patch) | |
tree | 9b4379f4f75a4f19e43a26ebebae7483253e2ae0 /src | |
parent | 1ccc4e0e21e5a47640b2a8bd6864988c3dfb5926 (diff) | |
download | gem5-6a9fbd295d18d96b39f9d8ba6093bee17d318c1d.tar.xz |
dev: Add response sanity checks in PioPort
Add an assert in the PioPort that checks if a response packet from a
device has the right flags set before passing it to them rest of the
memory system.
Diffstat (limited to 'src')
-rw-r--r-- | src/dev/io_device.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc index b118294f7..a536e2973 100644 --- a/src/dev/io_device.cc +++ b/src/dev/io_device.cc @@ -57,7 +57,9 @@ PioPort::recvAtomic(PacketPtr pkt) // @todo: We need to pay for this and not just zero it out pkt->firstWordDelay = pkt->lastWordDelay = 0; - return pkt->isRead() ? device->read(pkt) : device->write(pkt); + const Tick delay(pkt->isRead() ? device->read(pkt) : device->write(pkt)); + assert(pkt->isResponse() || pkt->isError()); + return delay; } AddrRangeList |