diff options
author | Christoph Pfister <pfistchr@student.ethz.ch> | 2015-05-30 13:45:17 +0200 |
---|---|---|
committer | Christoph Pfister <pfistchr@student.ethz.ch> | 2015-05-30 13:45:17 +0200 |
commit | 4a174947083b59cd76561ec0c41f23a95697b822 (patch) | |
tree | a9c133897d630aabad1ab4ecb1b4eef4196879de | |
parent | 31825bd988fd512d822ee73a76d852c98fdf803d (diff) | |
download | gem5-4a174947083b59cd76561ec0c41f23a95697b822.tar.xz |
mem: addr_mapper: restore old address if request not sent
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
-rw-r--r-- | src/mem/addr_mapper.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mem/addr_mapper.cc b/src/mem/addr_mapper.cc index 06237745b..2f0020576 100644 --- a/src/mem/addr_mapper.cc +++ b/src/mem/addr_mapper.cc @@ -128,9 +128,13 @@ AddrMapper::recvTimingReq(PacketPtr pkt) // packets) bool successful = masterPort.sendTimingReq(pkt); - // If not successful, restore the sender state - if (!successful && needsResponse) { - delete pkt->popSenderState(); + // If not successful, restore the address and sender state + if (!successful) { + pkt->setAddr(orig_addr); + + if (needsResponse) { + delete pkt->popSenderState(); + } } return successful; |