summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:11 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:11 -0700
commit09854be558db4eae912efd3ff3b6ab4d35261c27 (patch)
tree3939cc805a222cbc2295c379b881dd969f015d11
parentc7bd896448f43df797ae4bb74c27cbea051df25d (diff)
downloadgem5-09854be558db4eae912efd3ff3b6ab4d35261c27.tar.xz
config: Added the topology description to m5 config.ini
-rw-r--r--src/mem/ruby/network/Network.py2
-rw-r--r--src/mem/ruby/network/topologies/Crossbar.py5
-rw-r--r--src/mem/ruby/network/topologies/Mesh.py9
-rw-r--r--src/mem/ruby/network/topologies/MeshDirCorners.py9
4 files changed, 18 insertions, 7 deletions
diff --git a/src/mem/ruby/network/Network.py b/src/mem/ruby/network/Network.py
index 1fdf15634..530afcc45 100644
--- a/src/mem/ruby/network/Network.py
+++ b/src/mem/ruby/network/Network.py
@@ -50,6 +50,8 @@ class IntLink(Link):
class Topology(SimObject):
type = 'Topology'
+ description = Param.String("Not Specified",
+ "the name of the imported topology module")
ext_links = VectorParam.ExtLink("Links to external nodes")
int_links = VectorParam.IntLink("Links between internal nodes")
num_int_nodes = Param.Int("Nunber of internal nodes")
diff --git a/src/mem/ruby/network/topologies/Crossbar.py b/src/mem/ruby/network/topologies/Crossbar.py
index 86c53cdef..77a6fd6f2 100644
--- a/src/mem/ruby/network/topologies/Crossbar.py
+++ b/src/mem/ruby/network/topologies/Crossbar.py
@@ -29,12 +29,15 @@
from m5.params import *
from m5.objects import *
+class Crossbar(Topology):
+ description='Crossbar'
+
def makeTopology(nodes, options):
ext_links = [ExtLink(ext_node=n, int_node=i)
for (i, n) in enumerate(nodes)]
xbar = len(nodes) # node ID for crossbar switch
int_links = [IntLink(node_a=i, node_b=xbar) for i in range(len(nodes))]
- return Topology(ext_links=ext_links, int_links=int_links,
+ return Crossbar(ext_links=ext_links, int_links=int_links,
num_int_nodes=len(nodes)+1)
diff --git a/src/mem/ruby/network/topologies/Mesh.py b/src/mem/ruby/network/topologies/Mesh.py
index 57913e778..d9ddc7b17 100644
--- a/src/mem/ruby/network/topologies/Mesh.py
+++ b/src/mem/ruby/network/topologies/Mesh.py
@@ -29,6 +29,9 @@
from m5.params import *
from m5.objects import *
+class Mesh(Topology):
+ description='Mesh'
+
# Makes a generic mesh assuming an equal number of cache and directory cntrls
def makeTopology(nodes, options):
@@ -87,6 +90,6 @@ def makeTopology(nodes, options):
node_b=south_id,
weight=2))
- return Topology(ext_links=ext_links,
- int_links=int_links,
- num_int_nodes=num_routers)
+ return Mesh(ext_links=ext_links,
+ int_links=int_links,
+ num_int_nodes=num_routers)
diff --git a/src/mem/ruby/network/topologies/MeshDirCorners.py b/src/mem/ruby/network/topologies/MeshDirCorners.py
index b87b749f6..e994ad1f9 100644
--- a/src/mem/ruby/network/topologies/MeshDirCorners.py
+++ b/src/mem/ruby/network/topologies/MeshDirCorners.py
@@ -29,6 +29,9 @@
from m5.params import *
from m5.objects import *
+class MeshDirCorners(Topology):
+ description='MeshDirCorners'
+
# This file contains a special network creation function. This
# networks is not general and will only work with specific system
# configurations. The network specified is similar to GEMS old file
@@ -105,7 +108,7 @@ def makeTopology(nodes, options):
node_b=south_id,
weight=2))
- return Topology(ext_links=ext_links,
- int_links=int_links,
- num_int_nodes=num_routers)
+ return MeshDirCorners(ext_links=ext_links,
+ int_links=int_links,
+ num_int_nodes=num_routers)