From 1fbe466345b43caabece9730c1f0456f1b57b82f Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Tue, 17 Aug 2010 05:06:22 -0700 Subject: sim: make Python Root object a singleton Enforce that the Python Root SimObject is instantiated only once. The C++ Root object already panics if more than one is created. This change avoids the need to track what the root object is, since it's available from Root.getInstance() (if it exists). It's now redundant to have the user pass the root object to functions like instantiate(), checkpoint(), and restoreCheckpoint(), so that arg is gone. Users who use configs/common/Simulate.py should not notice. --- configs/example/memtest-ruby.py | 2 +- configs/example/memtest.py | 2 +- configs/example/rubytest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'configs/example') diff --git a/configs/example/memtest-ruby.py b/configs/example/memtest-ruby.py index 709d31844..16d86f0bc 100644 --- a/configs/example/memtest-ruby.py +++ b/configs/example/memtest-ruby.py @@ -129,7 +129,7 @@ else: m5.ticks.setGlobalFrequency('1ns') # instantiate configuration -m5.instantiate(root) +m5.instantiate() # simulate until program terminates exit_event = m5.simulate(options.maxtick) diff --git a/configs/example/memtest.py b/configs/example/memtest.py index d4497092b..0713dd241 100644 --- a/configs/example/memtest.py +++ b/configs/example/memtest.py @@ -181,7 +181,7 @@ else: m5.ticks.setGlobalFrequency('1ns') # instantiate configuration -m5.instantiate(root) +m5.instantiate() # simulate until program terminates exit_event = m5.simulate(options.maxtick) diff --git a/configs/example/rubytest.py b/configs/example/rubytest.py index 13b862756..c9cf0aba4 100644 --- a/configs/example/rubytest.py +++ b/configs/example/rubytest.py @@ -118,7 +118,7 @@ root.system.mem_mode = 'timing' m5.ticks.setGlobalFrequency('1ns') # instantiate configuration -m5.instantiate(root) +m5.instantiate() # simulate until program terminates exit_event = m5.simulate(options.maxtick) -- cgit v1.2.3