Alot of changes to push towards ISA independence. Highlights are renaming of the...
[gem5.git] / sim / sim_events.cc
index c454fdcf9c86c51f9e5b916d90cc9bd2187581f4..c2bdca9dfc488d86bd474ed935ac959d1aba7c3c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002-2004 The Regents of The University of Michigan
+ * Copyright (c) 2002-2005 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
 #include "sim/param.hh"
 #include "sim/sim_events.hh"
 #include "sim/sim_exit.hh"
-#include "sim/sim_init.hh"
+#include "sim/startup.hh"
 #include "sim/stats.hh"
 
 using namespace std;
@@ -129,60 +129,6 @@ CheckSwapEvent::description()
     return "check swap";
 }
 
-
-///////////////////////////////////////////////////
-//
-// Simulation termination parameters
-//
-///////////////////////////////////////////////////
-
-class TermParamContext : public ParamContext
-{
-  public:
-    TermParamContext(const string &_iniSection)
-        : ParamContext(_iniSection) {}
-    void checkParams();
-};
-
-TermParamContext simTerminationParams("max");
-
-Param<Tick> max_cycle(&simTerminationParams, "cycle",
-                        "maximum number of cycles to execute");
-
-void
-TermParamContext::checkParams()
-{
-    // if a max cycle count was specified, put a termination event on
-    // the event queue at that point
-    if (max_cycle.isValid())
-        new SimExitEvent(max_cycle, "reached maximum cycle count");
-}
-
-//
-// Progress event: print out cycle every so often so we know we're
-// making forward progress.
-//
-class ProgressEvent : public Event
-{
-  protected:
-    Tick interval;
-
-  public:
-    ProgressEvent(EventQueue *q, Tick interval);
-
-    void process();    // process event
-    virtual const char *description();
-};
-
-//
-// constructor: schedule at specified time
-//
-ProgressEvent::ProgressEvent(EventQueue *q, Tick _interval)
-    : Event(q), interval(_interval)
-{
-    schedule(curTick + interval);
-}
-
 //
 // handle progress event: print message and reschedule
 //
@@ -200,47 +146,3 @@ ProgressEvent::description()
 {
     return "progress message";
 }
-
-/////////
-//
-// Periodic progress message support: print out a message every n
-// cycles so we know we're making forward progress.
-//
-/////////
-
-// Parameter space for execution address tracing options.  Derive
-// from ParamContext so we can override checkParams() function.
-class ProgressParamContext : public ParamContext
-{
-  public:
-    ProgressParamContext(const string &_iniSection)
-        : ParamContext(_iniSection) {}
-    void checkParams();
-};
-
-ProgressParamContext progessMessageParams("progress");
-
-Param<Tick> progress_interval(&progessMessageParams, "cycle",
-                                "cycle interval for progress messages");
-
-namespace {
-    struct SetupProgress : public Callback
-    {
-        Tick interval;
-        SetupProgress(Tick tick) : interval(tick) {}
-
-        virtual void process()
-        {
-            new ProgressEvent(&mainEventQueue, interval);
-            delete this;
-        }
-    };
-}
-
-/* check execute options */
-void
-ProgressParamContext::checkParams()
-{
-    if (progress_interval.isValid())
-        registerInitCallback(new SetupProgress(progress_interval));
-}