summaryrefslogtreecommitdiff
path: root/configs/topologies/Cluster.py
diff options
context:
space:
mode:
authorJason Power <powerjg@cs.wisc.edu>2012-08-10 13:50:42 -0500
committerJason Power <powerjg@cs.wisc.edu>2012-08-10 13:50:42 -0500
commit11411cc9c70fb532798c5c8fb287ad658111ff15 (patch)
tree5ac6030e71ed22cfb57ce927ad50cf76e44ba2ea /configs/topologies/Cluster.py
parent706e84f2b8553baba020560f4a83550f05b80630 (diff)
downloadgem5-11411cc9c70fb532798c5c8fb287ad658111ff15.tar.xz
Ruby: Clean up topology changes
This patch moves instantiateTopology into Ruby.py and removes the mem/ruby/network/topologies directory. It also adds some extra inheritance to the topologies to clean up some issues in the existing topologies.
Diffstat (limited to 'configs/topologies/Cluster.py')
-rw-r--r--configs/topologies/Cluster.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/configs/topologies/Cluster.py b/configs/topologies/Cluster.py
index e5c6dac0e..93bd0d946 100644
--- a/configs/topologies/Cluster.py
+++ b/configs/topologies/Cluster.py
@@ -115,3 +115,6 @@ class Cluster(BaseTopology):
return routers, int_links, ext_links
+ def __len__(self):
+ return len([i for i in self.nodes if type(i) != Cluster]) + \
+ sum([len(i) for i in self.nodes if type(i) == Cluster])