projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ccc4e0
)
dev: Add response sanity checks in PioPort
author
Andreas Sandberg
<Andreas.Sandberg@ARM.com>
Mon, 8 Dec 2014 09:49:52 +0000
(
04:49
-0500)
committer
Andreas Sandberg
<Andreas.Sandberg@ARM.com>
Mon, 8 Dec 2014 09:49:52 +0000
(
04:49
-0500)
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.
src/dev/io_device.cc
patch
|
blob
|
history
diff --git
a/src/dev/io_device.cc
b/src/dev/io_device.cc
index b118294f7d9eefa5797d834ffe5bacd1566acde0..a536e29730b864edeb449491638c2a0929ef96bf 100644
(file)
--- 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