From 256729a40c0fadb69a413cf4f539e96187636b50 Mon Sep 17 00:00:00 2001 From: Atri Bhattacharyya Date: Wed, 26 Jul 2023 17:34:24 +0200 Subject: [PATCH] mem: Make functional request a response when satisfied by queue In the memory controller, MemCtrl::MemoryPort::recvFunctional, when the functional request is satisfied by the ctrl-response queue, correctly make the packet a response. This change mirrors AbstractMemory::functionalAccess, which uses Packet::makeResponse() after satisfying the request. Change-Id: I47917062d3270915a97eed2c9fade66ba17019eb --- src/mem/mem_ctrl.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mem/mem_ctrl.cc b/src/mem/mem_ctrl.cc index 9a3600f331..97c7741abd 100644 --- a/src/mem/mem_ctrl.cc +++ b/src/mem/mem_ctrl.cc @@ -1496,6 +1496,11 @@ MemCtrl::MemoryPort::recvFunctional(PacketPtr pkt) // calls recvAtomic() and throws away the latency; we can save a // little here by just not calculating the latency. ctrl.recvFunctional(pkt); + } else { + // The packet's request is satisfied by the queue, but queue + // does not call makeResponse. + // Here, change the packet to the corresponding response + pkt->makeResponse(); } pkt->popLabel();