diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2012-07-10 22:51:53 -0700 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2012-07-10 22:51:53 -0700 |
commit | 11b725c19da4d08ae471678f6da867c67e3c15b5 (patch) | |
tree | 58bd0ebd09b404f0e860531bda80195f234d0bf2 /src/python | |
parent | 745274cbd4851b3bf725b24138c1fd13746492ec (diff) | |
download | gem5-11b725c19da4d08ae471678f6da867c67e3c15b5.tar.xz |
ruby: changes how Topologies are created
Instead of just passing a list of controllers to the makeTopology function
in src/mem/ruby/network/topologies/<Topo>.py we pass in a function pointer
which knows how to make the topology, possibly with some extra state set
in the configs/ruby/<protocol>.py file. Thus, we can move all of the files
from network/topologies to configs/topologies. A new class BaseTopology
is added which all topologies in configs/topologies must inheirit from and
follow its API.
--HG--
rename : src/mem/ruby/network/topologies/Crossbar.py => configs/topologies/Crossbar.py
rename : src/mem/ruby/network/topologies/Mesh.py => configs/topologies/Mesh.py
rename : src/mem/ruby/network/topologies/MeshDirCorners.py => configs/topologies/MeshDirCorners.py
rename : src/mem/ruby/network/topologies/Pt2Pt.py => configs/topologies/Pt2Pt.py
rename : src/mem/ruby/network/topologies/Torus.py => configs/topologies/Torus.py
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/m5/SimObject.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py index fe0f1f606..0f742a3a2 100644 --- a/src/python/m5/SimObject.py +++ b/src/python/m5/SimObject.py @@ -168,10 +168,15 @@ class MetaSimObject(type): cls._port_refs = multidict() # port ref objects cls._instantiated = False # really instantiated, cloned, or subclassed - # We don't support multiple inheritance. If you want to, you - # must fix multidict to deal with it properly. - if len(bases) > 1: - raise TypeError, "SimObjects do not support multiple inheritance" + # We don't support multiple inheritance of sim objects. If you want + # to, you must fix multidict to deal with it properly. Non sim-objects + # are ok, though + bTotal = 0 + for c in bases: + if isinstance(c, MetaSimObject): + bTotal += 1 + if bTotal > 1: + raise TypeError, "SimObjects do not support multiple inheritance" base = bases[0] |