Deal with invalidations intersecting outstanding upgrades.
[gem5.git] / src / mem / mem_object.hh
index ac547619d27897f3e3e717d4d73117a40c4e685c..ec6fa2b2aea0230e2b78d1288b7cde5605ddc6d5 100644 (file)
@@ -30,7 +30,7 @@
 
 /**
  * @file
- * Base Memory Object decleration.
+ * Base Memory Object declaration.
  */
 
 #ifndef __MEM_MEM_OBJECT_HH__
@@ -50,7 +50,11 @@ class MemObject : public SimObject
 
   public:
     /** Additional function to return the Port of a memory object. */
-    virtual Port *getPort(const std::string &if_name) = 0;
+    virtual Port *getPort(const std::string &if_name, int idx = -1) = 0;
+
+    /** Tell object that this port is about to disappear, so it should remove it
+     * from any structures that it's keeping it in. */
+    virtual void deletePortRefs(Port *p) ;
 };
 
 #endif //__MEM_MEM_OBJECT_HH__