From 84efeb976a23d27fcb737d01cd3fe419143711ff Mon Sep 17 00:00:00 2001 From: Robert Hauser <85344819+robhau@users.noreply.github.com> Date: Sat, 2 Dec 2023 01:18:51 +0100 Subject: [PATCH] systemc: Bugfix in TlmToGem5Bridge (#615) In handleBeginReq, a timing request is sent. If the receiver rejects the request, the bridge will save the pointers of the original transaction object and the generated gem5 packet. After a recvReqRetry-signal and a successful timing request, the variable for transaction object pointer, but not for the gem5 packet, is set to nullptr. When a new transaction with the phase BEGIN_REQ arrives, the assertion in handleBeginReq that there is no pending gem5 packet fails. Therefore, the variable pendingPacket has to be set to nullptr in recvReqRetry after a successful timing request too. Change-Id: I876f8f88e1893e8fdfa3441ed2ae5ddc39cef2ce Co-authored-by: Robert Hauser --- src/systemc/tlm_bridge/tlm_to_gem5.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/systemc/tlm_bridge/tlm_to_gem5.cc b/src/systemc/tlm_bridge/tlm_to_gem5.cc index c02efe7437..036ca738ca 100644 --- a/src/systemc/tlm_bridge/tlm_to_gem5.cc +++ b/src/systemc/tlm_bridge/tlm_to_gem5.cc @@ -540,6 +540,7 @@ TlmToGem5Bridge::recvReqRetry() trans.release(); pendingRequest = nullptr; + pendingPacket = nullptr; } }