summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:27 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:27 -0800
commit6c867f82632fa8d635cd617dd933332f596d0bc4 (patch)
treebb38abc37afa73f3cadb989a3d7093a00bf79a57 /configs
parentfaa76fc248ec7647f766ea14335d86036a5d2b9b (diff)
downloadgem5-6c867f82632fa8d635cd617dd933332f596d0bc4.tar.xz
ruby: Added a mesh topology
Diffstat (limited to 'configs')
-rw-r--r--configs/common/Options.py4
-rw-r--r--configs/ruby/Ruby.py12
2 files changed, 15 insertions, 1 deletions
diff --git a/configs/common/Options.py b/configs/common/Options.py
index ade403fe3..1bed93178 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -37,6 +37,10 @@ parser.add_option("--fastmem", action="store_true")
parser.add_option("--clock", action="store", type="string", default='1GHz')
parser.add_option("--num-dirs", type="int", default=1)
parser.add_option("--num-l2caches", type="int", default=1)
+parser.add_option("--topology", type="string", default="crossbar",
+ help="'crossbar'|'mesh'")
+parser.add_option("--mesh-rows", type="int", default=1,
+ help="the number of rows in the mesh topology")
# Run duration options
parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick,
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py
index e7f72b8eb..d34ffd7a2 100644
--- a/configs/ruby/Ruby.py
+++ b/configs/ruby/Ruby.py
@@ -80,7 +80,17 @@ def create_system(options, physmem, piobus = None, dma_devices = []):
# Important: the topology constructor must be called before the network
# constructor.
#
- network = SimpleNetwork(topology = makeCrossbar(all_cntrls))
+ if options.topology == "crossbar":
+ net_topology = makeCrossbar(all_cntrls)
+ elif options.topology == "mesh":
+ #
+ # The uniform mesh topology assumes one router per cpu
+ #
+ net_topology = makeMesh(all_cntrls,
+ len(cpu_sequencers),
+ options.mesh_rows)
+
+ network = SimpleNetwork(topology = net_topology)
#
# determine the total memory size of the ruby system and verify it is equal