[gem5-dev] Change in gem5/gem5[develop]: systemc: Send response to TLM side if a packet does not need response

2020-08-16 Thread Yu-hsin Wang (Gerrit) via gem5-dev
Yu-hsin Wang has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/32735 )



Change subject: systemc: Send response to TLM side if a packet does not  
need response

..

systemc: Send response to TLM side if a packet does not need response

A completed TLM transaction includes request and response parts.
Currently, if a gem5 packet does not need a reponse, the bridge would not
send BEGIN_RESP to its upstream. It causes stuck on TLM side.

To fix this problem, the bridge should send BEGIN_RESP by itself in this
case.

Change-Id: I318dec21bc3f291693715c0d70bc624addf05076
---
M src/systemc/tlm_bridge/tlm_to_gem5.cc
1 file changed, 14 insertions(+), 0 deletions(-)



diff --git a/src/systemc/tlm_bridge/tlm_to_gem5.cc  
b/src/systemc/tlm_bridge/tlm_to_gem5.cc

index e6cb483..6d16c47 100644
--- a/src/systemc/tlm_bridge/tlm_to_gem5.cc
+++ b/src/systemc/tlm_bridge/tlm_to_gem5.cc
@@ -162,8 +162,15 @@
 auto tlmSenderState = new TlmSenderState(trans);
 pkt->pushSenderState(tlmSenderState);

+// If the packet doesn't need a response, we should send BEGIN_RESP by
+// ourselves.
+bool needsResponse = pkt->needsResponse();
 if (bmp.sendTimingReq(pkt)) { // port is free -> send END_REQ  
immediately

 sendEndReq(trans);
+if (!needsResponse) {
+  auto delay = sc_core::SC_ZERO_TIME;
+  sendBeginResp(trans, delay);
+}
 trans.release();
 } else { // port is blocked -> wait for retry before sending END_REQ
 waitForRetry = true;
@@ -429,12 +436,19 @@
 sc_assert(pendingRequest != nullptr);
 sc_assert(pendingPacket != nullptr);

+// If the packet doesn't need a response, we should send BEGIN_RESP by
+// ourselves.
+bool needsResponse = pkt->needsResponse();
 if (bmp.sendTimingReq(pendingPacket)) {
 waitForRetry = false;
 pendingPacket = nullptr;

 auto  = *pendingRequest;
 sendEndReq(trans);
+if (!needsResponse) {
+  auto delay = sc_core::SC_ZERO_TIME;
+  sendBeginResp(trans, delay);
+}
 trans.release();

 pendingRequest = nullptr;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32735
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I318dec21bc3f291693715c0d70bc624addf05076
Gerrit-Change-Number: 32735
Gerrit-PatchSet: 1
Gerrit-Owner: Yu-hsin Wang 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] testlib dumping execution time for every testcase

2020-08-16 Thread Giacomo Travaglini via gem5-dev
Hi devs,

We've posted a patchset which allows us to dump the execution time of every 
testcase during kokoro runs.

https://gem5-review.googlesource.com/c/public/gem5/+/32653/1

This will make it possible for us to track performance regressions before a 
commit is merged, hence preventing slowdowns in our simulations.

Feel free to review the patches; further info can be found at 
https://gem5.atlassian.net/browse/GEM5-548

Kind Regards

Giacomo

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s