changeset 6099331da328 in /z/repo/gem5 details: http://repo.gem5.org/gem5?cmd=changeset;node=6099331da328 description: 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: src/dev/io_device.cc | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (14 lines): diff -r 3499de20ab3a -r 6099331da328 src/dev/io_device.cc --- a/src/dev/io_device.cc Mon Dec 08 04:49:51 2014 -0500 +++ b/src/dev/io_device.cc Mon Dec 08 04:49:52 2014 -0500 @@ -57,7 +57,9 @@ // @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 _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev