49 #ifndef __SIM_OBJECT_HH__ 50 #define __SIM_OBJECT_HH__ 56 #include "params/SimObject.hh" 120 virtual const std::string
name()
const {
return params()->name; }
225 static void debugObjectBreak(
const std::string &objs);
248 virtual SimObject *resolveSimObject(
const std::string &
name) = 0;
252 void debugObjectBreak(
const char *objs);
255 #endif // __SIM_OBJECT_HH__ virtual void memWriteback()
Write back dirty buffers to memory using functional writes.
Ports are used to interface objects to each other.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
const PortID InvalidPortID
DrainState
Object drain/handover states.
static void serializeAll(CheckpointOut &cp)
Serialize all SimObjects in the system.
ProbeManager is a conduit class that lives on each SimObject, and is used to match up probe listeners...
virtual ~SimObjectResolver()
Base class to wrap object resolving functionality.
Interface for objects that might require draining before checkpointing.
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
void serialize(CheckpointOut &cp) const override
Serialize an object.
static SimObjectList simObjectList
List of all instantiated simulation objects.
const Params * params() const
virtual void memInvalidate()
Invalidate the contents of memory buffers.
ProbeManager * probeManager
Manager coordinates hooking up probe points with listeners.
SimObject(const Params *_params)
virtual void regProbePoints()
Register probe points for this object.
virtual void regProbeListeners()
Register probe listeners for this object.
Draining buffers pending serialization/handover.
virtual const std::string name() const
std::vector< SimObject * > SimObjectList
Basic support for object serialization.
static SimObject * find(const char *name)
Find the SimObject with the given name and return a pointer to it.
std::ostream CheckpointOut
ProbeManager * getProbeManager()
Get the probe manager for this object.
const SimObjectParams * _params
Cached copy of the object parameters.
DrainState drain() override
Provide a default implementation of the drain interface for objects that don't need draining...
void unserialize(CheckpointIn &cp) override
Unserialize an object.
virtual void initState()
initState() is called on each SimObject when not restoring from a checkpoint.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Abstract superclass for simulation objects.
virtual void loadState(CheckpointIn &cp)
loadState() is called on each SimObject when restoring from a checkpoint.
virtual void startup()
startup() is the final initialization call before simulation.