mem-cache: Add match functions to QueueEntry
[gem5.git] / src / mem / comm_monitor.hh
index 28c8ec7a19399a7e24ce448f125275b2780078a3..1eea6a535fc1765939989debe0676b43a973faa1 100644 (file)
@@ -1,6 +1,7 @@
 /*
- * Copyright (c) 2012-2013, 2015 ARM Limited
+ * Copyright (c) 2012-2013, 2015, 2018 ARM Limited
  * Copyright (c) 2016 Google Inc.
+ * Copyright (c) 2017, Centre National de la Recherche Scientifique
  * All rights reserved.
  *
  * The license below extends only to copyright in the software and shall
@@ -38,6 +39,7 @@
  * Authors: Thomas Grass
  *          Andreas Hansson
  *          Rahul Thakur
+ *          Pierre-Yves Peneau
  */
 
 #ifndef __MEM_COMM_MONITOR_HH__
@@ -82,11 +84,8 @@ class CommMonitor : public MemObject
     void regProbePoints() override;
 
   public: // MemObject interfaces
-    BaseMasterPort& getMasterPort(const std::string& if_name,
-                                  PortID idx = InvalidPortID) override;
-
-    BaseSlavePort& getSlavePort(const std::string& if_name,
-                                PortID idx = InvalidPortID) override;
+    Port &getPort(const std::string &if_name,
+                  PortID idx=InvalidPortID) override;
 
   private:
 
@@ -230,6 +229,11 @@ class CommMonitor : public MemObject
             mon.recvRespRetry();
         }
 
+        bool tryTiming(PacketPtr pkt)
+        {
+            return mon.tryTiming(pkt);
+        }
+
       private:
 
         CommMonitor& mon;
@@ -267,11 +271,13 @@ class CommMonitor : public MemObject
 
     void recvRangeChange();
 
+    bool tryTiming(PacketPtr pkt);
+
     /** Stats declarations, all in a struct for convenience. */
     struct MonitorStats
     {
 
-        /** Disable flag for burst length historgrams **/
+        /** Disable flag for burst length histograms **/
         bool disableBurstLengthHists;
 
         /** Histogram of read burst lengths */
@@ -408,7 +414,7 @@ class CommMonitor : public MemObject
     void samplePeriodic();
 
     /** Periodic event called at the end of each simulation time bin */
-    EventWrapper<CommMonitor, &CommMonitor::samplePeriodic> samplePeriodicEvent;
+    EventFunctionWrapper samplePeriodicEvent;
 
     /**
      *@{