From: Steve Reinhardt Date: Thu, 1 Sep 2005 15:32:58 +0000 (-0400) Subject: Convert type of max_time and progress_interval parameters X-Git-Tag: m5_1.1~32 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23a9102d01782f3caea6e10dee7320f4fe954b23;p=gem5.git Convert type of max_time and progress_interval parameters from Latency to Tick, and rename max_time to max_tick. python/m5/objects/Root.py: sim/root.cc: Convert type of max_time and progress_interval from Latency to Tick, and rename max_time to max_tick. --HG-- extra : convert_revision : 2f2aacf6321c3003a0ce834acd8fb726abf27ce3 --- diff --git a/python/m5/objects/Root.py b/python/m5/objects/Root.py index a5aaadd8c..df8fc4bf8 100644 --- a/python/m5/objects/Root.py +++ b/python/m5/objects/Root.py @@ -7,9 +7,9 @@ from Trace import Trace class Root(SimObject): type = 'Root' clock = Param.RootClock('200MHz', "tick frequency") - max_time = Param.Latency('0ns', "maximum simulation time (0 = infinite)") - progress_interval = Param.Latency('0ns', - "print a progress message at a regular interval (0 = never)") + max_tick = Param.Tick('0', "maximum simulation ticks (0 = infinite)") + progress_interval = Param.Tick('0', + "print a progress message every n ticks (0 = never)") output_file = Param.String('cout', "file to dump simulator output to") checkpoint = Param.String('', "checkpoint file to load") # hier = Param.HierParams(HierParams(do_data = False, do_events = True), diff --git a/sim/root.cc b/sim/root.cc index 17438cf2c..6348ec104 100644 --- a/sim/root.cc +++ b/sim/root.cc @@ -81,12 +81,12 @@ Tick ps; class Root : public SimObject { private: - Tick max_time; + Tick max_tick; Tick progress_interval; public: - Root(const std::string &name, Tick maxtime, Tick pi) - : SimObject(name), max_time(maxtime), progress_interval(pi) + Root(const std::string &name, Tick maxtick, Tick pi) + : SimObject(name), max_tick(maxtick), progress_interval(pi) {} virtual void startup(); @@ -95,8 +95,8 @@ class Root : public SimObject void Root::startup() { - if (max_time != 0) - new SimExitEvent(curTick + max_time, "reached maximum cycle count"); + if (max_tick != 0) + new SimExitEvent(curTick + max_tick, "reached maximum cycle count"); if (progress_interval != 0) new ProgressEvent(&mainEventQueue, progress_interval); @@ -105,7 +105,7 @@ Root::startup() BEGIN_DECLARE_SIM_OBJECT_PARAMS(Root) Param clock; - Param max_time; + Param max_tick; Param progress_interval; Param output_file; @@ -114,7 +114,7 @@ END_DECLARE_SIM_OBJECT_PARAMS(Root) BEGIN_INIT_SIM_OBJECT_PARAMS(Root) INIT_PARAM(clock, "tick frequency"), - INIT_PARAM(max_time, "maximum simulation time"), + INIT_PARAM(max_tick, "maximum simulation time"), INIT_PARAM(progress_interval, "print a progress message"), INIT_PARAM(output_file, "file to dump simulator output to") @@ -129,7 +129,7 @@ CREATE_SIM_OBJECT(Root) created = true; outputStream = simout.find(output_file); - Root *root = new Root(getInstanceName(), max_time, progress_interval); + Root *root = new Root(getInstanceName(), max_tick, progress_interval); using namespace Clock; Frequency = clock;