#include "mem/port.hh"
#include "params/MemObject.hh"
-#include "sim/sim_object.hh"
+#include "sim/clocked_object.hh"
/**
- * The MemObject class extends the SimObject with accessor functions
+ * The MemObject class extends the ClockedObject with accessor functions
* to get its master and slave ports.
*/
-class MemObject : public SimObject
+class MemObject : public ClockedObject
{
public:
typedef MemObjectParams Params;
MemObject(const Params *params);
/**
- * Get a master port with a given name and index.
+ * Get a master port with a given name and index. This is used at
+ * binding time and returns a reference to a protocol-agnostic
+ * base master port.
*
* @param if_name Port name
* @param idx Index in the case of a VectorPort
*
* @return A reference to the given port
*/
- virtual MasterPort& getMasterPort(const std::string& if_name,
- int idx = -1);
+ virtual BaseMasterPort& getMasterPort(const std::string& if_name,
+ PortID idx = InvalidPortID);
/**
- * Get a slave port with a given name and index.
+ * Get a slave port with a given name and index. This is used at
+ * binding time and returns a reference to a protocol-agnostic
+ * base master port.
*
* @param if_name Port name
* @param idx Index in the case of a VectorPort
*
* @return A reference to the given port
*/
- virtual SlavePort& getSlavePort(const std::string& if_name,
- int idx = -1);
+ virtual BaseSlavePort& getSlavePort(const std::string& if_name,
+ PortID idx = InvalidPortID);
};
#endif //__MEM_MEM_OBJECT_HH__