systemc: set Gem5ToTlmBridge blockingRrequest with TLM_UPDATE returning
authorYu-hsin Wang <yuhsingw@google.com>
Wed, 27 Jan 2021 03:15:43 +0000 (11:15 +0800)
committerYu-hsin Wang <yuhsingw@google.com>
Mon, 1 Feb 2021 02:56:12 +0000 (02:56 +0000)
In Gem5ToTlmBridge::pec, the function expects blockingRequest should be
set no matter the tlm peer returns TLM_UPDATE or TLM_ACCEPTED.
However, current implementation only sets blockingRequest when the tlm
peer returns TLM_ACCEPTED. We should also set blockingRequest when the
tlm peer returns TLM_UPDATE.

Change-Id: I87bba3201cd68d52ded93c9c200f4fa4a40bdf5b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39815
Reviewed-by: Earl Ou <shunhsingou@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/systemc/tlm_bridge/gem5_to_tlm.cc

index 9d108761b2f008baaf6069b2cf27ebcb7c41dec2..b80a083ac7c7d1ec125921d7535e9d1671f05309 100644 (file)
@@ -364,6 +364,8 @@ Gem5ToTlmBridge<BITWIDTH>::recvTimingReq(PacketPtr packet)
     } else if (status == tlm::TLM_UPDATED) {
         // The Timing annotation must be honored:
         sc_assert(phase == tlm::END_REQ || phase == tlm::BEGIN_RESP);
+        // Accepted but is now blocking until END_REQ (exclusion rule).
+        blockingRequest = trans;
         auto cb = [this, trans, phase]() { pec(*trans, phase); };
         system->schedule(new EventFunctionWrapper(cb, "pec", true),
                          curTick() + delay.value());