summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorChun-Chen TK Hsu <chunchenhsu@google.com>2019-09-13 12:06:17 +0800
committerChun-Chen TK Hsu <chunchenhsu@google.com>2019-11-01 02:29:50 +0000
commit1577428e5c3c0b9a0057502d4f51343e304b2af0 (patch)
treea8d43b9806022c72cf1082f9a0099baa19690d75 /configs
parent4023d93cc50c1dfba42bb1615ce3e4a61b82098d (diff)
downloadgem5-1577428e5c3c0b9a0057502d4f51343e304b2af0.tar.xz
config: Add --mem-size option in fs_bigLITTLE.py
Allow users to specify system memory size. Change-Id: I1e0c099dc08d04f71b406d8cc86850f68b6048cb Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20899 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'configs')
-rw-r--r--configs/example/arm/fs_bigLITTLE.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/configs/example/arm/fs_bigLITTLE.py b/configs/example/arm/fs_bigLITTLE.py
index 36c5963cf..01619586f 100644
--- a/configs/example/arm/fs_bigLITTLE.py
+++ b/configs/example/arm/fs_bigLITTLE.py
@@ -114,13 +114,13 @@ class Ex5LittleCluster(devices.CpuCluster):
super(Ex5LittleCluster, self).__init__(system, num_cpus, cpu_clock,
cpu_voltage, *cpu_config)
-def createSystem(caches, kernel, bootscript,
- machine_type="VExpress_GEM5", disks=[]):
+def createSystem(caches, kernel, bootscript, machine_type="VExpress_GEM5",
+ disks=[], mem_size=default_mem_size):
platform = ObjectList.platform_list.get(machine_type)
m5.util.inform("Simulated platform: %s", platform.__name__)
sys = devices.simpleSystem(LinuxArmSystem,
- caches, default_mem_size, platform(),
+ caches, mem_size, platform(),
kernel=SysPaths.binary(kernel),
readfile=bootscript)
@@ -194,6 +194,8 @@ def addOptions(parser):
parser.add_argument("--sim-quantum", type=str, default="1ms",
help="Simulation quantum for parallel simulation. " \
"Default: %(default)s")
+ parser.add_argument("--mem-size", type=str, default=default_mem_size,
+ help="System memory size")
parser.add_argument("-P", "--param", action="append", default=[],
help="Set a SimObject parameter relative to the root node. "
"An extended Python multi range slicing syntax can be used "
@@ -213,7 +215,7 @@ def build(options):
"lpj=19988480",
"norandmaps",
"loglevel=8",
- "mem=%s" % default_mem_size,
+ "mem=%s" % options.mem_size,
"root=%s" % options.root,
"rw",
"init=%s" % options.kernel_init,
@@ -227,7 +229,8 @@ def build(options):
options.kernel,
options.bootscript,
options.machine_type,
- disks=disks)
+ disks=disks,
+ mem_size=options.mem_size)
root.system = system
system.boot_osflags = " ".join(kernel_cmd)