From: Ron Dreslinski Date: Mon, 10 Jul 2006 16:35:18 +0000 (-0400) Subject: Fix offset calculation. Now L2's work with timing&atomic. X-Git-Tag: m5_2.0_beta1~36^2~5^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39ffd24b648d45cf4e2b130ea5465ae9f57ac125;p=gem5.git Fix offset calculation. Now L2's work with timing&atomic. src/mem/packet.hh: Offset is based on packet, not request. --HG-- extra : convert_revision : d85af5838370541328ca35072c612d8198020625 --- diff --git a/src/mem/packet.hh b/src/mem/packet.hh index 1325dfc5b..534db0077 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -247,7 +247,7 @@ class Packet Addr getAddr() const { assert(addrSizeValid); return addr; } int getSize() const { assert(addrSizeValid); return size; } - Addr getOffset(int blkSize) const { return req->getPaddr() & (Addr)(blkSize - 1); } + Addr getOffset(int blkSize) const { return addr & (Addr)(blkSize - 1); } void addrOverride(Addr newAddr) { assert(addrSizeValid); addr = newAddr; } void cmdOverride(Command newCmd) { cmd = newCmd; }