summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
Diffstat (limited to 'configs')
-rw-r--r--configs/example/ruby_fs.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/configs/example/ruby_fs.py b/configs/example/ruby_fs.py
index 88021bffd..d7fc45bde 100644
--- a/configs/example/ruby_fs.py
+++ b/configs/example/ruby_fs.py
@@ -79,6 +79,7 @@ Ruby.define_options(parser)
execfile(os.path.join(config_root, "common", "Options.py"))
(options, args) = parser.parse_args()
+options.ruby = True
if args:
print "Error: script doesn't take any positional arguments"
@@ -94,17 +95,11 @@ if options.benchmark:
else:
bm = [SysConfig()]
-#
-# currently ruby fs only works in simple timing mode because ruby does not
-# support atomic accesses by devices. Also ruby_fs currently assumes
-# that is running a checkpoints that were created by ALPHA_FS under atomic
-# mode. Since switch cpus are not defined in these checkpoints, we don't
-# fast forward with the atomic cpu and instead set the FutureClass to None.
-# Therefore the cpus resolve to the correct names and unserialize correctly.
-#
-class CPUClass(TimingSimpleCPU): pass
-test_mem_mode = 'timing'
-FutureClass = None
+# Check for timing mode because ruby does not support atomic accesses
+if not (options.cpu_type == "detailed" or options.cpu_type == "timing"):
+ print >> sys.stderr, "Ruby requires TimingSimpleCPU or O3CPU!!"
+ sys.exit(1)
+(CPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)
CPUClass.clock = options.clock