systemc: set Gem5ToTlmBridge blockingRrequest with TLM_UPDATE returning

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>
This commit is contained in:
Yu-hsin Wang
2021-01-27 11:15:43 +08:00
parent c883614280
commit f840d13c78

View 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());