diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2011-04-28 17:18:14 -0700 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2011-04-28 17:18:14 -0700 |
commit | 40bcbf42539fec83628f2ae2627238adff27f62c (patch) | |
tree | 993083e3b6e5661697261e81869bf40e17027826 /src/mem/ruby/network/Network.py | |
parent | bc5eb596053f7f69c88f8218f20709d94b2a331c (diff) | |
download | gem5-40bcbf42539fec83628f2ae2627238adff27f62c.tar.xz |
network: convert links & switches to first class C++ SimObjects
This patch converts links and switches from second class simobjects that were
virtually ignored by the networks (both simple and Garnet) to first class
simobjects that directly correspond to c++ ojbects manipulated by the
topology and network classes. This is especially true for Garnet, where the
links and switches directly correspond to specific C++ objects.
By making this change, many aspects of the Topology class were simplified.
--HG--
rename : src/mem/ruby/network/Network.cc => src/mem/ruby/network/BasicLink.cc
rename : src/mem/ruby/network/Network.hh => src/mem/ruby/network/BasicLink.hh
rename : src/mem/ruby/network/Network.cc => src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.cc
rename : src/mem/ruby/network/Network.hh => src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.hh
rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.py
rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/fixed-pipeline/GarnetRouter_d.py
rename : src/mem/ruby/network/Network.cc => src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.cc
rename : src/mem/ruby/network/Network.hh => src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.hh
rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/flexible-pipeline/GarnetLink.py
rename : src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py => src/mem/ruby/network/garnet/flexible-pipeline/GarnetRouter.py
Diffstat (limited to 'src/mem/ruby/network/Network.py')
-rw-r--r-- | src/mem/ruby/network/Network.py | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/mem/ruby/network/Network.py b/src/mem/ruby/network/Network.py index 530afcc45..c539f7191 100644 --- a/src/mem/ruby/network/Network.py +++ b/src/mem/ruby/network/Network.py @@ -29,32 +29,15 @@ from m5.params import * from m5.SimObject import SimObject - -class Link(SimObject): - type = 'Link' - latency = Param.Int(1, "") - bw_multiplier = Param.Int("") - weight = Param.Int(1, "") - -class ExtLink(Link): - type = 'ExtLink' - ext_node = Param.RubyController("External node") - int_node = Param.Int("ID of internal node") - bw_multiplier = 64 - -class IntLink(Link): - type = 'IntLink' - node_a = Param.Int("ID of internal node on one end") - node_b = Param.Int("ID of internal node on other end") - bw_multiplier = 16 +from BasicLink import BasicLink 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") + ext_links = VectorParam.BasicExtLink("Links to external nodes") + int_links = VectorParam.BasicIntLink("Links between internal nodes") + routers = VectorParam.BasicRouter("Network routers") print_config = Param.Bool(False, "display topology config in the stats file") |