When calling functionalMemoryRead we need to check the mem req. queue
first as it may have write data not yet forwarded to the memory port.
Change-Id: Id37aa0837a3462d92ae9ac3b45ca756b2c4f7d97
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41153
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
void
AbstractController::functionalMemoryRead(PacketPtr pkt)
{
- memoryPort.sendFunctional(pkt);
+ // read from mem. req. queue if write data is pending there
+ MessageBuffer *req_queue = getMemReqQueue();
+ if (!req_queue || !req_queue->functionalRead(pkt))
+ memoryPort.sendFunctional(pkt);
}
int