summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-03-20 09:14:14 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2014-03-20 09:14:14 -0500
commit4b67ada89e2e47b26ad07562774ff65beb5633a5 (patch)
treea93e52d39595313eec559d9c4d9b164f76418706 /src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py
parent4f7ef51efba1c1688eadc14f628a1411512b235e (diff)
downloadgem5-4b67ada89e2e47b26ad07562774ff65beb5633a5.tar.xz
ruby: garnet: convert network interfaces into clocked objects
This helps in configuring the network interfaces from the python script and these objects no longer rely on the network object for the timing information.
Diffstat (limited to 'src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py')
-rw-r--r--src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py
index 28f81d732..0c9b143a3 100644
--- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py
+++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.py
@@ -29,11 +29,34 @@
# Brad Beckmann
from m5.params import *
+from m5.proxy import *
from BaseGarnetNetwork import BaseGarnetNetwork
+from BasicRouter import BasicRouter
+from ClockedObject import ClockedObject
+
+class GarnetRouter(BasicRouter):
+ type = 'GarnetRouter'
+ cxx_class = 'Router'
+ cxx_header = "mem/ruby/network/garnet/flexible-pipeline/Router.hh"
+ vcs_per_vnet = Param.Int(Parent.vcs_per_vnet,
+ "virtual channels per virtual network")
+ virt_nets = Param.Int(Parent.number_of_virtual_networks,
+ "number of virtual networks")
+
+class GarnetNetworkInterface(ClockedObject):
+ type = 'GarnetNetworkInterface'
+ cxx_class = 'NetworkInterface'
+ cxx_header = "mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.hh"
+
+ id = Param.UInt32("ID in relation to other network interfaces")
+ vcs_per_vnet = Param.UInt32(Parent.vcs_per_vnet,
+ "virtual channels per virtual network")
+ virt_nets = Param.UInt32(Parent.number_of_virtual_networks,
+ "number of virtual networks")
class GarnetNetwork(BaseGarnetNetwork):
type = 'GarnetNetwork'
cxx_header = "mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh"
- buffer_size = Param.Int(0,
+ buffer_size = Param.UInt32(0,
"default buffer size; 0 indicates infinite buffering");
- number_of_pipe_stages = Param.Int(4, "router pipeline stages");
+ number_of_pipe_stages = Param.UInt32(4, "router pipeline stages");