From 5fabb992ffa9cbde09105ec21c45e8cff282949e Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Tue, 12 Feb 2019 14:20:42 +0100 Subject: 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17540 Tested-by: kokoro Maintainer: Nikos Nikoleris Reviewed-by: Nikos Nikoleris --- src/mem/dram_ctrl.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mem/dram_ctrl.hh') diff --git a/src/mem/dram_ctrl.hh b/src/mem/dram_ctrl.hh index d09223b4b..54826e0a8 100644 --- a/src/mem/dram_ctrl.hh +++ b/src/mem/dram_ctrl.hh @@ -839,8 +839,8 @@ class DRAMCtrl : public QoS::MemCtrl * @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 -- cgit v1.2.3