summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/network')
-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)