Daniel Carvalho has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/17540 )
Change subject: mem: Make DRAMCtrl::decodeAddr const
......................................................................
mem: Make DRAMCtrl::decodeAddr const
DRAMCtrl's decodeAddr does not need to modify the packet it
receives, nor should it modify the contents of the class,
and therefore both the packet and the function are made const.
Change-Id: I577f48d9a43611ba54878a9a793cb7b4fbb326f4
Signed-off-by: Daniel R. Carvalho <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17540
Tested-by: kokoro <[email protected]>
Maintainer: Nikos Nikoleris <[email protected]>
Reviewed-by: Nikos Nikoleris <[email protected]>
---
M src/mem/dram_ctrl.cc
M src/mem/dram_ctrl.hh
2 files changed, 4 insertions(+), 4 deletions(-)
Approvals:
Nikos Nikoleris: Looks good to me, approved; Looks good to me, approved
kokoro: Statistics mismatch
diff --git a/src/mem/dram_ctrl.cc b/src/mem/dram_ctrl.cc
index e89a47a..429e9ef 100644
--- a/src/mem/dram_ctrl.cc
+++ b/src/mem/dram_ctrl.cc
@@ -303,8 +303,8 @@
}
DRAMCtrl::DRAMPacket*
-DRAMCtrl::decodeAddr(PacketPtr pkt, Addr dramPktAddr, unsigned size,
- bool isRead)
+DRAMCtrl::decodeAddr(const PacketPtr pkt, Addr dramPktAddr, unsigned size,
+ bool isRead) const
{
// decode the address based on the address mapping scheme, with
// Ro, Ra, Co, Ba and Ch denoting row, rank, column, bank and
diff --git a/src/mem/dram_ctrl.hh b/src/mem/dram_ctrl.hh
index d09223b..54826e0 100644
--- a/src/mem/dram_ctrl.hh
+++ b/src/mem/dram_ctrl.hh
@@ -839,8 +839,8 @@
* @param isRead Is the request for a read or a write to DRAM
* @return A DRAMPacket pointer with the decoded information
*/
- DRAMPacket* decodeAddr(PacketPtr pkt, Addr dramPktAddr, unsigned int
size,
- bool isRead);
+ DRAMPacket* decodeAddr(const PacketPtr pkt, Addr dramPktAddr,
+ unsigned int size, bool isRead) const;
/**
* The memory schduler/arbiter - picks which request needs to
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/17540
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I577f48d9a43611ba54878a9a793cb7b4fbb326f4
Gerrit-Change-Number: 17540
Gerrit-PatchSet: 4
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev