Nikos Nikoleris has submitted this change and it was merged. (
https://gem5-review.googlesource.com/5041 )
Change subject: mem: Add function to check if the slave can receive a
timing req
......................................................................
mem: Add function to check if the slave can receive a timing req
This changeset adds support for tryTiming, an interface that allows a
master to check if the slave is busy or otherwise if it can accept a
timing request.
Change-Id: Idc7c2337ae9ccf5dec54f308e488660591419a63
Reviewed-on: https://gem5-review.googlesource.com/5041
Maintainer: Nikos Nikoleris <[email protected]>
Reviewed-by: Christian Menard <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
---
M src/mem/port.cc
M src/mem/port.hh
2 files changed, 29 insertions(+), 2 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Christian Menard: Looks good to me, but someone else must approve
Nikos Nikoleris: Looks good to me, approved
diff --git a/src/mem/port.cc b/src/mem/port.cc
index 2111fa4..756eb8b 100644
--- a/src/mem/port.cc
+++ b/src/mem/port.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012,2015 ARM Limited
+ * Copyright (c) 2012,2015,2017 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -184,6 +184,13 @@
}
bool
+MasterPort::tryTiming(PacketPtr pkt) const
+{
+ assert(pkt->isRequest());
+ return _slavePort->tryTiming(pkt);
+}
+
+bool
MasterPort::sendTimingSnoopResp(PacketPtr pkt)
{
assert(pkt->isResponse());
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 0d88441..39f6dea 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2012,2015 ARM Limited
+ * Copyright (c) 2011-2012,2015,2017 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -224,6 +224,19 @@
bool sendTimingReq(PacketPtr pkt);
/**
+ * Check if the slave can handle a timing request.
+ *
+ * If the send cannot be handled at the moment, as indicated by
+ * the return value, then the sender will receive a recvReqRetry
+ * at which point it can re-issue a sendTimingReq.
+ *
+ * @param pkt Packet to send.
+ *
+ * @return If the send was succesful or not.
+ */
+ bool tryTiming(PacketPtr pkt) const;
+
+ /**
* Attempt to send a timing snoop response packet to the slave
* port by calling its corresponding receive function. If the send
* does not succeed, as indicated by the return value, then the
@@ -452,6 +465,13 @@
virtual bool recvTimingReq(PacketPtr pkt) = 0;
/**
+ * Availability request from the master port.
+ */
+ virtual bool tryTiming(PacketPtr pkt) {
+ panic("%s was not expecting a %s\n", name(), __func__);
+ }
+
+ /**
* Receive a timing snoop response from the master port.
*/
virtual bool recvTimingSnoopResp(PacketPtr pkt)
--
To view, visit https://gem5-review.googlesource.com/5041
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc7c2337ae9ccf5dec54f308e488660591419a63
Gerrit-Change-Number: 5041
Gerrit-PatchSet: 6
Gerrit-Owner: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Christian Menard <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev