summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2011-10-30 15:57:39 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2011-10-30 15:57:39 -0500
commitce2f9625f4c4ed0bf6a79eede184a222e61b1f26 (patch)
tree12230d462c31c4854cb66e7d9f4f45f41663285d
parent49c64731fab1de1fc08b61a70190930b829d70d3 (diff)
parent934448048060b81c39c2df7aee4766a45110b3f1 (diff)
downloadgem5-ce2f9625f4c4ed0bf6a79eede184a222e61b1f26.tar.xz
Commit due to merge.
-rw-r--r--configs/example/ruby_fs.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/configs/example/ruby_fs.py b/configs/example/ruby_fs.py
index ba4671d6e..e6ac5f8c8 100644
--- a/configs/example/ruby_fs.py
+++ b/configs/example/ruby_fs.py
@@ -30,18 +30,18 @@
# Full system configuraiton for ruby
#
-import os
import optparse
+import os
import sys
from os.path import join as joinpath
import m5
from m5.defines import buildEnv
from m5.objects import *
-from m5.util import addToPath, panic
+from m5.util import addToPath, fatal
if not buildEnv['FULL_SYSTEM']:
- panic("This script requires full-system mode (*_FS).")
+ fatal("This script requires full-system mode (*_FS).")
addToPath('../common')
addToPath('../ruby')
@@ -60,7 +60,9 @@ config_root = os.path.dirname(config_path)
m5_root = os.path.dirname(config_root)
parser = optparse.OptionParser()
-
+# System options
+parser.add_option("--kernel", action="store", type="string")
+parser.add_option("--script", action="store", type="string")
# Benchmark options
parser.add_option("-b", "--benchmark", action="store", type="string",
dest="benchmark",
@@ -117,9 +119,15 @@ elif buildEnv['TARGET_ISA'] == "x86":
else:
fatal("incapable of building non-alpha or non-x86 full system!")
-Ruby.create_system(options, system, system.piobus, system._dma_devices)
+if options.kernel is not None:
+ system.kernel = binary(options.kernel)
+
+if options.script is not None:
+ system.readfile = options.script
system.cpu = [CPUClass(cpu_id=i) for i in xrange(options.num_cpus)]
+Ruby.create_system(options, system, system.piobus, system._dma_devices)
+
for (i, cpu) in enumerate(system.cpu):
#