summaryrefslogtreecommitdiff
path: root/sim/sim_events.cc
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-06-22 09:59:13 -0400
committerNathan Binkert <binkertn@umich.edu>2005-06-22 09:59:13 -0400
commit91f5736fd3fe989a7d5f3db10070fdedea36e1b4 (patch)
treefd62e362e7024addd0ec893d4fc9a6d19a12e2f8 /sim/sim_events.cc
parent1331a723c3113497deb63d0503ab49709d64b0c2 (diff)
downloadgem5-91f5736fd3fe989a7d5f3db10070fdedea36e1b4.tar.xz
Move max_time and progress_interval parameters to the Root
object and get rid of the ParamContext that each used to have. python/m5/objects/Root.py: Add max_time and progress_interval to the Root object sim/root.cc: Add max_time and progress_interval to the Root object. These parameters used to be in their own contexts in sim_events.cc sim/sim_events.cc: Get rid of the ParamContext for max cycles and the progress event. Move the functionality to the Root object sim/sim_events.hh: Move ProgressEvent declaration to the header so that it can be used in other files. --HG-- extra : convert_revision : ff664b806855e8eb9201b8a25392aa53204464f0
Diffstat (limited to 'sim/sim_events.cc')
-rw-r--r--sim/sim_events.cc82
1 files changed, 0 insertions, 82 deletions
diff --git a/sim/sim_events.cc b/sim/sim_events.cc
index 55bb3c305..c2bdca9df 100644
--- a/sim/sim_events.cc
+++ b/sim/sim_events.cc
@@ -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,31 +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.
-struct ProgressParamContext : public ParamContext
-{
- ProgressParamContext(const string &_iniSection)
- : ParamContext(_iniSection) {}
- void startup();
-};
-
-ProgressParamContext progessMessageParams("progress");
-
-Param<Tick> progress_interval(&progessMessageParams, "cycle",
- "cycle interval for progress messages");
-
-void
-ProgressParamContext::startup()
-{
- if (progress_interval.isValid())
- new ProgressEvent(&mainEventQueue, progress_interval);
-}