summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.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/fixed-pipeline/GarnetNetwork_d.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/fixed-pipeline/GarnetNetwork_d.py')
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py
index 6ebf94e04..0191d45af 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.py
@@ -29,10 +29,33 @@
# Brad Beckmann
from m5.params import *
+from m5.proxy import *
from BaseGarnetNetwork import BaseGarnetNetwork
+from BasicRouter import BasicRouter
+from ClockedObject import ClockedObject
+
+class GarnetRouter_d(BasicRouter):
+ type = 'GarnetRouter_d'
+ cxx_class = 'Router_d'
+ cxx_header = "mem/ruby/network/garnet/fixed-pipeline/Router_d.hh"
+ 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 GarnetNetworkInterface_d(ClockedObject):
+ type = 'GarnetNetworkInterface_d'
+ cxx_class = 'NetworkInterface_d'
+ cxx_header = "mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.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_d(BaseGarnetNetwork):
type = 'GarnetNetwork_d'
cxx_header = "mem/ruby/network/garnet/fixed-pipeline/GarnetNetwork_d.hh"
- buffers_per_data_vc = Param.Int(4, "buffers per data virtual channel");
- buffers_per_ctrl_vc = Param.Int(1, "buffers per ctrl virtual channel");
+ buffers_per_data_vc = Param.UInt32(4, "buffers per data virtual channel");
+ buffers_per_ctrl_vc = Param.UInt32(1, "buffers per ctrl virtual channel");