diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-03-22 15:53:23 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-03-22 15:53:23 -0500 |
commit | 5aa43e130acec02bc616008a8758cf5096025c19 (patch) | |
tree | f1277ef0002aadfb911f126ec0537afa572f3789 /src/mem/ruby/network/Network.py | |
parent | 2d501276429ab674c146a86802e62538892fc500 (diff) | |
download | gem5-5aa43e130acec02bc616008a8758cf5096025c19.tar.xz |
ruby: convert Topology to regular class
The Topology class in Ruby does not need to inherit from SimObject class.
This patch turns it into a regular class. The topology object is now created
in the constructor of the Network class. All the parameters for the topology
class have been moved to the network class.
Diffstat (limited to 'src/mem/ruby/network/Network.py')
-rw-r--r-- | src/mem/ruby/network/Network.py | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/mem/ruby/network/Network.py b/src/mem/ruby/network/Network.py index 1d2e8ed9d..40f01ca76 100644 --- a/src/mem/ruby/network/Network.py +++ b/src/mem/ruby/network/Network.py @@ -32,22 +32,18 @@ from m5.SimObject import SimObject from ClockedObject import ClockedObject from BasicLink import BasicLink -class Topology(SimObject): - type = 'Topology' - cxx_header = "mem/ruby/network/Topology.hh" - description = Param.String("Not Specified", - "the name of the imported topology module") - num_routers = Param.UInt32("Number of routers in the network") - ext_links = VectorParam.BasicExtLink("Links to external nodes") - int_links = VectorParam.BasicIntLink("Links between internal nodes") - class RubyNetwork(ClockedObject): type = 'RubyNetwork' cxx_class = 'Network' cxx_header = "mem/ruby/network/Network.hh" abstract = True - number_of_virtual_networks = Param.Int(10, ""); - topology = Param.Topology(""); - control_msg_size = Param.Int(8, ""); - ruby_system = Param.RubySystem(""); + topology = Param.String("Not Specified", + "the name of the imported topology module") + + number_of_virtual_networks = Param.Int(10, "") + control_msg_size = Param.Int(8, "") + ruby_system = Param.RubySystem("") + routers = VectorParam.BasicRouter("Network routers") + ext_links = VectorParam.BasicExtLink("Links to external nodes") + int_links = VectorParam.BasicIntLink("Links between internal nodes") |