summaryrefslogtreecommitdiff
path: root/configs/common
diff options
context:
space:
mode:
authorGabor Dozsa <gabor.dozsa@arm.com>2016-01-07 16:33:47 -0600
committerGabor Dozsa <gabor.dozsa@arm.com>2016-01-07 16:33:47 -0600
commit64ca31976fe91eedd91b2d703c6e3e62328f8e1d (patch)
treeaaadab6dfd5d45a7d8794d2033d8ec1b9f845b37 /configs/common
parent5dec4e07b89786aa67ce64aadeeb14c81b3977b3 (diff)
downloadgem5-64ca31976fe91eedd91b2d703c6e3e62328f8e1d.tar.xz
config: Updates for distributed gem5 simulations
Diffstat (limited to 'configs/common')
-rw-r--r--configs/common/FSConfig.py36
-rw-r--r--configs/common/Options.py31
2 files changed, 67 insertions, 0 deletions
diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index 0f63ec9e7..004d06d55 100644
--- a/configs/common/FSConfig.py
+++ b/configs/common/FSConfig.py
@@ -654,3 +654,39 @@ def makeDualRoot(full_system, testSystem, driveSystem, dumpfile):
self.etherlink.dump = Parent.etherdump
return self
+
+
+def makeDistRoot(testSystem,
+ rank,
+ size,
+ server_name,
+ server_port,
+ sync_repeat,
+ sync_start,
+ linkspeed,
+ linkdelay,
+ dumpfile):
+ self = Root(full_system = True)
+ self.testsys = testSystem
+
+ self.etherlink = DistEtherLink(speed = linkspeed,
+ delay = linkdelay,
+ dist_rank = rank,
+ dist_size = size,
+ server_name = server_name,
+ server_port = server_port,
+ sync_start = sync_start,
+ sync_repeat = sync_repeat)
+
+ if hasattr(testSystem, 'realview'):
+ self.etherlink.int0 = Parent.testsys.realview.ethernet.interface
+ elif hasattr(testSystem, 'tsunami'):
+ self.etherlink.int0 = Parent.testsys.tsunami.ethernet.interface
+ else:
+ fatal("Don't know how to connect DistEtherLink to this system")
+
+ if dumpfile:
+ self.etherdump = EtherDump(file=dumpfile)
+ self.etherlink.dump = Parent.etherdump
+
+ return self
diff --git a/configs/common/Options.py b/configs/common/Options.py
index 45be8e2f8..d5671f311 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -297,10 +297,41 @@ def addFSOptions(parser):
# Benchmark options
parser.add_option("--dual", action="store_true",
help="Simulate two systems attached with an ethernet link")
+ parser.add_option("--dist", action="store_true",
+ help="Parallel distributed gem5 simulation.")
+ parser.add_option("--is-switch", action="store_true",
+ help="Select the network switch simulator process for a"\
+ "distributed gem5 run")
+ parser.add_option("--dist-rank", default=0, action="store", type="int",
+ help="Rank of this system within the dist gem5 run.")
+ parser.add_option("--dist-size", default=0, action="store", type="int",
+ help="Number of gem5 processes within the dist gem5 run.")
+ parser.add_option("--dist-server-name",
+ default="127.0.0.1",
+ action="store", type="string",
+ help="Name of the message server host\nDEFAULT: localhost")
+ parser.add_option("--dist-server-port",
+ default=2200,
+ action="store", type="int",
+ help="Message server listen port\nDEFAULT: 2200")
+ parser.add_option("--dist-sync-repeat",
+ default="0us",
+ action="store", type="string",
+ help="Repeat interval for synchronisation barriers among dist-gem5 processes\nDEFAULT: --ethernet-linkdelay")
+ parser.add_option("--dist-sync-start",
+ default="5200000000000t",
+ action="store", type="string",
+ help="Time to schedule the first dist synchronisation barrier\nDEFAULT:5200000000000t")
parser.add_option("-b", "--benchmark", action="store", type="string",
dest="benchmark",
help="Specify the benchmark to run. Available benchmarks: %s"\
% DefinedBenchmarks)
+ parser.add_option("--ethernet-linkspeed", default="10Gbps",
+ action="store", type="string",
+ help="Link speed in bps\nDEFAULT: 10Gbps")
+ parser.add_option("--ethernet-linkdelay", default="10us",
+ action="store", type="string",
+ help="Link delay in seconds\nDEFAULT: 10us")
# Metafile options
parser.add_option("--etherdump", action="store", type="string", dest="etherdump",