- * <li>SimObject::resume() if resuming from a checkpoint.
- * </ol>
- *
- * An object's internal state needs to be drained when creating a
- * checkpoint, switching between CPU models, or switching between
- * timing models. Once the internal state has been drained from
- * <i>all</i> objects in the system, the objects are serialized to
- * disc or the configuration change takes place. The process works as
- * follows (see simulate.py for details):
- *
- * <ol>
- * <li>An instance of a CountedDrainEvent is created to keep track of
- * how many objects need to be drained. The object maintains an
- * internal counter that is decreased every time its
- * CountedDrainEvent::process() method is called. When the counter
- * reaches zero, the simulation is stopped.
- *
- * <li>Call SimObject::drain() for every object in the
- * system. Draining has completed if all of them return
- * zero. Otherwise, the sum of the return values is loaded into
- * the counter of the CountedDrainEvent. A pointer of the drain
- * event is passed as an argument to the drain() method.
- *
- * <li>Continue simulation. When an object has finished draining its
- * internal state, it calls CountedDrainEvent::process() on the
- * CountedDrainEvent. When counter in the CountedDrainEvent reaches
- * zero, the simulation stops.
- *
- * <li>Check if any object still needs draining, if so repeat the
- * process above.
- *
- * <li>Serialize objects, switch CPU model, or change timing model.
- *
- * <li>Call SimObject::resume() and continue the simulation.