changeset 1df031399919 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=1df031399919
description:
        Config: Add command line options for disk image and memory size
        Added the options to Options.py for FS mode with backward 
compatibility. It is
        good to provide an option to specify the disk image and the memory size 
from
        command line since a lot of disk images are created to support different
        benchmark suites as well as per user needs. Change in program also 
leads to
        change in memory requirements. These options provide the interface to 
provide
        both disk image and memory size from the command line and gives more
        flexibility.

diffstat:

 configs/common/Options.py  |  8 ++++++++
 configs/example/fs.py      |  4 ++--
 configs/example/ruby_fs.py |  2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r bbceb6297329 -r 1df031399919 configs/common/Options.py
--- a/configs/common/Options.py Sun Apr 15 12:35:49 2012 -0700
+++ b/configs/common/Options.py Mon Apr 16 17:51:26 2012 -0500
@@ -171,3 +171,11 @@
     parser.add_option("--etherdump", action="store", type="string", 
dest="etherdump",
                       help="Specify the filename to dump a pcap capture of 
the" \
                       "ethernet traffic")
+
+    # Disk Image Options
+    parser.add_option("--disk-image", action="store", type="string", 
default=None,
+                      help="Path to the disk image to use.")
+
+    # Memory Size Options
+    parser.add_option("--mem-size", action="store", type="string", 
default=None,
+                      help="Path to the disk image to use.")
diff -r bbceb6297329 -r 1df031399919 configs/example/fs.py
--- a/configs/example/fs.py     Sun Apr 15 12:35:49 2012 -0700
+++ b/configs/example/fs.py     Mon Apr 16 17:51:26 2012 -0500
@@ -86,9 +86,9 @@
         sys.exit(1)
 else:
     if options.dual:
-        bm = [SysConfig(), SysConfig()]
+        bm = [SysConfig(disk=options.disk_image, mem=options.mem_size), 
SysConfig(disk=options.disk_image, mem=options.mem_size)]
     else:
-        bm = [SysConfig()]
+        bm = [SysConfig(disk=options.disk_image, mem=options.mem_size)]
 
 np = options.num_cpus
 
diff -r bbceb6297329 -r 1df031399919 configs/example/ruby_fs.py
--- a/configs/example/ruby_fs.py        Sun Apr 15 12:35:49 2012 -0700
+++ b/configs/example/ruby_fs.py        Mon Apr 16 17:51:26 2012 -0500
@@ -71,7 +71,7 @@
         print "Valid benchmarks are: %s" % DefinedBenchmarks
         sys.exit(1)
 else:
-    bm = [SysConfig()]
+    bm = [SysConfig(disk=options.disk_image, mem=options.mem_size)]
 
 # Check for timing mode because ruby does not support atomic accesses
 if not (options.cpu_type == "detailed" or options.cpu_type == "timing"):
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to